By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,834 Members | 2,234 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,834 IT Pros & Developers. It's quick & easy.

Single-file databases -- how do they do it?

P: n/a
Hello,
How do single-file databases do it? If a database has, say, 10 tables,
does that mean that the single-file is just a trick to hold ten
separate 'boxes' inside, one for each table, or someone has found a
way to store all the tables of a database in one big single table? Can
someone un-curious-ify me?
Thanks,
gk
Nov 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I'm not an expert on the backend, but here's my best guess. The
database is stored internally as a binary file, not a text file.
Binary files are accessed randomly, not sequentially, so the database
engine opens the file and skips the the portion of the file holding
that table. It then has to hash through the data using the b-tree hash
searching.

So in the end you have a file with a number of entry points, kind of
like a table of contents. The table of contents tells the engine where
in the file to look for the data.

Sim Zacks
IT Manager
CompuLab
04-829-0145 - Office
04-832-5251 - Fax

__________________________________________________ ______________________________

Hello,
How do single-file databases do it? If a database has, say, 10 tables,
does that mean that the single-file is just a trick to hold ten
separate 'boxes' inside, one for each table, or someone has found a
way to store all the tables of a database in one big single table? Can
someone un-curious-ify me?
Thanks,
gk

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.