So I'm getting more and more familiar with MySQL these days. I've been doing frontend development for quite a while now, but I'm just beginning to venture into backend stuff more (very exciting).
As for the question - for a project of mine, I'm asking myself: how should I organize the database so that it makes sense and is as fast as possible?
Let me draw a picture:
- users can sign up (account)
- each user can create multiple "projects" within their account
- each project can contain various single folders, or "project sheets"
- each sheet contains a bunch of data/content.
So how do I best organize the database for this? I'm thinking:
1. table "users"
2. table "projects", which holds all projects across the board and has a field "user" to identify the user ID for this project
3. table "sheets", holding all sheets of every project across the board, assigned to a project with a field "project ID".
Is this the best way to do this? Down to which level do you usally create a separate table for things? I'm open for ideas or suggestions and would appreciate any link on the subject if you have one handy.
Thanks. +rep for good answers.
As for the question - for a project of mine, I'm asking myself: how should I organize the database so that it makes sense and is as fast as possible?
Let me draw a picture:
- users can sign up (account)
- each user can create multiple "projects" within their account
- each project can contain various single folders, or "project sheets"
- each sheet contains a bunch of data/content.
So how do I best organize the database for this? I'm thinking:
1. table "users"
2. table "projects", which holds all projects across the board and has a field "user" to identify the user ID for this project
3. table "sheets", holding all sheets of every project across the board, assigned to a project with a field "project ID".
Is this the best way to do this? Down to which level do you usally create a separate table for things? I'm open for ideas or suggestions and would appreciate any link on the subject if you have one handy.
Thanks. +rep for good answers.