I\'m creating a user-based website. For each user, I\'ll need a few MySQL tables to store different types of information (that is, userInfo, quotesSubmitted, and ratesSubmit
Neither. You create a single database with a single table for each type of data, then use foreign keys to link the data for each user together. If you had only a few, fixed users, this wouldn't be so bad, but what you're suggesting is simply not at all scalable.
Use one database.
Use one table to hold users and one table to hold quotes.
In between those two tables you have a table that contains information to match users to quotes, this table will hold the rating that a user has given a quote.
This simple design will allow you to store a practically unlimited number of quotes, unlimited users, and you will be able to match up each quote to zero or more users and vice versa.
The table in the middle will contain foreign keys to the user and quote tables.
You might find it helpful to review some database design basics, there are plenty of related questions here on stackoverflow.
Start with these...
What is normalisation?
What is important to keep in mind when designing a database
How many fields is 'too many'?
More tables or more columns?
Your design is flawed.. You should constrain the tuples using foreign keys to the correct user, rather than adding new entities for each account.
we've got a similar system, having many users and their relevant datas. We've followed a single database and common tables approach. This way you would have a single table holding user information and a table holding all their data. Along with the data we have a reference to the userid which helps us segregate the information.
One table with properly created indexes per each required entity set (one table for submitted quotes, one table for submitted rates).
CREATE TABLE quotesSubmtited (
userid INTEGER,
submittime DATETIME,
quote INTEGER,
quotedata INTEGER,
PRIMARY KEY (userid, submittime),
FOREIGN KEY quote REFERENCES quotesList (quoteId),
FOREIGN KEY userid REFERENCES userList (userId)
);
CREATE INDEX idx1 ON quotesSubmitted (quote);
Remember: more indexes you create, slower the updating. So take a closer look at what you use in queries and create indexes for that. A good database optimization tutorial will be of invaluable help in understanding what indexes you need to create (I cannot summarize it in this answer).
I also presume you don't know about JOINs and FOREIGN KEYs so make sure you read about them as well. Quite useful!
Use one database and one table. You will require a table "User" and this table will be linked (Primary--Foreign key) to these table.