CS 640 Winter 2012

Data Modelling

Due: Tuesday, February 7, in class

Part 1

Draw an ER diagram for a database that could be used by an individual pharmacy to store pharmaceutical records in accordance with the Community Pharmacy Standards of Practice as described in 5078-HPA Bylaws Community v2010.1 (June 18, 2010) for the College of Pharmacists of British Columbia. Your diagram should capture as much of the relevant data description as possible to allow a database system to record the data needed to comply to sections 6(2), 6(4), 6(9)(b), 6(10), 7(1)(c), 7(2), 8, 9, and 11(2).

Be sure to include and indicate a key for each entity type.

Include a legend that explains the notation you use in your solution.

Include additional comments that address any data consistency requirements omitted by your ER diagram.

Part 2

Using either text or a diagram, describe the schema for a corresponding relational database. For each relation, indicate the primary key and any foreign keys (including the names of the corresponding target relations).

Include additional comments that address any additional data consistency requirements omitted by your presentation of the schema.