| |
|
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.
|
 |

10-29-10, 06:40
|
|
Registered User
|
|
Join Date: Oct 2010
Posts: 8
|
|
|
Entity or Relationship Attribute??
|
|
Hi,
I have the following piece of text:
The practice provides various treatments for all types of pets. These treatments are provided at a
standard rate across all clinics. The details of each treatment include a treatment number, a full
description of the treatment, and the cost to the pet owner.
The treatment number uniquely identifies each type of treatment and is used by all clinics. Based on the
results of the examination of a sick pet, the vet may propose one or more types of treatment. For each
type of treatment, the information recorded includes the examination number and date, the pet
number, name and type, treatment number, description, quantity of each type of treatment, and date
the treatment is to begin and end. Any additional comments on the provision of each type of treatment
are also recorded.
So, there are the following (definite) entities:
Clinic
Staff (Vet)
Examination
Pet
Treatment -- Treatment No {PK}, Description, Cost
I am confused however about "Type of Treatment". Could this be another entity? Or could it be part of a relationship as follows:
Examination -- Determines -- Treatment, and in the "Determines" relationship, data is recorded (the examination number and date, the pet
number, name and type, treatment number, description, quantity of each type of treatment, and date
the treatment is to begin and end)
Any help or advice appreciated.
|
|

10-29-10, 07:57
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
|
|
Quote:
Originally Posted by ftl25
I am confused however about "Type of Treatment". Could this be another entity?
|
you betcha
Quote:
|
The treatment number uniquely identifies each type of treatment and is used by all clinics
|
if the clinics are all using the same treatment number, then yeah, treatment type is an entity
|
|

10-29-10, 08:10
|
|
Registered User
|
|
Join Date: Oct 2010
Posts: 8
|
|
|
|
Hi,
Yes, I was thinking that "Type of Treatment" is definitely an entity:
Type of Treatment -- treatment number{PK}, full description of the treatment, cost to pet owner
but it mentions other attributes - For each
type of treatment, the information recorded includes the examination number and date, the pet
number, name and type, treatment number, description, quantity of each type of treatment, and date
the treatment is to begin and end. Any additional comments on the provision of each type of treatment
are also recorded.
Would this imply that there are two entities here: Type of Treatment and, say Pet Treatment?
Pet Treatment -- Exam No {CK}, Date, Pet Number {PK}, Pet Name & Type, Treatment Number {CK}, Description, etc
Or, would the Pet Treatment only arise from an examination, and therefore simply be a bunch of relationship attributes?
|
|

10-29-10, 08:16
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
|
|
you definitely need something to record a pet treatment, so i guess that would ~have~ to be an entity
and while many of its attributes will be relationship attributes, some of them will be unique to each specific incidence
|
|

10-29-10, 09:45
|
|
Registered User
|
|
Join Date: Oct 2010
Posts: 8
|
|
So, anything unique to this specific incidence should be contained within the Pet Treatment entity, and others should be relationship attributes?
E.g., could quantity of each type of treatment be a relationship attribute for the invoice -- Pet Treatment relationship?
The deeper I delve into this the more confused I seem to get 
|
|

10-29-10, 12:46
|
|
Registered User
|
|
Join Date: Oct 2010
Posts: 8
|
|
On second thought, it seems to make more sense that something unique to a specific incidence should be recorded as a relationship attribute, and common items should be entities?
Could anyone clear up the confusion for me?
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|