Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old August 12th, 2002, 08:59 AM
robc robc is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2001
Location: MD - USA
Posts: 55 robc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Exclamation How SQL Works (very technical)

Hello,

My boss gave me an assignment to find out how SQL works - he is looking for a very technically detailed explanation.

The explanation has to do with 'sets' and 'trees' etc.

I have been searching the net and books, but they do not go into enough detail concerning this.

I think that the explanation my boss wants, is so technical that it is beyond the scope of most books and sites concerning SQL.

Can anyone point me in the right direction?

Thank You.
the-u

Reply With Quote
  #2  
Old August 12th, 2002, 09:24 PM
MattR MattR is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: High above the mucky-muck (Columbus, OH)
Posts: 266 MattR User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to MattR
What does he want to know? Why?

Reply With Quote
  #3  
Old August 13th, 2002, 12:54 PM
robc robc is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2001
Location: MD - USA
Posts: 55 robc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
The explanation has to do with 'sets' and 'trees' etc

He wants the technical reason why it is faster than flat files, not the conceptional reasons.

I thought the answer to his question was obvious, considering usage of tables, indexes, etc., but he is looking for another type of answer.

He wants me to have a complete, technical understanding, but he wants me to find the answer.

Thanx,
Robc.

Reply With Quote
  #4  
Old August 13th, 2002, 01:58 PM
rycamor rycamor is offline
Gödelian monster
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 1999
Location: Pembroke Pines, Florida, USA
Posts: 2,300 rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 3 h 2 m 4 sec
Reputation Power: 43
Yes, most SQL books don't explain why, or what is behind the syntax, but merely give you 'cookbook' approaches to standard problems.

Spend some time at www.dbdebunk.com, and if possible, purchase some books by Chris Date. (Chris (or C.J.) Date is one of the original researchers who developed the relational data theory, along with E.F. Codd, back in the 1970s). At www.dbdebunk.com, Date and a couple others discuss many things about sets, trees, substitutability, etc... and much more info can be found in their books. We had a discussion about some of this the forum a few months ago in The Future of RDBMS.

Unfortunately you must be prepared to find out that these researchers believe SQL was a bad decision from the first, because it doesn't fully implement the possibilities of relational algebra. In fact, there has been virtually no company with guts enough to take this step, with the possible exception of Alphora, with their product called Dataphor. I am going to be evaluating it soon, so I will provide some more information here in the forums, in the next few weeks. I sincerely hope that Dataphor is everything the Alphora people claim, because it is high time the software industry had something better than SQL.

Also, there are many software companies trying to sell 'alternative' solutions to SQL, which usually involve some sort of "Object oriented", "Multivalued", "Post-relational", "XML-based" system. The problem with most of these is that they are usually tied to a particular application framework, such as Java, and they don't fully implement the relational paradigm. This means they can do trees quite well, which is SQL's weak point, but they are not so good for many other generalized operations involving sets, normalization, views, etc...

Good luck; you have a lot of serious reading ahead of you .
__________________
The real n-tier system:

FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL

Amazon wishlist -- rycamor (at) gmail.com

Reply With Quote
  #5  
Old August 13th, 2002, 02:33 PM
Atrus's Avatar
Atrus Atrus is offline
yet another member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 262 Atrus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Quote:
Originally posted by robc
He wants the technical reason why it is faster than flat files, [...]


Hi!

An obvious reason is for example that DMBSs store data in B-trees which allow for faster searching than unstructured 'flat' storing in worst cases as well as in average cases.

The worst case for finding a certain entry in n entries stored flat is obviously n tries (if the last entry has been the desired one) where a binary tree grants a worst case of log(n).

Also a flat file system will probably not provide SQL querying which is a conceptual thing, though.
For the tree stuff... that's computer science 2nd semester, maybe you'll find more in books like
http://www.amazon.com/exec/obidos/A...4229716-6360956
or
http://www.amazon.com/exec/obidos/A...4229716-6360956

Regards,
Atrus.
__________________
Webmaster - Stefan Meier KG TABAKWAREN - Pfeifen, Premium-Zigarren, ... (_Ger)

Reply With Quote
  #6  
Old August 14th, 2002, 08:22 AM
robc robc is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2001
Location: MD - USA
Posts: 55 robc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Smile

.....Thank you both for the help

robc.....

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > How SQL Works (very technical)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway