Amiga.org

Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: Jose on April 21, 2009, 11:47:48 PM

Title: SQL database library (dynamic / linking)...
Post by: Jose on April 21, 2009, 11:47:48 PM
I've been reading a tutorial on SQL, really much easier than I thought, never really had looked at it properly.

My goal is to code an idea I had for a small program that has an internal database, tied to other things of course. Instead of building my own database file type I thought I could use an SQL library embedded in my code. I looked around and mySQL seems to be a good contender, althoug it's GPL, and I my intention is not to realease the code, at least for now, maybe when I'm done with it (IF...).

So, can anyone recommend good alternatives ? It must be used as a link library in a C program, using the standard SQL syntax.

:pint:
Title: Re: SQL database library (dynamic / linking)...
Post by: Hans_ on April 22, 2009, 12:26:14 AM
@Jose
MySQL is designed to run as a server that is separate from the clients using the database. As such, you can use a MySQL database with a non-GPL program as they communicate via a network (it's a separate process). There is no dynamic linking so it's not a single program as per the GPL.  

If you really want the database code to be internal to the program, then SQLite (public domain) is an option. However, if your database gets big, you're better off running a MySQL server, and accessing it via TCP/IP, even if it's on the same machine.

Hans
Title: Re: SQL database library (dynamic / linking)...
Post by: Jose on April 22, 2009, 12:52:21 AM
@Hans

There's a version of mySQL that can be runn embedded in a program, at least that's what I understood from taking a look at it's HUGE docs. But the license is GPL.
Ok I could install a server locally but let's say I want to distribute my program with a database of acunpuncture points and pictures, I won't be able to include the server in my distribution of the program..

I'll take a look at SQLite, thanks for the hint :)
Title: Re: SQL database library (dynamic / linking)...
Post by: mdv2000 on April 22, 2009, 03:01:25 AM
Jose,
  What platform are you targeting?  If you want to write a program for just Windows there is a lot of options!  If you want cross platform, the easiest is Java with the Hypersonic SQL DB.

Actually,  the easier way to stay free and cross platform would be a Java solution!  And if you know C, java is just a long weekend to learn for the most part!

Mike
Title: Re: SQL database library (dynamic / linking)...
Post by: persia on April 22, 2009, 03:42:44 AM
Not sure what you are after but it seems like sqlite (http://www.sqlite.org/) may be the answer.

Title: Re: SQL database library (dynamic / linking)...
Post by: Fats on April 22, 2009, 09:44:16 PM
Quote

persia wrote:
Not sure what you are after but it seems like sqlite (http://www.sqlite.org/) may be the answer.


A discussion on Amiga versions of sqlite (http://utilitybase.com/forum/index.php?action=vthread&forum=2&topic=608&page=-1)

Staf.
Title: Re: SQL database library (dynamic / linking)...
Post by: Jose on April 22, 2009, 10:23:15 PM
Yes, seems like SQLite is the answer. I'd code it for Amiga 68k / OS4 / MOS and even AROS. I'd also like to do a winblows version:)

Title: Re: SQL database library (dynamic / linking)...
Post by: lorddef on April 22, 2009, 10:37:12 PM
Well there's always postgresql, it's bsd licenced.

Not sure how much of a massive task it's be to get it going though. If you wanted the server you'd be dealing with shared memory for starters.