Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Database File Advice

Name: Anonymous 2011-07-11 2:19

I seek your advice, fellow /prog/riders.

I've decided to create my own database software out of boredom. Before coding, I wrote this file describing how the information would be stored to disk:
http://pastebin.com/JHwvG0hK

The concern resides in the section of the file Titled "Allowed Data Lengths, Something Special about STRINGS and DOUBLES." The core of the problem is this: Each cell in the table is allowed a certain number of characters for storage as defined by each column label, and the cell must be that many characters long. When the data put into the table doesn't take up all of the room allowed to it, as many pipes ('|') as free space that exists are placed before the data. If the user has a pipe in an input string, then the database software simply escapes it.

So, when the user creates a new column, they specify a certain column size; however, as I plan now, the database software that I have yet to write will increase their size by a factor of 1.5 to allow for escape characters. Is there a better solution than this, /prog/?

Name: Anonymous 2011-07-11 2:42

Actually, any advice would be appreciated, Although I feel as though that's the only iffy part of the file design.

Name: Anonymous 2011-07-11 3:55

Here's some advice:
polecat kebabs

Name: Anonymous 2011-07-11 4:16

How about you read a book about it?

Name: Anonymous 2011-07-11 8:37

Fixed length csv with 'pipe padding'. I dont get it.

Name: Anonymous 2011-07-11 9:45

>>5
Ever used a sql database? You're right, I don't get it either, "faggot."
The software supporting it is going to allow for many basic data structure functions, as well as support a small scripting language that allows for data processesing through string queries. the important thing is that it saves all of its data to disk rather than in memory. All of these factors combined make it very useful for data storage on the server side of server-client applications as well as data-intensive applications and I have a strog feeling that IHBT.

>>4
That actually is very sound advice, thanks. I suppose some open source sql code wouldn't be a bad start either.

Name: Anonymous 2011-07-11 10:13

Name: Anonymous 2011-07-11 17:13

>>6
Just to be perfectly sure: database engines aren't written in SQL

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List