Jorge Bastos wrote:
> I sugest all people to sugest a table with the required
field, and we
> all give opinions to have a final table
>
> for a start i could suggest:
>
> user_idnr
> name
> street1
> street2
> local
> fone
> mobil
> fax
> email
When I make a database that contains multiple properties of
some
objects, I don't make many-many fields for each propery in
the objects
table.
Instead of it I make a table that is called smth. like
`properties`.
Here is it's quick approximate example:
CREATE TABLE `properties` (
`property_id` INT NOT NULL auto_increment,
`property_name` VARCHAR( 63 ) NOT NULL ,
`property_type` ENUM( 'text', 'number' ) NOT NULL ,
PRIMARY KEY ( `property_id` ) ,
INDEX ( `property_name` )
);
After that I make a table called smth. like `values` and its
(approximate) DDL is as follows:
CREATE TABLE `values` (
`object_id` INT NOT NULL ,
`property_id` INT NOT NULL ,
`value` BLOB NOT NULL ,
PRIMARY KEY ( `object_id` , `property_id` )
);
It's just a many2many relation.
May be this idea will be useful for people who decide to
work on this
project.
As for me, at my work I had to make an address-book (that
looks just
like a web-page) out of DBMail database.
I needed to make it quickly, so that time I just made a
separate table
with some fields... I decided not to change the original
database structure.
--
Best regards, Danil V. Gerun.
_______________________________________________
DBmail mailing list
DBmail dbmail.org
htt
ps://mailman.fastxs.nl/mailman/listinfo/dbmail
|