Database Design
Posted: Wed Jun 23, 2010 12:51 am
Hello,
Im new to MySQL and PHP and need to build a database which stores many many different types of interests which a customer may have. Whats more, the interests may be subcategorised. For example....
As a customer I may be interested in Construction. Within construction, I may be particularly interested in bricks, cement, mortar, walls and lighting.
I may also be interested in Cars. Within cars I may have aparticluar interest for Ferraris, Vipers, Nissan Sunnys and plastic pigs.
I was hoping to get suggestions over how to structure a database to a) capture the fact that a uer may have many interests ..... and b) that these interests can be sub categorised into other interests.
I thought about having 2 tables.. One with the users general information in.. and another with the list of interests in.
eg:
Table 1
Name: Address: Postcode:
Jon 10, nowhere lane WN76 8LF
Table 2
Interests
I have no idea how to structure the second table
Can anyone help me with a schema which could capture this data ?
Thanks for your help .
Im new to MySQL and PHP and need to build a database which stores many many different types of interests which a customer may have. Whats more, the interests may be subcategorised. For example....
As a customer I may be interested in Construction. Within construction, I may be particularly interested in bricks, cement, mortar, walls and lighting.
I may also be interested in Cars. Within cars I may have aparticluar interest for Ferraris, Vipers, Nissan Sunnys and plastic pigs.
I was hoping to get suggestions over how to structure a database to a) capture the fact that a uer may have many interests ..... and b) that these interests can be sub categorised into other interests.
I thought about having 2 tables.. One with the users general information in.. and another with the list of interests in.
eg:
Table 1
Name: Address: Postcode:
Jon 10, nowhere lane WN76 8LF
Table 2
Interests
I have no idea how to structure the second table
Can anyone help me with a schema which could capture this data ?
Thanks for your help .