Page 1 of 1

Application programming with an embedded database?

Posted: August 22, 2005, 11:36 pm
by Xouqoa
Let's say I wanted to figure out how to create an application (either VB or C++) for windows with some sort of embedded database.

Does anybody have any recommendations for places/books to read up on this?

I know how to program, and I know databases, but not this sort of stuff. My knowledge is all web based so I just need some sort of started tutorial. Thanks!

Posted: August 22, 2005, 11:41 pm
by Dregor Thule
Ted Nugent

Re: Application programming with an embedded database?

Posted: August 22, 2005, 11:56 pm
by Zaelath
Xouqoa wrote:Let's say I wanted to figure out how to create an application (either VB or C++) for windows with some sort of embedded database.

Does anybody have any recommendations for places/books to read up on this?

I know how to program, and I know databases, but not this sort of stuff. My knowledge is all web based so I just need some sort of started tutorial. Thanks!
WTF? You want to re-create MS Access?

You'd probably be a lot better off running a real backend unless your data storage needs are so modest you could get away with a flat file.

Posted: August 23, 2005, 12:16 am
by Xouqoa
Maybe embedded isn't an accurate description.

I need something that (when I am finished) the customer can install the application (via setup.exe or whatever) and then the application will be able to store data on their machine without them having to install a web server or anything like that.

I don't even know of any database packages that do that. :) <-- noob

Posted: August 23, 2005, 12:37 am
by Zaelath
Pretty much means writing your own database.. which is why I said people never do this unless you can get by w/ a flat file.

The usual method if you have some real data storage requirements is to use a third party DB API to do the work; Access is a fairly safe bet if you're writing for corporate, MySQL is better if you want a real DB and/or lower entry cost with installation/support work (good opportunity for trail income ..) It's not impossible for you to bundle MySQL w/ your application either... but you have to either GPL your software, or pay for a licence.

If you support more than one API you can leave it to the client as to what DB they want to licence..

Posted: August 23, 2005, 1:10 am
by Canelek
On a corporate level, Visual Studio, MSSQL Server and install scripts w/WISE or InstallShield is pretty common for your standard n-tier type of thing. As for a smaller level, I am not too familiar, unfortunately. What is your scope?

Posted: August 23, 2005, 1:13 am
by Canelek
Also keep in mind that MS Access is no true RDBMS--it is more of a file, much like Excel, that become corrupted. The MS Jet engine is utter garbage--just ask anyone who has ever tried to fix a bad Exchange database.

If I had no funds for SQL Server, I would definately go unix/MySQL. PERL is an easy language to learn and MySQL is pretty much ANSI SQL.

Posted: August 23, 2005, 1:31 am
by Xouqoa
Not sure on the scope, it's just an idea I have at the moment! Probably a few simultaneous users via network/server configuration eventually. It'll be a POS type application, which is why I need to be able to store the infoz.

Posted: August 23, 2005, 1:40 am
by Zaelath
Canelek wrote:Also keep in mind that MS Access is no true RDBMS--it is more of a file, much like Excel, that become corrupted. The MS Jet engine is utter garbage--just ask anyone who has ever tried to fix a bad Exchange database.

If I had no funds for SQL Server, I would definately go unix/MySQL. PERL is an easy language to learn and MySQL is pretty much ANSI SQL.
Agreed, Access is rubbish, and when I said 'corporate' I meant 'desktops that are likely to have access by default'. =)

If it's multiuser at all then it's not a big ask to install a DB server on a dedicated/single machine; every time I've seen an application that attempts to do some adhoc database serving from a share, it ends up being prone to corruption and generally perform poorly (RoomMaster comes to mind..)

You could also just stick to what you know and do the whole interface in HTML... backend MySQL and Java/Perl/whatever.

Posted: August 23, 2005, 1:46 am
by Canelek
Xouqoa wrote:Not sure on the scope, it's just an idea I have at the moment! Probably a few simultaneous users via network/server configuration eventually. It'll be a POS type application, which is why I need to be able to store the infoz.
kk

If you do want a Windows-based app, and want a language preferance, I would suggest C# over VB in a heartbeat. While VB/VB.NET may be easier on the eyes, it is weaksauce compared to C#. :D I am no developer--just a prod DBA--but I do work closely with app/dev peoples.

Posted: August 23, 2005, 2:42 am
by Tenuvil
Here's an excellent MySQL reference, including programming APIs

http://www.oreilly.com/catalog/msql2/

What OS are you coding the front end for? I ask because I've been looking for a Linux based POS system that uses a 2-tier MySQL database and haven't found one that meets my needs. I hate the thought of buying the Microsoft Point of Sale application and all the OS and SQL Server licenses that go along with it.

Posted: August 23, 2005, 2:53 am
by Xouqoa
I guess if I have to actually install a database server/application outside of the application itself I might as well just do it in either flash or coldfusion. *shrug* :)

Posted: August 23, 2005, 3:22 am
by Canelek
Barebones n-tier....

Web interface/GUI - Business Logic - Database backbone

Posted: August 23, 2005, 3:49 am
by Tenuvil
Canelek wrote:Barebones n-tier....

Web interface/GUI - Business Logic - Database backbone
back in the dark ages we called that "middleware" :D Imagine a UI based on LOTUS 123 for DOS, with a business rules tier in FOCUS 4GL and a back end database running on IBM MVS DB2.

Posted: August 23, 2005, 8:14 am
by Animalor
Take a look at MSDE.

http://www.microsoft.com/sql/msde/default.mspx
Microsoft SQL Server 2000 Desktop Engine (MSDE 2000) is the free, redistributable version of SQL Server that’s ideal for client applications that require an embedded database, new developers learning how to build data-driven applications, and Web sites serving up to 25 concurrent users.
Might be overkill for what you want to use however it's a LOT better than using a MDB file.

Posted: August 23, 2005, 8:42 am
by Aabidano
Clipper FTW!
Microsoft SQL Server 2000 Desktop Engine (MSDE 2000)
It worls well enough, kind of bloated though. Imagine that.

Might want to look at Cloudscape as well, IBM took it open source a year or two ago. It's a nice database, we use it in a couple products with a java front end.

Posted: August 23, 2005, 12:27 pm
by XunilTlatoani
If you're looking for an embedded database to deploy on a client machine, definitely take a look at cloudscape. It's perfect for those types of applications (MySQL is more of a server side product...and their license is confusing for commerical products), and like Aabidano said, it is now in the open source world. I believe you can still find it on the IBM site, but you might also find it at the Apache site under the Derby project.

The only drawback for you, since you are looking at a C or VB solution, is that Cloudscape runs on Java. So, ideally it should be embedded in a Java app, but you should be able to get it to work in your VB/C app.

Posted: August 23, 2005, 1:29 pm
by Aabidano
Nice thing about it for us is the ease in supporting multiple platforms. We run essentially the same code on Solaris, Windows and Linux. Depending on customer preference and scale of operation.

Posted: August 23, 2005, 3:13 pm
by Xouqoa
Thanks for all the info, guys. :)

Posted: August 23, 2005, 3:23 pm
by Seebs
Can't you have your Admin do it? :roll:

Posted: August 23, 2005, 6:09 pm
by Fyndina
Besides MSDE, look into SQL Express. New desktop version of MS SQL Server 2005. Some cool new abilities, but also more restrictive in some ways, but not enough to be an issue for a single user system.

Both of these can be installed with the install of the application. Be aware that company IT department hate both of them, mostly due to the problem of patching since you do not know where and who has them installed. *flashbacks from slammer*

Posted: August 27, 2005, 3:01 am
by Nindalf
May want to check out Filemaker too depending on what you want to do exactly.