Question

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)

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top