Solved

Sql Server Database Design ,ER and Normalization

Posted on 2011-02-25
12
394 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
  • 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

896 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now