I am not sure what the most effective way to organize a db for users
is.
I have 40 users (teachers) and 20 tables (grades, assignments,
students, etc).
Each needs access to its OWN grades, assignemnts, etc.
NOW I am not sure how to orgainize users in the DB. Right now I have
the code for 1 user and need to adapt it to several users.
1. A user id in each table and the same db for all users.?
OR
2. A different db with its own set of tables (same names) for each
user.?
Option 1. would be easier for me because it would only involve adding
an id to a the connection string in the include. Option 2, would
require modifying query strings throughout the code in the
application.
However I heard that ISPs usually limit the number of dbases per Mysql
server (don't know why).
On the other hand the dbase per user approach seems to me more
efficient since the number of records in a table is greatly reduced
and each user has access only to its own db.
What is best/common practice in this situation having in mind that the
number of users is limited to around 40 if that makes any diffrence at
all.
Thanks