Results 1 to 8 of 8
  1. #1
    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.

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    You only have to read the very first sentence of the first paragraph to see that your first deduction is wrong.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    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!

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    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:
    pootle flump
    ur codings are working excelent.

  5. #5
    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 04:55.

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    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:
    pootle flump
    ur codings are working excelent.

  7. #7
    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 04:55.

  8. #8
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    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:
    pootle flump
    ur codings are working excelent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •