문제

My database design skills are a little rusty. I've done the best I can but have no way of knowing if what I've produced is good, bad or "good enough".

Could I please have some feedback on my design.

To be more specific: Will this design work sufficiently?

Database will be mySQL.

Thanks. J.

Schema

edit: Some further clarification:

  • A brand may have a category or it may not.

  • The meta table can be filled out without it actually belonging to a model (in cases where the actual model is not known)

도움이 되었습니까?

해결책

Don't know your full needs, so I'm assuming the highlighted notes indicate a well thought out design.

I like most of your conventions, but I'd avoid using camel case for column names for foreign keys and use tablename_columname (i.e. user_id, brand_id, etc...)

If all brands have a category, I'd kill the connection from brand to model. Do all brands have a category? If no, then you're stuck with both foreign keys.

If all models have at least one meta, you can lose the type foriegn key in the model table. You then could also drop the brand foriegn key in the model class as well as the country

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top