New answers tagged

2

Given your "irregular" data, you might want to look at Magneto (see here and here). Originally designed for the clothing industry which can have many different products with many different attributes. It might just be a fit for your needs. There is a community edition so you can look at the code and (esp.) the database table structures and adapt to your own ...


0

You'll need relational tables with joins; having 142 tables for what you're suggesting is not using the relational aspect of RDBMS systems to their fullest potential. There are a few patterns and practices it will help to learn, and one of them is a many-to-many relationship, which you will probably need. The basics of the schema design can be seen in this ...


0

IMO you should think about how you are going to use the data when you design the database. You shouldn't be scared of joins, they are a fundamental part of how a relational database works. You say items have attributes which can vary with the type of item. In some applications this could be a reason to split the items into different tables but in this ...


-1

Table name: Categories Columns: category_id number(5) not null - primary key category_desc varchar(100) not null Table name: Items Columns: item_id number(5) not null - primary key item_desc varchar(100) not null item_details varchar(2000) not null item_contact_phone varchar(20) not null etc... Table: item_categories item_id number(5) not null ...


4

I would heavily advise you not make 142 tables, it will be a nightmare. But don't necessarily use JSON, either. Instead, you should have one table containing categories, and another table containing the items. Link items to their respective categories by using a foreign key column. Your items table could have a category_id column, for example. Do not store ...


14

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 ...



Top 50 recent answers are included