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 > General > Database Concepts & Design > Help with identifying entities

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-27-10, 09:49
ftl25 ftl25 is offline
Registered User
 
Join Date: Oct 2010
Posts: 8
Help with identifying entities

Hi,

I have the following paragraph:

The pet owner is responsible for the cost of the treatment given to a pet. The owner is invoiced for the treatment arising from each examination, and the details recorded on the invoice include the invoice number, invoice date, owner number, owner name and full address, pet number, pet name, and the details of the treatment given. The invoice provides the cost for each type of treatment and the total cost of all treatments given to the pet. Additional data is also recorded on the payment of the
invoice, including the date the invoice was paid and the method of payment (for example, check, cash, visa). The invoice number is unique throughout the practice.


From this I have deduced that there are two entities; the invoice and the payment of the invoice. Can anyone advise me if this is correct?

Also this paragraph:

Each clinic also maintains a stock of pharmaceutical supplies (for example, antibiotics, pain killers). The details of pharmaceutical supplies include a drug number and name, description, dosage, method of administration, quantity in stock (this is ascertained on the last day of each month), reorder level, reorder quantity, and cost. The drug number uniquely identifies each type of pharmaceutical supply. The drug number is unique for each pharmaceutical supply and used throughout the practice.

From this I have deduced that there are two entities; the pharmaceutical supplies, and the order. Or could the maintenance of pharmaceutical supplies simply depend on the reorder level as a relationship attribute?

Any help appreciated.
Reply With Quote
  #2 (permalink)  
Old 10-27-10, 10:02
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
You only have to read the very first sentence of the first paragraph to see that your first deduction is wrong.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #3 (permalink)  
Old 10-27-10, 10:11
ftl25 ftl25 is offline
Registered User
 
Join Date: Oct 2010
Posts: 8
So, would that mean that there is simply Pet Owner, Invoice, and a payment relationship which has Method of Payment and Date of Payment attributes?

Pet Owner -- pays -- Invoice, on a particular date with a particular method of payment

And how about the second part of the question? Was I right in thinking that it is two entities or is it a similar case to the first?

Many thanks!
Reply With Quote
  #4 (permalink)  
Old 10-27-10, 10:21
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Yes that sort of thing. You are still missing a further entity from that first sentence. You are focusing immediately on the complex entities when there are some really rudimentary entities to consider.

The second is still not there but you are closer. Concentrate on one thing at a time - they are not really dependent on each other.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #5 (permalink)  
Old 10-27-10, 10:40
ftl25 ftl25 is offline
Registered User
 
Join Date: Oct 2010
Posts: 8
Ok,

I think I know what you mean from the first paragraph - there is the Treatment entity? I have a large piece of text to go through to model the ER diagram. I think I have all the major entities, and I am left with some of the more complex ones to work out.

So, for the second part:



A Clinic -- maintains -- Pharmaceutical Supplies depending on the reorder level on the last day of the month? (relationship attributes = reorder level, date?)

or

Pharmaceutical Supplies is an entity with all the drug details
Order is another entity with reorder level, reorder quantity, cost?

The more obvious ones are fine for me, but I find some of the more complex ones confusing.

Last edited by ftl25; 10-28-10 at 03:55.
Reply With Quote
  #6 (permalink)  
Old 10-27-10, 10:47
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
The only requirement here is that you do your own homework. We nudge and hint, but we don't do it for you. You are not like this, but a lot demand there homework be completed for them, and so there are a lot of jaded souls on the forums.
Quote:
Originally Posted by ftl25 View Post
The more obvious ones are fine for me
There's still an absolutely blindingly obvious one yet to be mentioned. However, this entity will become apparent as you move through normalisation (3rd normal form specifically).

It's probably time to start building your diagram. The process of normalisation will help solidify a lot of this for you.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #7 (permalink)  
Old 10-27-10, 11:01
ftl25 ftl25 is offline
Registered User
 
Join Date: Oct 2010
Posts: 8
Yes, Examination? What I'm really trying to find out is if there any definite way (or good indicator) to tell if something should be an entity or simply some part of a relationship?
I know some rules - like an entity should exist on its own and should be thought of as an object - but again - in my mind I can apply this to some descriptions, but also think that the description is of a relationship, and this is where the line blurs for me.

I have started with the diagram, and I have something like 11 entities already with many of the relationships already implemented.

Last edited by ftl25; 10-28-10 at 03:55.
Reply With Quote
  #8 (permalink)  
Old 10-27-10, 11:17
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Work through the normalisation process. Normalisation typically results in decomposition of entities. I think it would actually be a good thing not to identify the entity now and find it via normalisation.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
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