SQL Database Structuring Advice


I’ve ran into a logistical problem trying to make the database for this thing, so I’m curious to know what the best way was to go about it

What would be the most efficient way to structure the database? So far, I’ve seen car dealers store a line for each vehicle bought and just associated the user who owns it - I’m assuming this is super inefficient

How would I go about making a single entry for each player so that I can store their items/quantity and retrieve them together?

I’d do something simple like SteamID64, CarUID

I might’ve been confusing in my post, oops! It would be simple if it was a car dealer but I’m creating an inventory where I need quantities.

If it were as easy as the car dealer, I could have a table full of the cars they own in one column, but I have to account for quantities too

id, steamid64, name, entity, quantity

So, for every individual item someone owns, I would create an entry like that? Is this the most efficient approach?

As far as I know, yes.

I know why you might think so but that isn’t inefficient, it’s how you’re supposed to use relational databases

Thank you! SQL’s probably the thing I wanted to learn the least while slowly learning glua :v: