Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2011
    Posts
    2

    How to translate the ER model in the relational model

    How should look a relational model for example in Figure

    Person(id(pk),..)
    City(idc(pk),....)
    Attached Thumbnails Attached Thumbnails DCIDb.gif  

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Without some insight into what you've covered in class so far, we're more likely to lead you astray than to do your homework assignment correctly. Of course we aren't all that likely to do your assignment correctly anyway, but that is beside the point.

    If you can give us the URL for your assignment or your instructor's email address, we could do a much better job helping you.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Jan 2011
    Posts
    2
    OK, like I said, for a given ER model is necessary to make a SQLServer db.
    here we have two entities:
    Person and City with attributes:

    Person (personID, name, height)
    City (CityID, zipcode, cityname, population)

    and relationship:
    person -> born in -> City
    person -> live in-> City

    Can this be done in next way:

    Person (#personID, name, height, $CityID, $place_of_birth_ID, $place_of_residence_ID)
    City (#CityID, zipcode, cityname, population, #place_of_birth_ID,#place_of_residence_ID )

    # - primary key
    $ - foreign key

Posting Permissions

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