Database for C#

  • Thread starter Thread starter Matthias Kwiedor
  • Start date Start date
M

Matthias Kwiedor

Hi!

In my current Project i use MS Access as Database. I know some Databases
like SQL Server, Oracle, mySQL and the DB/2 from IBM, but no more "Stand-
alone" Databases.

Did anyone know a Database, where i can use like MS Access (this means,
without needing to install a Database like mySQL or SQL Server) and has
more performance as MS Access? The last time i used MS Access (about 4
years ago) i had some performance Problems with more than 10.000 Datasets!



Thanks for your help or/and comments



Regards

Matthias
 
Matthias,

Not sure I understand your question; you want to get a database you can run without having to install?? :-) Just kidding. MySQL is super easy to both install and use... I'd give that a spin if I were you. It would defnitely give you better perf than Access.

~harris
 
If I needed absolute top performance without installing something like MSDE
or SQL Server, I would write a simple binary tree system and make your own.
It is the only way you're going to get great performance.

The problem you're going to have isn't in the fact that the other options,
Access, FoxPro, etc. are file based systems; SQLServer uses disk files to
store data too. The problem is the access methods; ODBC, ADO, etc. are just
too slow when accessing file based systems while, with SQL Server, ADO, etc.
mostly just communicates with the server.

So, while I recommend using MSDE for a client application that requires
better performance than Access, if that just is not a possibility, roll your
own. Writing a simple, application specific, b-tree system is not very
difficult. You only need a handful of methods:

Search a node (recursively),
Add a node,
Delete a node,
Split a node
Create a child node

with those and probably just a few more, you could create your own lightning
fast, application-specific, database system.

Years ago, circa 1990 or 1991, BYTE magazine had a great article on writing
your own b-tree systems. It included psuedocode for about 10 functions
that, at the time, I built upon to create a complete database system. I
suppose that's not a lot of help now (a quick search of byte.com doesn't
come up with the article) but certainly there's something similar available
on the net.

Dale
 
One option I left out, because I haven't used any for about 10 years and
don't know what's currently available is to buy an existing B-tree package
for .Net. I assume there are some to be had.

Oh wait... that's what you asked for in the first place, isn't it?

Dale
 
Dale's suggestion is a good one. Fortunately, you don't have to start from
scratch.

See
http://codeproject.com/database/btreedbclass.asp

code and all.

Note: if you want the other features of a database system, like reports, a
nice GUI, built-in security, access from other machines, etc, you are
wasting your time rolling your own. If, on the other hand, you just need to
store 1,000,000 records and perform operations on them, this is probably a
better answer than MSDE (which I love, BTW).

--- Nick
 
I am not clear exactly what you are looking for and why. If you want a
desktop database that is faster and more stable than Access, then FoxPro is
an excellent choice. You can access databases in FoxPro 8.0 or later via
OLE-DB, or 7.0 or earlier via ODBC. The query optimizer rocks. Fox even
supports stored procedures and triggers, if you don't mind writing them in
Xbase.

Fox will scale pretty good for web sites, somewhere perhaps midway between
Access and SQL Server. But once you get beyond a few hundred users or need
24/7 uptime, you really can't avoid an industrial strength server DB like
SQL Server or similar. And really, SQL Server and MySQL are both
surprisingly easy to install and administer. In the long run you're better
off getting comfortable with one or both of those. Oracle is another story
.... in my experience it's so unfriendly and cranky that there's a whole
industry grown up around its care and feeding. DB2 I have no knowledge of.

--Bob
 
Hello Nick and Dale!

Thanks for your sugestions. B-Tree sounds interesting and i found some
Notes from my Schooltime :)

MSDE sounds interesting too... didn't know that there is a redistributable
Version of SQL Server.


Regards



Matthias
 
DalePres said:
If I needed absolute top performance without installing something
like MSDE or SQL Server, I would write a simple binary
tree system and make your own.
...
Writing a simple, application specific, b-tree system is not very
difficult.

So what are your recommending? a B-Tree or a binary tree?

NOTE for the record : B-Tree is not the same a binary tree.

In a binary tree data structure, each node has at most two child nodes.
(ref Knuth, Vol 1, Sect 2.3)

The B-Tree is based on multiway tree branching, and for a B-Tree of order
'm' every node has at most 'm' childern, and every node except the root and
the leaves has at least 'm/2' children. (ref Knuth, Vol 3, Sect 6.2.3)

regards
roy fine
 
Bob Grommes said:
I am not clear exactly what you are looking for and why. If you want a
...
SQL Server or similar. And really, SQL Server and MySQL are both
surprisingly easy to install and administer. In the long run you're better
off getting comfortable with one or both of those. Oracle is another story
... in my experience it's so unfriendly and cranky that there's a whole
industry grown up around its care and feeding.

I have been an Oracle DBA and Developer since Oracle 7.x. And I was
developing with SqlServer back when it was Sybase. At the level we will be
discussing in this newsgroup, Oracle is no different from SqlServer. There
is an industry of SqlServer DBAs as well as one of Oracle DBAs. There are
roughly 10x more SqlServer DBAs, but Oracle DBAs make about 50% more than
their SqlServer counterparts. Check any of the dozen or so published salary
surveys.

If you don't know what you are doing, you can get in a heap of trouble with
either. If you are truly master of one, you can likely get that one to do
just about anything worth doing.

regards
roy fine
 
Matthias Kwiedor said:
Hi!

In my current Project i use MS Access as Database. I know some Databases
like SQL Server, Oracle, mySQL and the DB/2 from IBM, but no more "Stand-
alone" Databases.

Did anyone know a Database, where i can use like MS Access (this means,
without needing to install a Database like mySQL or SQL Server) and has
more performance as MS Access? The last time i used MS Access (about 4
years ago) i had some performance Problems with more than 10.000 Datasets!

SQLLite is essentially stand alone and there is a .NET Data Provider for it.
 
Matthias said:
Hi!

In my current Project i use MS Access as Database. I know some Databases
like SQL Server, Oracle, mySQL and the DB/2 from IBM, but no more "Stand-
alone" Databases.

The database that everyone is standardizing on right now is Firebird ( no,
not Mozilla firebird, which is now called FireFox ).

http://firebird.sourceforge.net/
 
SQLLite is essentially stand alone and there is a .NET Data Provider
for it.

SQLite looks very nice, but when i use the .NET Data Provider from

http://www.phpguru.org/static/SQLite.NET.html

but i get several errors if i try to read or write from the database after
several datasets (about 100+). It runs in a Thread, but it's now singel
threaded, so its thread safe, because nothing outher access the database.

Do you use a other wrapper or method for sqlite?


Regards



Matthias
 
SQLLite is essentially stand alone and there is a .NET Data Provider
for it.

Thanks for your Answer!

SQLite looks very nice, but when i do many reads and writes in a short
time, i get several errors (null exception, sqlite erros), afert 100+
calls.

The Application is Multi-Threaded, but i ran for testing only with one
Thread, so it was Thread Safe.


I use this wrapper

http://www.phpguru.org/static/SQLite.NET.html

Do you use another way to connect to the SQLite Database?


Regards


Matthias
 
If you want something really small and lightweight, and doesn't require
a lot of overhead or an install, I think you're going to have to go with
Access or FoxPro.

I like MySQL as well, but it's not nearly as lightweight as these.

My Access experience is limited, but I'd seriously consider using it
above Fox. I'm an old-timer in FoxPro/Visual FoxPro, and I can you from
experience it's very easy to corrupt FoxPro tables. Flip your PC off
and back on again, with your table open, and you've probably done it.
At that point, you have to know what you're doing to fix it (it requires
opening the table with a binary editor and modifying the recordcount
stored in the header.)

Try a newer version of Access--that might give you better results. If
that fails, take a look at Fox.

Good luck!

-Brian
 
Hi Brian,

thank you for your answer.

I found a way to get Access much more faster by holding the
OleConnection persistant by the application itself and give the
connection just to the routines or dll's and keep the thread safety.


Regards



Matthias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top