Search code examples
mysqldatabase-designnormalization

Clarify normalization with two currently living arrangements


I was reading a document about database normalization: "Nermalization" (sic!). The only thing that I don't see explained is how to deal with a cat who lives at two locations at the same time, or uses two names at the same time.

Here's an example of what I am dealing with: I have a title that lives with ContentID whose recommended distribution seasons are Fall and Spring.

So, do I create a distribution_recommendation_by_contentID table in the normalized section of my database?


Solution

  • If you have only two values (Fall and Spring). i would not create an extra table for only these two values. Otherwise you need always a join statement to retrive the recommendation information which will effect performance of your database.

    If each content has only one distrubution value(like Fall, Spring, etc), it is better to keep in one table.

    The other case is that each content have more than one distrubution value. Let's say Title A has two distrubution value Fall and Winter. Than it makes sense to have an extra table to keep these information(distribution_recommendation_by_contentID).

    If you have a use case that you need to show available distrubution values, then you can create another table for distrubution values and reference id of distrubution values.