Skip to main content
1 of 2
Daniel Hutmacher
  • 9.1k
  • 1
  • 26
  • 52

You should definitely (in my opinion) not have 142 tables - it'll be a complete mess to name, index and maintain, and you'll generate yourself a lot of extra work if you some day add another category, if you need to move ads from one category to another, etc.

Storing JSON blobs in the database will kill performance when you're performing searches, so I wouldn't go with that either.

A good relational table design (yes, with joins) is really the best approach when you're using a relational database system. For instance, one table with categories (12 records), joined to one table with items (142 records), joined to a table of ads/items.

Daniel Hutmacher
  • 9.1k
  • 1
  • 26
  • 52