1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The primary key of a relationship set in an E-R data model

  1. Mar 12, 2008 #1

    Eus

    User Avatar

    Hi Ho!

    I have posted this same question about three weeks ago on MySQL forum (http://forums.mysql.com/read.php?125,197805,197805) and on the mailing list of the book itself about two weeks ago (db-book-list@cs.yale.edu). But, still there is no response at all. Therefore, I try my luck by posting the question here.

    On a book, which is published by McGraw Hill, titled Database System Concepts, 4th Edition, by Silberschatz, Korth, and Sudarshan, I found a contradiction that I would like to clarify with you.

    The problem is within chapter 2, which starts on page 27 and ends on page 77, that discusses Entity-Relationship Model.
    On page 36 in a section that discusses the key to distinguish among the various relationships of a relationship set, there is the following statement:

    In my opinion, the last sentence is wrong. The right one should be as follows:

    "The composition of the primary key for a relationship set does not depend on the set of attributes associated with the relationship set [itex]R[/itex]."

    The following evidences support my argument:
    1. On page 32 in a section that discusses Relationship Sets there is the following statement:

    "A relationship instance in a given relationship set must be uniquely identifiable from its participating entities, without using the descriptive attributes."

    Previously, the descriptive attributes are defined as attributes that are associated with a relationship set.
    With other words, the composition of the primary key for a relationship set does not depend on the set of attributes associated with the relationship set R.

    2. On page 36 just below the concerned statement, it is written that:

    Because in both of the above cases the superkey (i.e., a set of one or more attributes that, taken collectively, allow us to identify uniquely a relation in a relationship set) is just
    [tex]
    primary-key(E_{1})\ \bigcup\ primary-key(E_{2})\ \bigcup\ ...\ \bigcup\ primary-key(E_{n})
    [/tex],
    the composition of the primary key for a relationship set does not depend on [itex]{a_{1},\ a_{2},\ ...,\ a_{m}}[/itex] (i.e., the set of attributes associated with the relationship set [itex]R[/itex]).
    With other words, in both of the above cases, the set of attributes
    [tex]
    primary-key(E_{1})\ \bigcup\ primary-key(E_{2})\ \bigcup\ ...\ \bigcup\ primary-key(E_{n})
    [/tex]
    is sufficient to describes an individual relationship in set [itex]R[/itex].
    Therefore, the composition of the primary key for a relationship set does not depend on the set of attributes associated with the relationship set [itex]R[/itex].

    To conclude, is it true that the composition of the primary key for a relationship set does not depend on the set of attributes associated with the relationship set [itex]R[/itex]?

    In practice there are some examples that require the use of descriptive attributes to form the primary key of a relationship set. One such examples is as follows:

    Consider two entity sets: Student and Course along with one relationship set: Took that describes a many-to-many relationship between Student and Course, as well as one descriptive attribute associated with the relationship set: Quarter.

    If one student is only permitted to take a course once, then the primary key of the relationship set will be
    [tex]
    primary-key(Student)\ \bigcup\ primary-key(Course)
    [/tex]

    But, if one student is permitted to take a course more than once, then the primary key of the relationship set will be
    [tex]
    primary-key(Student)\ \bigcup\ primary-key(Course)\ \bigcup\ {Quarter}
    [/tex]

    If it is true that:
    "The composition of the primary key for a relationship set does not depend on the set of attributes associated with the relationship set [itex]R[/itex].",
    the relationship set of the aforementioned example must be transformed to an entity set named: Academic Quarter in spite of the fact that we are still working on the E-R data model (usually we start creating bridging-tables and other necessary transformations when we translate the E-R data model into the relational data model).

    Is such transformation a common practice when modeling data with E-R data model because the composition of the primary key for a relationship set does not depend on the set of attributes associated with the relationship set [itex]R[/itex]?

    Thank you very much.

    Best regards,
    Eus
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you help with the solution or looking for help too?
Draft saved Draft deleted



Similar Discussions: The primary key of a relationship set in an E-R data model
  1. Zeros in a data set (Replies: 4)

Loading...