473,473 Members | 2,126 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

A set of tables for each user vs one set of large tables

7 New Member
Hi,

This is a pretty basic question I guess but it is one that I cannot decide one way or another on so I thought I should consult people who know much more about databases than me :)

So the problem I am looking at is this - there is a set of tables, around 20-30, which are used by an application with a single user. I am going to be working on converting this application into a multi-user system where each user, in essence, will be using the system independently. This means I need to either create a fresh set of tables for each user when they register to use the system, or I should add a column to each table to filter rows by user_id. I would imagine the number of users will be less than a 1000 and the highest number of rows each user needs in a given table will also be on the same magnitude though these numbers are liable to grow if the system becomes succesful.

I know that the structure of the database should ideally be constant but at the same time I am worried about locks happening since the users are likely to use the system at the same time.

FWIW I am planning on using SQL Server 2008 for this application. Any ideas, hints?

Thank you very much ahead of time and please let me know if anything sounds unclear ;)

Cheers!

ulas
Sep 24 '08 #1
6 1239
iburyak
1,017 Recognized Expert Top Contributor
Create a user_id column for sure.
Can you imagine creating a new set of tables for each user instead of just inserting some records into a table?
You can create an index over the user_id column or combine it with another unique id in this table to make it even more robust. No blocks should be happening if each user should go after his own data only. Server 2008 should be so fast that even if users would go after the same data it should be no problem at all.


Good Luck.
Sep 24 '08 #2
ulas
7 New Member
Thank you so much for the response. As I said earlier, DBMSs are not my specialty so even something as basic as this can raise a question flag (well, may be basic but has huge implications since it affects the design :)).

My main worry was table level locks during (at least) UPDATEs to the table but since that does not seem to be the case, I feel much better about this option.

Thanks again!

ulas
Sep 25 '08 #3
ck9663
2,878 Recognized Expert Specialist
You might also consider enforcing referential integrity.

-- CK
Sep 25 '08 #4
ulas
7 New Member
You might also consider enforcing referential integrity.

-- CK
Do you mean in terms of just the userID columns that I will be adding or in general? I will definitely be enfording referential integrity as this makes logical sense to me in general but what kind of gains am I looking at by enabling this (purely a question of educational pursuit here ;)) ?
Sep 25 '08 #5
ck9663
2,878 Recognized Expert Specialist
So that all the values in UserID on the transaction tables should always be in your UserID reference/lookup table. No need to handle in front-end. This will prevent any orphan record.

-- CK
Sep 25 '08 #6
ulas
7 New Member
So that all the values in UserID on the transaction tables should always be in your UserID reference/lookup table. No need to handle in front-end. This will prevent any orphan record.

-- CK
Oh right right - I meant in terms of performance so I misunderstood you slightly. Thank you for the pointer though :)
Sep 25 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Albretch | last post by:
.. Can you define the Character Set for particular tables instead of databases? . Which DBMSs would let you do that? . How do you store in a DBMS i18n'ed users' from input, coming over the web...
1
by: wireless | last post by:
We recently added a new database at the company. It has only one purpose - to hold massive amounts a daily data generated by telephone calls on a network. The amount of data was so large...
44
by: Mariusz Jedrzejewski | last post by:
Hi, I'll be very grateful if somebody can explain me why my Opera 7.23 (runing under linux) doesn't show me inner tables. Using below code I can see only "inner table 1". There is no problem with...
7
by: ii2o | last post by:
Hi guys, I have a problem where IE is refusing tables to made as hyperlinks. I have some CSS code which makes the background glow if is hovered upon and this works fine both in Firefox and IE....
4
by: Joachim Klassen | last post by:
Hi all, I'm currently investigating the use of MDC Tables for large data warehouse tables. My scenario: A fact table with 1000 Million Rows distributed on 12 Partitions (3 physical hosts...
11
by: dskillingstad | last post by:
I've been struggling with this problem for some time and have tried multiple solutions with no luck. Let me start with, I'm a novice at Access and I'm not looking for someones help to design my...
10
by: Jim Devenish | last post by:
I have a split front end/back end system. However I create a number of local tables to carry out certain operations. There is a tendency for the front end to bloat so I have set 'compact on...
11
by: shriil | last post by:
Hi I have this database that calculates and stores the incentive amount earned by employees of a particular department. Each record is entered by entering the Date, Shift (morn, eve, or night)...
2
TheServant
by: TheServant | last post by:
Hi everybody, I posted a similar question about 6~12 months ago with no definate answer, so I will give it another go, as the choice has popped up again in my programming life: If the number of...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.