Results 1 to 4 of 4

Thread: for experts about operations to data access in ER diagram

Hybrid View

  1. #1
    Join Date
    Jan 2020
    Posts
    3

    for experts about operations to data access in ER diagram

    If I have ER schema where I have:

    2 entity: Room, Hotel
    1 relationship: Link
    Cardinality about Room side is (1:1) each room belongs only to one hotel
    Cardinality about Hotel side (1:N) each hotel can have more than one
    Hotel has code attribute as primary key.
    Room has foreign key: room number attribute + hotel code.

    see: https://ibb.co/f471m9Q

    My doubt is about operation to evaluate performance database before to migrate to logical model, infact this step is necessary during ER restructuring.
    My question:

    I have hotel code (e.g. hotel Europe) and I need to know what rooms numbers are in that hotel, I have to access only to relationship "link" or I need to access to Room entity too?
    I'd like to understand if, at level ER diagram, "link" relationship contains number attribute too. Thanks

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,922
    Is Room Number an attribute of Room entity?

  3. #3
    Join Date
    Jan 2020
    Posts
    3
    Quote Originally Posted by skhanal View Post
    Is Room Number an attribute of Room entity?
    Yes, It is.

    ers.PNG

  4. #4
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,922
    In ER diagram, link does not tell you about attributes, so you have to read Room entity for Room number. When you convert this to physical model, there is no physical representation for 1-1 and 1-m relations.

Posting Permissions

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