?
Solved

Sql Server Database Design ,ER and Normalization

Posted on 2011-02-25
12
Medium Priority
?
399 Views
Last Modified: 2012-05-11
Hi Everyone,

I have a task to design a database (sql server) , i have 65 fields identified.

some one give me a lead,how to approach and what are all the stuff i have to take care.

Thanks in Advance !
0
Comment
Question by:Sha1395
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
12 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 34978360
Start with:
Create separate tables for each group of related data and identify each row with a unique column or set of columns (the primary key).


Database Normalization Basics
http://databases.about.com/od/specificproducts/a/normalization.htm
0
 

Author Comment

by:Sha1395
ID: 34978379
Hey Dhaest,

Nice to get an answer from you promptly,am glad you are expertise in Sql Server also.

I have a question

1) how can i identified which field goes to which group (ofcourse , Employee details goes to employee table) but similar kinda field what i suppose to do ?
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 34978395
That's very hard to tell without really knowing what kind of system you are developing, what fields you want to update. I usually try to determine to see which fields are logically grouped, so that the crud-screens (update/delete/insert are mostly for 1 table)
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:Sha1395
ID: 34978568
is this anyway i can send the mapping fields,privately ?
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 34978615
Why not post them here ? It are just names of columns ... (no private data)
0
 

Author Comment

by:Sha1395
ID: 34978643
you are right,i was keep on thinking am posting the data also.

here you go...attached xls file.

basically i wanna create a ER diagram, then i will go and create a table (table is identified also) but i have to do normalization.

Based on your answer i will start walking on your path
To-DHAEST.xls
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 34978672
Perhaps you can create another table witht the regional attributes, like city code, city name, state, postcode, country.

You can link this table in your home address fields and in your job data fields
0
 

Author Comment

by:Sha1395
ID: 34978709
very valid point,so basically i will create another table (regional table) (fields : city cod,name,state,count and Zip)

Map with Home and Job tables.

Great !

what's the logic to create an ER diagram. bcoz already you know i got the tables and fileds and i have to add this new table also.
0
 
LVL 53

Accepted Solution

by:
Dhaest earned 2000 total points
ID: 34978729
To create an ERD, there are several possibilities. You can use design-programs (like visio) or sometimes you can do this in your database directly

Example access: http://databases.about.com/cs/specificproducts/g/er.htm
0
 

Author Comment

by:Sha1395
ID: 34993360
Hi Dhaest,

based on your suggestion Created ER diagram,please advice how can i improve my ER diagram
ER-Diagram.pdf
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 34994843
Some small remarks:
1. Why use the countryCode in your job_tbl ? I think that the job is linked to a location (location_tbl), so you can retrieve the country though that way

2. The communication table can be easier (smaller in space), by fe using a spearate table communicationType (commTypeId, commType) whare you store fe (1, 'phone private' - 2, 'phone public' - 3, 'cellphone' - 4, 'email public', ...) In your communication_tbl, you just need (commCode, commType, value (where you really store the emailaddress, phonenumber, ....)

3. Another remark about communications: in your ERD, the person can only have 1 communicatinoCode, so remove the communicationCode from your person_tbl and store the personID in the communication_tbl. If you do so, you can store more communucations for your person.
If you think further than that, you can even add a column CompanyID in the communicaton_tbl, so that you can also add email, phone's of company's in that table
(and evern furhter thinking: just add one id to the table, fe linkedid, which can refer to the table person or company)

0
 

Author Comment

by:Sha1395
ID: 34995757
1. Why use the countryCode in your job_tbl ? I think that the job is linked to a location (location_tbl), so you can retrieve the country though that way.

True,the reason i used country code to retrieve the Currency not for location.is that make sense ?


I will modify the Communication Table based on your suggestion.Apart from that is this anything else i have to change ?

Thank you so much for your suggestion
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question