Solved

Sql Server Database Design ,ER and Normalization

Posted on 2011-02-25
12
395 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Server Error 11 58
Turn on intranet settings 1 57
SQL Exceptions 3 46
Service Controller 1 23
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…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

822 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