1 Replies - 487 Views - Last Post: 17 September 2017 - 09:44 AM Rate Topic: -----

#1 dbwhitman  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 12-September 17

Is my erd database already normalized?

Posted 12 September 2017 - 06:48 AM

Hi, I'm currently learning on how to design a database and also some basic sql commands. I'm trying to design a database for a complaint system of a hotel.

In the employee table, an employee creates the ticket of complaint also an employee is also responsible for responding the ticket.
is it right that i put a emp_respond and emp_create field value in the ticket even if I don't have a employee_Respond and employee_create table?

Posted Image

Is This A Good Question/Topic? 0
  • +

Replies To: Is my erd database already normalized?

#2 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 5074
  • View blog
  • Posts: 13,697
  • Joined: 18-April 07

Re: Is my erd database already normalized?

Posted 17 September 2017 - 09:44 AM

Yes that is perfectly valid. Keep in mind of the entities here. On a ticket if you have an emp_create and emp_updated those are both going to be foreign keys to the employees. They may be the same ID or most cases be different. But how you have modeled it is exactly how you would model such a scenario as you described. Now if you had a situation where a ticket keeps track of multiple employees who modify a ticket, then you would be in a many to many relationship and would need to implement a joining or "junction" table. Because you will need a way to relate a single ticket to multiple employees and an employee could modify multiple tickets.

Right now you have a one to one relationship going from the ticket. One and only 1 employee can modify or create the ticket. So you are good. :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1