Thread: How do sqlservers work!

How do sqlservers work!

From
"wmac"
Date:
Hello,

I had posted this in "novice" group but as I did not get any reply I am
posting again here.

I am working on a small article (educational article as a part of my
course) about SQL servers and I have some general questions and I'll
appereciate if someone can answer. (just small replies so that I can
find my way and look for more info).

1- How do SQL servers put datas in files? I am a C Programmer and I have
developped programs for MySQL/MSSQL/Oravle/PostgreSQL.

2- Is there a verys small SQL server that I can take a look at some
parts of the code and I can have a view of their structure?

3- Can you give me some advice on how can I gather enough information to
be able to develop a very very small SQL server with just 4 commands
(doing simple SELECT, INSERT, CREATE DATABASE and CREATE TABLE with
simple options).

I want to work on this for my M.Sc project.

Regards,
Mac
--
Indy Programming Forums: http://onlineprogrammer.org/forums
http://OnlineProgrammer.org: Articles, Resources, Forums



Re: How do sqlservers work!

From
Richard Huxton
Date:
On Thursday 27 Feb 2003 3:36 pm, wmac wrote:
> Hello,
>
> I had posted this in "novice" group but as I did not get any reply I am
> posting again here.
>
> I am working on a small article (educational article as a part of my
> course) about SQL servers and I have some general questions and I'll
> appereciate if someone can answer. (just small replies so that I can
> find my way and look for more info).

Not really PostgreSQL specific stuff, but...

> 1- How do SQL servers put datas in files? I am a C Programmer and I have
> developped programs for MySQL/MSSQL/Oravle/PostgreSQL.

There's no real connection between using SQL as a query language and the
format of your data file(s).

> 2- Is there a verys small SQL server that I can take a look at some
> parts of the code and I can have a view of their structure?

Look below for a large number of open-source database servers of various sizes
shapes and religious persuasions:

http://freshmeat.net/browse/67/?topic_id=67

There have been projects building simple SQL databases in "pure" java,python
etc. - these are probably what you want.

> 3- Can you give me some advice on how can I gather enough information to
> be able to develop a very very small SQL server with just 4 commands
> (doing simple SELECT, INSERT, CREATE DATABASE and CREATE TABLE with
> simple options).

Make your life simple and try to find libraries that can help you with
parsing, data-file management etc. No point in re-inventing the wheel any
more than you have to.

> I want to work on this for my M.Sc project.

It might be more rewarding to make a real contribution to an existing project
- that way your work can be used in the real world. Of course, the demands of
your course may say otherwise.

--
  Richard Huxton

Re: How do sqlservers work!

From
"scott.marlowe"
Date:
http://sourceforge.net/projects/hsqldb/

is listed as a small (100k) database written in java.

It might be a good place to look.

Unfortunately, smaller databases tend to lack a lot of the functionality
of their larger, more complex cousins.

Dates are stored in many different ways.  For instance, in postgresql you
can store them in two different ways based on how you configured the
database.  (Or is that timestamps, I think it's timestamps that can be
stored as 64 bit ints...)

On Thu, 27 Feb 2003, wmac wrote:

> Hello,
>
> I had posted this in "novice" group but as I did not get any reply I am
> posting again here.
>
> I am working on a small article (educational article as a part of my
> course) about SQL servers and I have some general questions and I'll
> appereciate if someone can answer. (just small replies so that I can
> find my way and look for more info).
>
> 1- How do SQL servers put datas in files? I am a C Programmer and I have
> developped programs for MySQL/MSSQL/Oravle/PostgreSQL.
>
> 2- Is there a verys small SQL server that I can take a look at some
> parts of the code and I can have a view of their structure?
>
> 3- Can you give me some advice on how can I gather enough information to
> be able to develop a very very small SQL server with just 4 commands
> (doing simple SELECT, INSERT, CREATE DATABASE and CREATE TABLE with
> simple options).
>
> I want to work on this for my M.Sc project.
>
> Regards,
> Mac
> --
> Indy Programming Forums: http://onlineprogrammer.org/forums
> http://OnlineProgrammer.org: Articles, Resources, Forums
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>


Re: How do sqlservers work!

From
Scott Chapman
Date:
Mac,
Here's some links to small SQL implementations:

SQLite - written in C
http://www.hwaci.com/sw/sqlite/

Gadfly - written in Python
http://gadfly.sourceforge.net

Sprite - written in Perl
http://search.cpan.org/author/TURNERJW/DBD-Sprite-0.44/lib/DBD/Sprite.pm

I don't doubt that there are others.  These are the smallest ones I know of.

Cordially,
Scott