Project Description
SharpClaw is a SQL compliant database written in C# which is currently in a "pre-alpha" stage of development. It's already a somewhat large project (about 50 classes), but will end up being huge by the time it's completed. If you are interested in contributing to the project, please contact me.

This project was originally released by “Matt Sieber”, however he has disappeared and has not surfaced in several years and I do not want to see his work left uncompleted (that and I think this would be a really fun project to complete). So I am going to take it upon myself to get this going again.

------------------------------------------------------------------------------------------------------------------------

SharpClaw DB Server In C#

By Matt Sieber (Original Developer)

SharpClaw is an attempt to write a (somewhat) SQL compliant database server in C# (like SQL Server of MySQL). I developed it in my spare time, and although it has some areas which need much improvement, it is a fine piece of work so far. You will need to know a bit of SQL to use SharpClaw, but I'm sure many of you do.

The best way to learn about SharpClaw is to download the source files and give it a test drive. Much of the code is documented, though it helps if you have a decent understanding of database design.

Make sure you extract the files in the distribution to their original path. A directory called C:\SharpClaw will be created. In that directory, you will find a text file called SharpClaw_Documentation.txt. The instructions in this file will tell you where to go from there. Have fun! And be sure to check out the following examples of C# / .NET programming concepts:

Operator overloading

see DataUnits.DBInt, line 129 and following

(also found in the other datatypes in DataUnits)

Static constructor

see DataUnits.DBInt, line 38

(also found in the other datatypes in DataUnits)

Imlementation of IConvertible

Allows the conversion of a custom datatype to a .NET type by using System.Convert

see DataUnits.DBInt, line 248

B-Tree

The backbone of every database worth its salt is the b-tree (or a variant of the b-tree, such as the b+tree or b*tree). The b-tree algorithm used in SharpClaw is written in C# and based on pseudocode available online. Please see the References section of the documentation for links.

see Index.TableIndex, line 174 and following

Threading

SharpClaw runs a background thread to write blocks of data to the drive.

see FileIndex.Index, line 47 and line 110

Unsafe Code

While I generally love the lack of pointers in .NET, sometimes you just feel the need to rip a class apart and plunder the data inside. Nothing less than pointers will do!

see DataUnits.DBInt, line 13,

or, DataUnits.DBDataType, line 30 (DBDataType is the base class for DBInt)

or, SQLParser.DataConverter, line 10

NOTE: This article was originally posted by Matt Sieber on CSharpHelp.com
http://www.csharphelp.com/archives2/archive367.html

Currently Sponsored By:
http://www.netlogiccorporation.com

Last edited Apr 3, 2011 at 1:24 AM by robertjcollins, version 7