www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - SQLite

reply Mista <stoop hotpop.com> writes:
There seem to be 2 options to use SQLite.
SQLite 3.0.0 at www.dprogramming.com
and
sqlite-0.0.2 library at D Lab

And i am wondering which one would be better and why?
Jun 26 2004
parent reply J C Calvarese <jcc7 cox.net> writes:
Mista wrote:
 There seem to be 2 options to use SQLite.
 SQLite 3.0.0 at www.dprogramming.com
 and
 sqlite-0.0.2 library at D Lab
 
 And i am wondering which one would be better and why?

I haven't tried out Vathix's (www.dprogramming.com) SQLite project yet, but that's probably the better one to use. I'm the one who posted the D Lab version a while back (which was an update of an earlier project by Burton Radons). I only updated it enough to get it to compile with the latest version of DMD (at that time). I don't intend to improve anything about it. If I post any more versions, it'd probably be to get it to compile with newer version of DMD. In summary, the newer project by Vathix is probably better. And it always helps that the original author is still actively using D. Burton pops in from time to time with a bug report, but he hasn't dropped any hints of picking up his old projects in a while. -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
Jun 26 2004
next sibling parent reply Gold Dragon <dragonwing dragonu.net> writes:
I would think that it would be better to completely recreate SQLite in D 
than to create a wrapper. That is just the way I think, the truth is 
that it is faster to create a wrapper (in most cases) as the code behind 
it is already tested and debugged. After taking a look at the source of 
SQLite, you can see that it isn't pretty and there are a lot of system 
dependent code that some of the D modules already handle. Perhaps the C 
code is more efficent than the D module (std.file in this case) but 
perhaps taking that out and redefining what the D SQLite module or 
package is would also help in defining what D can do.

If one was going to recreate SQLite, they would have to create a new 
parser for the database or hack Lemon (? I think this is the name of the 
tool) to convert the code over to D. Something about recreating the 
wheel comes to me at these times. Of course, this is a new language and 
something like recreating a somewhat small footprint database would be 
interesting as opposed to just creating a wrapper. Not that I'm trying 
to down play the said D wrapper of SQLite as from what I have seen it 
looks good.

That being said, I tried to recreate SQLite and after touching the base 
I decided that it wasn't good to start there and after just having 
completed half of the OS front end, I decided that the project was at an 
end as it was a waste of time to, as I have said, reinvent the wheel. 
Maybe using the D module std.file was is a better idea than os.c and 
os.h. Who's to know unless someone tries and finds out.

 J C Calvarese wrote:
 
 I haven't tried out Vathix's (www.dprogramming.com) SQLite project yet, 
 but that's probably the better one to use.
 
 I'm the one who posted the D Lab version a while back (which was an 
 update of an earlier project by Burton Radons). I only updated it enough 
 to get it to compile with the latest version of DMD (at that time). I 
 don't intend to improve anything about it. If I post any more versions, 
 it'd probably be to get it to compile with newer version of DMD.
 
 In summary, the newer project by Vathix is probably better. And it 
 always helps that the original author is still actively using D. Burton 
 pops in from time to time with a bug report, but he hasn't dropped any 
 hints of picking up his old projects in a while.
 

Jun 27 2004
parent reply Mista <stoop hotpop.com> writes:
Gold Dragon wrote:

 I would think that it would be better to completely recreate SQLite in D 
 than to create a wrapper.

I am glad when i can use it without to much trouble. Recreating it would be a bit to much work for my tast. But if you or anyone else ever does, i would be happy to use a D version of SQLite ;)
Jun 27 2004
parent Gold Dragon <dragonwing dragonu.net> writes:
Well, that is good to know if I ever do decide to do it but I would 
rather use the wrapper as by the time anyone recreates SQLite, the D 
wrapper will be l33t and SQLite 4.5 will be out. Might want to try 
converting the poorly written PARODY database in D. That would be a even 
greater waste of time. Be awarded the guy who wasted all his time on 
something beyond his level.

 Mista wrote:
 I am glad when i can use it without to much trouble. Recreating it would 
 be a bit to much work for my tast.
 But if you or anyone else ever does, i would be happy to use a D version 
 of SQLite ;)

Jun 28 2004
prev sibling parent Mista <stoop hotpop.com> writes:
J C Calvarese wrote:
 Mista wrote:
 
 There seem to be 2 options to use SQLite.
 SQLite 3.0.0 at www.dprogramming.com
 and
 sqlite-0.0.2 library at D Lab

 And i am wondering which one would be better and why?

I haven't tried out Vathix's (www.dprogramming.com) SQLite project yet, but that's probably the better one to use. I'm the one who posted the D Lab version a while back (which was an update of an earlier project by Burton Radons). I only updated it enough to get it to compile with the latest version of DMD (at that time). I don't intend to improve anything about it. If I post any more versions, it'd probably be to get it to compile with newer version of DMD. In summary, the newer project by Vathix is probably better. And it always helps that the original author is still actively using D. Burton pops in from time to time with a bug report, but he hasn't dropped any hints of picking up his old projects in a while.

Ok you convinced me, i will be using Vathix his version then :) Thank you for your reply.
Jun 27 2004