Finalreview answers - Preliminary Model The below is a preliminary diagram for the We R Brokers brokerage firm 1 Every nation in the database has

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Preliminary Model The below is a preliminary diagram for the We R Brokers brokerage firm. 1) Every nation in the database has to have a corresponding exchange. 2) Every exchange has to carry at least one stock. 3) Every stock has to be listed on at least one exchange. Stock Exchange Nation Lists has home Has Price SE Code SE Name Issuing firm Amount purchased Dividend Scode Ncode NName ExRate Stock Exchange Nation Lists has home Has Price SE Code SE Name Issuing firm Amount purchased Dividend Scode Ncode NName ExRate
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Relational Tables and Referential Integrity (Foreign Keys are shown in Italics) Implementation Model The Implementation model in this example would simply involve turning the M-N relationship into an associative entity. Let's call the new composite entity, STOCKLISTING. In the implementation model, we would have a new entity (in addition to the existing entities) with the following attributes (This is where we capture the stock price at every exchange). STOCKLISTING(Exchange#, Stock#, Price) Relational Tables and Referential Integrity (Foreign Keys are shown in Italics) EXCHANGE(SE Code, SE Name, Nation#) Foreign Key Nation# References NATION NOT NULL [Since Nation, the parent, is mandatory in the relationship] ON DELETE RESTRICT STOCK (Scode , Issuing firm, Dividend, Amount Purchased, SE Code ) Foreign Key SE Code references GE NOT NULL (Since Stock Exchange is mandatory in the relationship) ON DELETE RESTRICT NATION (Ncode , NName, ExRate) STOCKLISTING( SE Code, Scode, Price) Foreign Key SE Code References EXCHANGE NOT NULL [Since Exchange, the parent, is mandatory in the relationship] ON DELETE RESTRICT Foreign Key Scode References STOCK NOT NULL [Since Stock, the parent, is mandatory in the relationship ] ON DELETE CASCADE
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/20/2011 for the course MIS 331 taught by Professor Nathantwyman during the Fall '10 term at University of Arizona- Tucson.

Page1 / 8

Finalreview answers - Preliminary Model The below is a preliminary diagram for the We R Brokers brokerage firm 1 Every nation in the database has

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online