mysql - Validate my database relationship? -
can please check , give recommendations on next database design. please ignore actual fields, want more of relationship check. give thanks :)
background
a client can have many pet profiles
1 customer: has many pet profiles pet profile has 1 type (for illustration dog)
a dog has has many attributes sets
height weight
1 attributes set has many pet attribute answers e.g.
weight = 1kg, 2kg, 3kg
give scenario:
a client add together his/her pet. if dog illustration (from pet type) list of questions asked pet type i.e. weight , height. drop downwards pick best match. need compare answers, cannot free text.
update based on suggestions
well looking on makes sense pet type, why not create part of pet profile? isn't same thing? , pet image? in pet profile reason it's not? utilize surrogate key unique identifier, , think correlate little improve pet attributes normalized , in 1 place - oppose 3 separate tables....what think?
essentially correlating client 1 or many pets combination of (petname, pettype, petpic, petattributes, add together lookups pet profile, , pet attributse can search characteristics , profile...
same goes reminder, add together reminder type there? why maintain them separate? going need lot of joins when it's said , done retrieve information...and it's @ individual level, it's not you're rolling up...yet
mysql database database-design
No comments:
Post a Comment