Hello all, I am new to database design and was wondering if someone would look at my ERD to see if I have my relationships correctly identified along with foriegn keys as well. If it is not correct could someone point me in the right direction to correct my mistakes. Thanks in advance.

ERD02.doc

  • Customer last name is not a good key: Too many 'Smith' or the like. Most groceries seem to use phone number, which is better than some generated ID, and probably does a decent job of grouping people appropriately
  • Why does each customer have a hard attachment to an employee? Don't you want a join table for that? What happens when the employee is not there when the customer is?
  • Same issue for products with location: Most stores have products in at least two places (one is the storage area), and many have at least some product in several sales locations (chips by the beer AND by the soda pop...)
  • Same for the register with employee, if it is tied to a physical register, then various shifts have the same register with different sales clerks (on the other hand, if the whole thing is software, then you don't need a register at all: Each employee logs in to the system and the terminal is 'their register' when they use it to deal with a sale.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.