Wednesday, March 21, 2012

Help needed?

Hi

I'm a newbie to SQL server..... l'm building a website where companies can save important data. I have a SQL server available but I'm not sure how to store the data. Should I create a new database for every user or should I store everything in the same database and then use a UserId to recognize the data and the user?

The data stored for each user are stored in tables which are exactly the same so all tables could be gathered into one table and then a UserId could tell which records belong to whom.

Hope my english isn't too bad..otherwise just ask me questions and I'll get back A.S.A.P.

Regards

Joachim

1 database will support many users. As you suggested, you would create a user table and each user would have an entry there. The primary key of that table (e.g. : UserId) would be used as a Foreign Key in other tables to identify which user owns the data. e.g. : an orders table would have a userId column to specify which user the order belonged to.

Hope this helps.

|||

hi joachim,

thats not a bad english at all.

regarding your question i suggest you take your time

studying the basic database concept such

normalization, entity integrity, domain integrity, relational integrity and bussiness integrity.

its not easy at first but it will help very much in the long run of your database career

regards

joey

No comments:

Post a Comment