One of the best advantages of relational notation format is the ease to go from an E/R diagram to an English format of notation rather easily. When dealing with suptype/supertype, they are considered a special form of a 1:1 therefore foreign key placement is immaterial, due to the fact that subtypes are know as inheriting everything from a supertype unless other wise noted. If you are presented with a 1:N (one-to-many) relationship between tables foreign keys always will be on the many side. In terms of cardinalities, if you have a 1:1 (one-to-one) relationship between two tables you can place the foreign key on either side when translating to relational notation, but is dependant upon the context of the scope of what the prolect is requiring. It is a half-way step between an abstract tool and an implementation specific tool (SQL create table commands). Relational notation is a shorthand way to represent E/R diagrams. Normally this is represented by being placed at the end of the attribute list in the relational notation and is shown with a dashed underline.īy translating E/R diagrams into relational notation it also makes it easy for an individual to normalize and denormalize any given table in the schema and if needed it is not very complicated to restore relational notation back to E/R diagram format. Note: in this example the attribute Pub_id is what is known as a foreign key because it links to the following table (PUBLISHER) through that attribute. Note: the primary key in the table is underlined to show that it is the unique attribute. Looking at this E/R diagram to translate this into relational notation it would look like:ĪUTHOR ( Author_id, Author_lname, Author_fname, Address, City, State, Zip) The only rule for attributes is if it happens to be a foreign key it needs to be underscored with a dotted line: You always start with the primary key(s), which are commonly notated with the underscore, Next all other attributes are added. This can be done by taking the names of each table and its attributes and ordering them in a specific order. Relational notation is a process of transforming an E/R diagram into a more friendly and usable type of diagram that is easily readable.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |