SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard frank1's Avatar
    Join Date
    Oct 2005
    Posts
    1,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Database design,ER and weak entity

    Well,
    What technique do you use to identify a weak entity type or relation while creating an er diagram

    normally rough defination says
    entity which is dependent on other entity to exist
    and not having unique identifier of itself(only partial key)

    but i am little bit confused as if we go by defination
    in ecommerce system isn't orders a weak entity as it is meaning less with out customers or there is customer id as a foreign key in order table to uniquely identify it.
    what about hotels and rooms.....
    (room may have id but it is dependent upon hotel for existence)

    so am i missing something in way i am thinking?

    can there be weak relationship with out weak entity?

    thanks

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,016
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    there cannot be a relationship without a foreign key, so the presence of the foreign key is a given

    the only remaining question is whether the foreign key is part of the primary key, or separate

    an orders table, for example, typically has its own primary key, so customers-orders is not a weak relationship
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

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