Skip to main content
Commonmark migration
Source Link

I am creating a conceptual database model for a car dealership. I have spoken to the client, gathered all the requirements, and thought I had my Entity-Relationship diagram all correct; however, I realised I have no idea how to represent the requirements that I will detail bellow.

#Scenario description#

Scenario description

The dealership offers vehicle inspections and servicing and repairs. When this happens, a service ticket is generated. A service ticket belongs to a customer, is related to a vehicle, and has the following requirements (this is the part I can't figure out how on earth to draw):

  • A service ticket may contain either one or more services (identified as an entity type), inspections (recognized as an entity type) and/or repairs (classified as an entity type).

#Questions#

Questions

Having described my context of interest:

  • Could someone please point me in the right direction for how to model a relationship, and how it might be maintained in a database, where a given ServiceTicket must be related to, at least, one specific Service, one particular Inspection and/or one determined Repair, yet may also contain multiple instances of these kind of entities?

  • How do I express that a ServiceTicket might contain zero occurrences of all three of these entity types, but has to contain at least one of them?

This problem has been doing my head in. Initially, I defined a cardinality of zero-to-many between a ServiceTicket and the three of them, but realised that such depiction does not mean it must be connected with at least one of the three. My textbook does not seem to provide any answers for this diagram and I feel that to be a good DBA I must know how to represent this.

I am creating a conceptual database model for a car dealership. I have spoken to the client, gathered all the requirements, and thought I had my Entity-Relationship diagram all correct; however, I realised I have no idea how to represent the requirements that I will detail bellow.

#Scenario description#

The dealership offers vehicle inspections and servicing and repairs. When this happens, a service ticket is generated. A service ticket belongs to a customer, is related to a vehicle, and has the following requirements (this is the part I can't figure out how on earth to draw):

  • A service ticket may contain either one or more services (identified as an entity type), inspections (recognized as an entity type) and/or repairs (classified as an entity type).

#Questions#

Having described my context of interest:

  • Could someone please point me in the right direction for how to model a relationship, and how it might be maintained in a database, where a given ServiceTicket must be related to, at least, one specific Service, one particular Inspection and/or one determined Repair, yet may also contain multiple instances of these kind of entities?

  • How do I express that a ServiceTicket might contain zero occurrences of all three of these entity types, but has to contain at least one of them?

This problem has been doing my head in. Initially, I defined a cardinality of zero-to-many between a ServiceTicket and the three of them, but realised that such depiction does not mean it must be connected with at least one of the three. My textbook does not seem to provide any answers for this diagram and I feel that to be a good DBA I must know how to represent this.

I am creating a conceptual database model for a car dealership. I have spoken to the client, gathered all the requirements, and thought I had my Entity-Relationship diagram all correct; however, I realised I have no idea how to represent the requirements that I will detail bellow.

Scenario description

The dealership offers vehicle inspections and servicing and repairs. When this happens, a service ticket is generated. A service ticket belongs to a customer, is related to a vehicle, and has the following requirements (this is the part I can't figure out how on earth to draw):

  • A service ticket may contain either one or more services (identified as an entity type), inspections (recognized as an entity type) and/or repairs (classified as an entity type).

Questions

Having described my context of interest:

  • Could someone please point me in the right direction for how to model a relationship, and how it might be maintained in a database, where a given ServiceTicket must be related to, at least, one specific Service, one particular Inspection and/or one determined Repair, yet may also contain multiple instances of these kind of entities?

  • How do I express that a ServiceTicket might contain zero occurrences of all three of these entity types, but has to contain at least one of them?

This problem has been doing my head in. Initially, I defined a cardinality of zero-to-many between a ServiceTicket and the three of them, but realised that such depiction does not mean it must be connected with at least one of the three. My textbook does not seem to provide any answers for this diagram and I feel that to be a good DBA I must know how to represent this.

Tweeted twitter.com/StackDBAs/status/710269595463106562
Made some rewordings, changed title, modified format and added pertinent tag.
Source Link
MDCCL
  • 8.5k
  • 3
  • 31
  • 62

Modeling a Car Dealership context in an Entity Relationship Diagram - No idea how to represent thisRelationship diagram

I am creating a conceptual database model for a car dealershipcar dealership. I have spoken to the client and, gathered all the requirements, and thought I had my EREntity-Relationship diagram all correct,correct; however, I realised I have no idea how to represent the following requirements:- that I will detail bellow.

#Scenario description#

The dealershipdealership offers vehicle inspectionsvehicle inspections and servicingservicing and repairsrepairs. When this happens, a service ticketservice ticket is generated. A service ticketservice ticket belongs to a customercustomer, containsis related to a vehiclevehicle, and has the following requirements (this is the part I can't figure out how on earth to draw):-

  • A service ticketservice ticket may contain either one or more servicesservices (entityidentified as an entity type), inspectionsinspections (entityrecognized as an entity type) and/or repairs repairs (entityclassified as an entity type).

Could someone please point me in the right direction for how to model a relationship, and how it might be maintained in a database, where a serviceTicket entity must contain at least one service entity, one inspection entity and/or one repair entity, yet may also contain zero or many of these entities? How do I say that a service ticket might contain zero of all three of these entities, but has to contain at least one#Questions#

Having described my context of them?interest:

  • Could someone please point me in the right direction for how to model a relationship, and how it might be maintained in a database, where a given ServiceTicket must be related to, at least, one specific Service, one particular Inspection and/or one determined Repair, yet may also contain multiple instances of these kind of entities?

  • How do I express that a ServiceTicket might contain zero occurrences of all three of these entity types, but has to contain at least one of them?

This problem has been doing my head in. Initially, initially I just had 0..* for alldefined a cardinality of zero-to-many between a ServiceTicket and the three of them, but realised that doesn'tsuch depiction does not mean it must containbe connected with at least one of the three. My textbook doesn'tdoes not seem to provide any answers for this diagram and I feel that to be a good DBA I must know how to represent this. Thank you in advance for any assistance, sorry if this is confusing!

Entity Relationship Diagram - No idea how to represent this

I am creating a conceptual database model for a car dealership. I have spoken to the client and gathered all the requirements, and thought I had my ER diagram all correct, however I realised I have no idea how to represent the following requirements:-

The dealership offers vehicle inspections and servicing and repairs. When this happens, a service ticket is generated. A service ticket belongs to a customer, contains a vehicle, and has the following requirements (this is the part I can't figure out how on earth to draw):-

  • A service ticket may contain either one or more services (entity), inspections (entity) and/or repairs (entity)

Could someone please point me in the right direction for how to model a relationship, and how it might be maintained in a database, where a serviceTicket entity must contain at least one service entity, one inspection entity and/or one repair entity, yet may also contain zero or many of these entities? How do I say that a service ticket might contain zero of all three of these entities, but has to contain at least one of them?

This problem has been doing my head in, initially I just had 0..* for all three of them, but realised that doesn't mean it must contain at least one of the three. My textbook doesn't seem to provide any answers for this diagram and I feel that to be a good DBA I must know how to represent this. Thank you in advance for any assistance, sorry if this is confusing!

Modeling a Car Dealership context in an Entity-Relationship diagram

I am creating a conceptual database model for a car dealership. I have spoken to the client, gathered all the requirements, and thought I had my Entity-Relationship diagram all correct; however, I realised I have no idea how to represent the requirements that I will detail bellow.

#Scenario description#

The dealership offers vehicle inspections and servicing and repairs. When this happens, a service ticket is generated. A service ticket belongs to a customer, is related to a vehicle, and has the following requirements (this is the part I can't figure out how on earth to draw):

  • A service ticket may contain either one or more services (identified as an entity type), inspections (recognized as an entity type) and/or repairs (classified as an entity type).

#Questions#

Having described my context of interest:

  • Could someone please point me in the right direction for how to model a relationship, and how it might be maintained in a database, where a given ServiceTicket must be related to, at least, one specific Service, one particular Inspection and/or one determined Repair, yet may also contain multiple instances of these kind of entities?

  • How do I express that a ServiceTicket might contain zero occurrences of all three of these entity types, but has to contain at least one of them?

This problem has been doing my head in. Initially, I defined a cardinality of zero-to-many between a ServiceTicket and the three of them, but realised that such depiction does not mean it must be connected with at least one of the three. My textbook does not seem to provide any answers for this diagram and I feel that to be a good DBA I must know how to represent this.

Source Link
AndrewS
  • 103
  • 5

Entity Relationship Diagram - No idea how to represent this

I am creating a conceptual database model for a car dealership. I have spoken to the client and gathered all the requirements, and thought I had my ER diagram all correct, however I realised I have no idea how to represent the following requirements:-

The dealership offers vehicle inspections and servicing and repairs. When this happens, a service ticket is generated. A service ticket belongs to a customer, contains a vehicle, and has the following requirements (this is the part I can't figure out how on earth to draw):-

  • A service ticket may contain either one or more services (entity), inspections (entity) and/or repairs (entity)

Could someone please point me in the right direction for how to model a relationship, and how it might be maintained in a database, where a serviceTicket entity must contain at least one service entity, one inspection entity and/or one repair entity, yet may also contain zero or many of these entities? How do I say that a service ticket might contain zero of all three of these entities, but has to contain at least one of them?

This problem has been doing my head in, initially I just had 0..* for all three of them, but realised that doesn't mean it must contain at least one of the three. My textbook doesn't seem to provide any answers for this diagram and I feel that to be a good DBA I must know how to represent this. Thank you in advance for any assistance, sorry if this is confusing!