471,083 Members | 1,207 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,083 software developers and data experts.

Design of database tables

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
3 2014
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
>> 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
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.

Similar topics

43 posts views Thread by grz02 | last post: by
3 posts views Thread by Rushikesh | last post: by
5 posts views Thread by Don Vaillancourt | last post: by
3 posts views Thread by MorrganMail | last post: by
5 posts views Thread by rdemyan via AccessMonster.com | last post: by
2 posts views Thread by existential.philosophy | last post: by

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.