r/DatabaseHelp • • Dec 18 '15

Is this database structure designed efficiently?

Its a little hard to explain but bear with me.

I need to setup a DB where users can create categories within categories and inside the categories are multiple objects with multiple different stats

hierarchy example:

Cartoon > category

Simpsons > category (within the cartoon category)

Homer > object

Homer object stats > stupidity: 117

Homer object stats > color: yellow

I cant just make a table like:

-----------------------------
|character| Stupidy | color | 
-----------------------------
|Homer    | 111     |yellow |

Because i need the users to be able to take away and add different object stats on their own (like add a stat of weight and remove color stats) for each object the stat types will be different plus with thousands of categories i don't want thousands of tables being generated by the users for the different objects.

My DB setup is in the google spreadsheet below which I feel works but I'm not the best with DB setups so I'm checking if there are some improvements.

I need to be able to display tables from the data displaying all item values that have a relationships with certain categories and/ or objects e.g. all simpsons characters weights or just homers weight.

google spreadsheet with my db setup

2 Upvotes

11 comments sorted by

View all comments

Show parent comment

2

u/PMmeDatAnime Dec 21 '15

Thanks, i thought this would be a problem as well. I'll look into having 2 separates columns, one for text and another for intigers