• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Databases

bigoh5

n00b
Joined
Mar 19, 2009
Messages
12
Hello,

I am writing my own database engine with a friend and I had a few questions about databases to make this go smoother. I know that the base of the MySQL database is a BTree. But is there one BTree per database table, or does each BTree only hold perhaps one type of value (ie. one column values) and then linked somehow.

Thanks
 
Both. A B-Tree is an index.

In a database, a table might have no indexes, one index, or many indexes.

The table might be stored as a heap with no indexes, a heap with an external index (where the keys exist in the index, then reference identifiable entries in the heap), or with the table's full rows in the B-Tree (even if all the columns aren't keys), or as some combination of those schemes.
 
Does java have any BTree implementations, 3rd party (I know the java api doesn't have anything) or even in another language where I could easy create my own BTree? For now I'm working on implementing my own BTree. Any references or sources would be much appreciated!
 
Have you tried searching for yourself? What is it that you didn't like about the results you've found?
 
Does java have any BTree implementations, 3rd party (I know the java api doesn't have anything) or even in another language where I could easy create my own BTree? For now I'm working on implementing my own BTree. Any references or sources would be much appreciated!

If your looking for Java DB code you can look at several open source Java relational database projects.

H2 Database (Eclipse Public License 1.0)

HSQLDB (based on Hypersonic) (BSD License)

Apache Derby (Apache2 License)

The source code for all of the above is available freely, and you can incorporate it in to your own programs (snippets, whole modules, whatever you need) both Apache2 and BSD are permissive licenses while EPL 1.0 is more along the lines of LGPL.

Both Derby and Hypersonic see plenty of use in the Java community, I can't speak to H2 as I've never used it or a product which uses it before but I'm sure someone else can comment.

Hope this is helpful.
 
Back
Top