Find the answer to your Linux question:
Results 1 to 2 of 2
If I have an e-commerce website say, and I want to store Books, under, say, "Crime" or "comedy", what's the best way to model this type of thing on a ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Mar 2013
    Posts
    332

    How to model "categories" and "subcategories" on a MySQL database?


    If I have an e-commerce website say, and I want to store Books, under, say, "Crime" or "comedy", what's the best way to model this type of thing on a MySQL DB?


    THanks.

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,874
    This fits the subject of First Normal Form (1NF) very well. More reading for you, I'm afraid, but this is something that it's worth knowing if you're going to be doing data/database design more than this once.

    https://en.wikipedia.org/wiki/First_normal_form

    Putting a Database in First Normal Form
    Linux user #126863 - see http://linuxcounter.net/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •