I am going to create a person to person store with Laravel, a website where its users can share and sell their product or their mobile, TV, Computer, Shoes, Shirts, Books, Cars, Bags, Animal, etc.

I am going to create a table named products and other tables about products are, for example, bugs, Animals, Cars, Shirts, Shoes, Computers.

products table:

product_id   |   cat_id     |   title    |   cost    |    timestamp

cars table:

      id     |  product_fk  |     brand   |   model   |    type    |  Fuel  | ...

computers table:

     id     |  product_fk  |     brand   |   type     |    CPU     |  GPU    |  hard_disk  |  ...

I will create other tables with this way.


I want to know

  1. Is there any other way (better and easier) to do this?
  2. What do you think about this structure?

Related posts

Recent Viewed