Subject: database design
From: "deco" <[EMAIL PROTECTED]>
 ===
I'm having a problem getting this to fit...

I have a file with a bunch of data stored... This data represents messages,
one after the other, with message header followed by message data.

I'm porting this to a mysql database. The thing is the message data is
defined in an external file, which defines foi each message type a bunch of
fields that can be double, long, short, ushort, etc...
I can parse this file easily, and i'm storing this data in java with no
difficulty.

The thing is: My DB would be something like:
A table holding data types (not programming types, but "data" types), which
holds information about every type that can appear in a file...
Another one where values read from the file are stored, with a foreign key
to the corresponding "data" type.

Thing is: if the value for this "data" types can be a double, or a long, or
a char, or a short, if my table is like (data_type, value) what field type
would i give to value? Cause it can be a lot of things. I can put the
biggest one, but then i would be using a lot more space to hold the db than
i would need.

I was hoping for some possibility of a dynamic size field, that could answer
to my needs... Maybe i'll need to set it as a binary object or something.
Any help?

Thanks in advance
    Ricardo Rocha



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to