×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Simple SQL/Database RDBMS Schema - Beginner Level - What Do You Think?

Simple SQL/Database RDBMS Schema - Beginner Level - What Do You Think?

Simple SQL/Database RDBMS Schema - Beginner Level - What Do You Think?

(OP)
First of all, i'm glad to be part of your forum members! Hi to everybody...

****************************************

* represents primary key

As far as i see, this design is good. I need your confirmation I followed 1NF, 2NF, 3NF, and one to many relationships guidelines.

-Seller Table {*SellerID (number), first name (text), last name (text), address (text), city (text), CountryID (foreign key), phone number (text), date hired (date)}

-Customer Table {*CustomerID (number), first name (text), last name (text), address (text), city (text), CountryID (foreign key), SellerID (foreign key) }

-Car Table {*CarID (number), manufacturer (text), model (text), car year (text) }

-Purchased Car Table {*CarID (foreign key), *CustomerID (foreign key), date purchased (date)}

-----

These tables have multivalued fields...

Country Table {*CountryID (number), country name (text)}

A customer can store several phone number (home, cell, work):

Phone Table {*PhoneID (number), CustomerID (foreign key), phone number (text)}

RE: Simple SQL/Database RDBMS Schema - Beginner Level - What Do You Think?

change this --

Phone Table {*PhoneID (number), CustomerID (foreign key), phone number (text)}

to this --

Phone Table {*CustomerID (foreign key), *phone number (text)}

if you don't understand why, pls ask

r937.com | rudy.ca
Buy my new book Simply SQL from Amazon

RE: Simple SQL/Database RDBMS Schema - Beginner Level - What Do You Think?

(OP)
Phone Table {*CustomerID (foreign key), *phone number (text)}

This is one to one relationship, so every customer will have three records since every customer will have to store 3 phone numbers (cell - home - work).

Assuming it is a must for a customer to store 3 numbers.

RE: Simple SQL/Database RDBMS Schema - Beginner Level - What Do You Think?

actually, it's a one-to-many relationship

each customer can have many phone numbers

r937.com | rudy.ca
Buy my new book Simply SQL from Amazon

RE: Simple SQL/Database RDBMS Schema - Beginner Level - What Do You Think?

(OP)
One to one relationship shares same primary key. Phone Table {*CustomerID (foreign key), *phone number (text)}, here phone table and customer table share same primary key!

I'm thinking to get your ebook in the near future. I'm little bit overwhelmed with what i have right now.
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close