By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,083 Members | 1,957 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,083 IT Pros & Developers. It's quick & easy.

Design of database tables

P: n/a
Dear sir

I have one SQL Server database.
In this database more than 20 tables exists
that their structures is same.
I have two way for design this tables:
1.Create all tables separately(create more than 20 tables)
2.Create one table and separate each group
by type(add column type to table and assign same
value for each group)

What is better solution?
Please help me.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
CJ
From the limited information you present I would say 2 is better. Less
maintenance if the table design changes. Easier selection of data if you
need to present data or compare data on multiple groups.

If there was a reason to create 20 identical tables a better solution might
be to create one table and then 20 views, one for each group.

Perhaps this helps.

CJ
"Homauoon Mahboobi" <hm********@yahoo.com> wrote in message
news:3f*********************@news.frii.net...
Dear sir

I have one SQL Server database.
In this database more than 20 tables exists
that their structures is same.
I have two way for design this tables:
1.Create all tables separately(create more than 20 tables)
2.Create one table and separate each group
by type(add column type to table and assign same
value for each group)

What is better solution?
Please help me.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 20 '05 #2

P: n/a
>> What is better solution? <<

Only you will know!

A specific logical design is entirely dependant upon a specific business
model. It is the entities, relationships among the entities as well as the
functional dependancies among the attributes which determine the 'right' way
of representing them. Simply grouping & regrouping tables, without
understanding the business predicates makes no sense in logical modelling.

By definition a table should represent one entity type. Thus multiple tables
with 'same' structure seems to be a badly designed schema.

--
- Anith
( Please reply to newsgroups only )
Jul 20 '05 #3

P: n/a
Homauoon Mahboobi (hm********@yahoo.com) writes:
I have one SQL Server database.
In this database more than 20 tables exists
that their structures is same.
I have two way for design this tables:
1.Create all tables separately(create more than 20 tables)
2.Create one table and separate each group
by type(add column type to table and assign same
value for each group)


2. sounds more appealing, but I have no problem to envision the case where
this would be the wrong way to go. You need to tell more about your data
model, to get some good answer.

--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.