SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 1-1 relation
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

7 Posts

Posted - 08/26/2012 :  23:08:45  Show Profile  Reply with Quote
Hello everyone,

I am starting to study DB, and I read on the document that: "having two separate tables in a one-to-one relationship is considered bad practice."

But I have a requirement of designing of CUSTOMER as below:
- Customer have Membership Card ID
- Membership Card depends on Customer Type

So that I create 3 tables as below:

- Customer table (Customer_ID, Customer_FirstName, Customer_LastName, Customer_Address, Customer_City, Customer_Phone, Customer_Email, Membership Card) | Customer ID = PK

- Membership Card (MemberCard_ID, MemberCard_Type, MemberCard_IssueDate) | MemberCard_ID = PK

- Membership Type (MembershipType_ID, MembershipType_Description, MembershipType_Discount) | MembershipType_ID = PK

So, the Membership Type have 1-Many with Membership Card
And, Customer have 1-1 with Membership Card

In my mind, I think it ok, but because the lecture show that 1-1 is not good for DB design. How can I make my 3 table better design?


The Chadinator

1974 Posts

Posted - 08/26/2012 :  23:52:06  Show Profile  Visit chadmat's Homepage  Reply with Quote
Looks correct to me, not sure why this would be bad practice?

Go to Top of Page

Starting Member

7 Posts

Posted - 08/27/2012 :  00:07:17  Show Profile  Reply with Quote
Thanks Chadmat :)
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000