IS112 – Data Management
Extra In-Class Exercise 1 Page 1
Extra In-Class Exercise 1: ER Modeling
Note: If the question does not provide any clear statement to define the minimum cardinality, you can decide
whether the minimum cardinality is zero or one.
1. Design an ER model for keeping track of the information about votes taken in the U.S. House of
Representatives during the current two-year congressional session.
o The database needs to keep track of each U.S. State’s Name (e.g., Texas, Washington, Michigan) and the
Region of the State (in total there are five regions: Northeast, Midwest, Southeast, Southwest, and West).
o Each Congressperson in the House of Representatives is identified by his or her Name. Other information, such
as the state he represents, the StartDate when the congressperson was first elected, and the political party
(Republican, Democrat, Independent, or other) to which he or she belongs, is also recorded. Each
congressperson only represents one state, and each state has at least one congress person.
o The database keeps track of each Bill (i.e., proposed law), including the BillName, the DateOfVote on the bill,
whether the bill PassedOrFailed, and the Sponsor (the congressperson(s) who sponsored – that is, proposed -
the bill). Assume the BillName is unique, and each bill must be proposed by at least one congressperson, and a
congressperson could propose zero/one/many bills.
o The database keeps track of how each congressperson voted on each bill (i.e., support vs. against). We assume
a bill is voted by many congresspersons and each congressperson votes zero/one/many bills.
2. Draw an ER diagram for the following situation: a lab has several chemists who work on one or more projects.
Chemists also may use certain kinds of equipments on some projects.
o Attributes of Chemist include EmployeeID (identifier), Name, and PhoneNo.
o Attributes of Project include ProjectID (identifier), and StartDate.
o Attributes of Equipment include SerialNo (identifier) and Cost.
o Each chemist is assigned to at least one project and each project has at least one chemist assigned. When a
chemist is assigned to a project, both the AssignedDate and the Role played by the chemist in the assigned
project must be recorded.
o The organization has a list of equipment which can be borrowed by chemists working on projects. The
organization wishes to record BorrowedDate and ReturnedDate, the date when a given equipment item was
borrowed by a particular chemist working on a specified project, and the date when the equipment was returned.
A given equipment item can be borrowed zero time/once/multiple times, although it can only be borrowed by at
most one chemist at any time. A chemist can borrow zero/one/many equipment items over the time, although
she/he can borrow at most one item at any time.
3. Draw an ER model to keep track of Stocks Trading.
o Each Stock has StockID (unique identifier), and the name.
o Each Trader has a TraderID (unique identifier) and the trader’s name.
o The price of each stock changes, and the database needs to keep track of stock prices. We assume at any given
date (date/time), the price of a stock is fixed. Each Stock price is identified by the effective date along with
Stock ID. For example, Stock ABC is priced at SG$1.21 at 11:10 am Jan 12, 2013, and it is priced at SG$1.22
at 11:15 am Jan 12, 2013. In other words, starting from 11:10 Jan 12, 2013, Stock ABC is priced at SG$1.21
and there is no change until 11:15am Jan 12, 2013.
o A trader can purchase any quantity of the stock at varying stock price. For each purchase, the date at which a
given Stock is traded, the price, and the quantity are recorded in the database.