sql - Relational Database Design (MySQL) -
i designing database application based on "talents", example:
- models
- actors
- singers
- dancers
- musicians
i started similar question yesterday , have made progress responses thought easier start new question now. have @ moment:
table talent: - id - name table subtalent: - id - name - talent_id (fk) table user: - id - name
any user signs on website can create profile 1 or more of these talents. talent can have sub-talents, example actor can tv actor or theatre actor or voiceover actor.
now need know answers following:
1) how should store talents , sub-talents user has. assume there need 2 more tables (talent_user , subtalent_user)?
2) user can specify specific information each top level talent have. fields vary each talent assume require set of tables? , how these linked user record, i.e. foreign key be?
1) agree.
table talent_user: - id - user_id - talent_id table subtalent_user: - id - user_id - subtalent_id
2) think answer depends on few factors. if know different forms different talents, keep things simple (as in "don't think hard") , create table each different type of form you'll have. otherwise, may want have 1 table forms , save form data as, say, xml. way preserve structure of original form without having complicated database schema.
Comments
Post a Comment