Hello all, I am currently putting together a database design for a web application I want to build. And I would like your opinions on a few things.
The prototype for this app will have to be written with MySql (and the code in PHP), so if you start talking about specific database things, please let me know if MySql supports that technique.
The application will have users.
1) If I wanted to store info about the users, would it be efficient to give each user a unqiue ID (duh) and then each time a user adds a piece of info the database will store thier UID and the info into a new row.
To show an example, the table might look like this:
1 |001|I am cool
2 |002|I think I rock
3 |001|I love me some coolness
4 |003|Trueness is coolness
5 |002|Rock'n like a hurricane
6 |001|More Info
Of course the UID will relate to that user's profile, which is on another table.
If this table builds to millions of rows is this an efficient way to store this data? By efficient I mean each time I want the app to gather a user's info is the "proper" way to have it stored?
2) Another question, let's say that I want the app to keep a user's recently
queried data "on hand", i.e. useable from page to page. So It can be reused while a user is logged in. Is session variables the only way to go with this???? I would imagine if there were quite a few users this would put a termendous strain on the server.
Well, I will probably have many more questions in the future, thank you for taking the time to read this post, and Thanks more if you can offer any help.