Quantcast

Scutinize My Database

canadmos

Cake Tease
May 29, 2011
20,188
19,155
Canaderp
Hello Techmonkies.

I am in the process of setting up a new website, and yesterday I took at stab at laying out the database model. It is a Mysql database for what it is worth.

I figure before asking any DBA's and being embarrassed by what they say, I'd ask here first. So feel free to tell me to toss the design in the garbage and start over, etc etc. I am open to any suggestions at all...

database_design_2.png

So bored at work......

:edit: Yep I fudged up the speeeelling on the thread title and can't change it :(
 
Last edited:

StiHacka

Compensating for something
Jan 4, 2013
21,560
12,504
In hell. Welcome!
It is hard to comment on a data structure without knowing what your intentions with it are, but I would rethink the relationships between users, parks and park rides.
 

canadmos

Cake Tease
May 29, 2011
20,188
19,155
Canaderp
Oh yeah, I guess that would help.

It is for a simple website that users of a certain simulator program can use to share their projects on. Basically information for their different projects and a space to upload screenshots to.

The basic flow will be for the users to register and after that they will have a user profile page of some sort. This will list the "Parks" that they have created.

Their "Parks" will contain 1 or more "park_ride" records. And then each "park_ride" record will have its own "ride_attributes" record.

Are you hinting that the "park_rides" table records should also have a reference to the "users" table?
 

StiHacka

Compensating for something
Jan 4, 2013
21,560
12,504
In hell. Welcome!
Now I see that without the information you have just added, my answer was completely bogus. The user-park-ride looks fine now. What do you plan to do with the versions of the parks? Do you really have to place rides' metadata to a dedicated table?
 

canadmos

Cake Tease
May 29, 2011
20,188
19,155
Canaderp
Sweet. The version field in the parks table is actually just the version of the simulator software used to create it, not the version of the park itself.

Ah, now that you mention it, that ride metadata really doesn't need to be in its own table, if it is unique data in the first place? That would make my queries down the road a lot longer too.