If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > New User - Customer Database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-03-08, 09:38
CPetting CPetting is offline
Registered User
 
Join Date: Oct 2008
Posts: 2
Question New User - Customer Database

Greetings everyone. I'm more or less a brand new MySQL user with a bit of experience with databases. I just recently suggested that the company I'm working for should implement a database to track all their customer information. Well they thought it was a great idea and that I should go ahead...so here I am.

Now I've done the initial design in workbench and attached the diagram and I was really hoping for some advice on how it's looking from some more experienced users.

Essentially the company does a lot of dealing with military bases all over the world (especially Canada and the US).

Just to list some of the issues that I thought were more odd and unique so that people can hopefully understand why I did things certain ways...

1) I considered each military base (could be army, navy, marines, etc. or an independent training facility, police headquarters, RCMP base, etc.) a separate company which can have multiple contacts within in...each contact could be ordering for just their squad, unit, etc.

2) The company wants to keep track of current contacts, but, invoices (or quotes or RMAs) sent out in the past should maintain the specific contacts/addresses they were ordered by/shipped to.

3) An invoice should contain a list of all parts included on it as well as the quatity and the price it was sold to in that instance.

4) An invoice can have one address for the person doing the purchasing and one for where it's going

5) They want the ability to add random notes about a certain contact/company


And a couple of my concerns...

1) I have no idea what I'm doing when it comes to identifying/non-identifying relationships....

2) Not sure if a customer can place an order with out a specific person being responsible... (ie. relating tblInvoice to tblCustomer instead of/as well as tblContact)


Anyway, sorry if this is a lot but I really appreciate any help anyone can offer up.
Attached Thumbnails
New User - Customer Database-customerdb.jpg  
Reply With Quote
  #2 (permalink)  
Old 10-03-08, 10:05
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
your model looks fine

you need not worry about identifying/non-identifying (unless this is a homework assignment)

i dodn't understand the difference between a solid line and a dotted line

i really dislike your naming convention for tables and foreign keys, but hey, whatever floats your boat

what's an RMA?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 10-03-08, 10:14
CPetting CPetting is offline
Registered User
 
Join Date: Oct 2008
Posts: 2
The dotted line represent non-identifying relationships and the solid lines represent (you guessed it) identifying ones.

I'm not sure where my naming convention came from...I used Access a bit years ago so maybe it's from there??

An RMA is a returned merchandise authorization...similar to an invoice in form but without prices, it is always coming to us and requires a reason for return on each part involved.


I've also recently made a slight change and added a recursive one-to-one relationship on tblInvoice. tblInvoice is used for quotes as well as invoices and this is to add the ability to link an accepted quote to its corresponding invoice.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On