3
1 TOPIC 2 : ENTITY RELATIONSHIP MODEL 2.1 Understand Entity Relationship Model (E-R) Disember 2012 Section A : Question 4 Explain the main component of the following entity relationship model 1. Entities 2. Attributes (4 marks) Disember 2012 Section B : Question 2 (a) Define the term primary key. (2 marks) Disember 2012 Section A : Question 5 With the aid of a diagram, draw an appropriate ER based on the following scenario. 1. A company operates four departments 2. Each department employs employees (4 marks) Disember 2012 Section B : Question 2 (b) With the aid of a diagram, sketch and describe clearly the following ER Model 1. 1 : 1 (One to one) 2. 1 : M (one to many) 3. M : N (Many to many) (9 marks) Disember 2013 Section A : Question 3 Figure below is the ER model of a Product. Produce the data for the product in: 1. Model scheme 2. Model instance (4 marks)

Rumusan Soalan Exam EC601-ToPIC 2

Embed Size (px)

DESCRIPTION

Database

Citation preview

  • 1

    TOPIC 2 : ENTITY RELATIONSHIP MODEL

    2.1 Understand Entity Relationship Model (E-R)

    Disember 2012

    Section A : Question 4

    Explain the main component of the following entity relationship model

    1. Entities

    2. Attributes

    (4 marks)

    Disember 2012

    Section B : Question 2 (a)

    Define the term primary key.

    (2 marks)

    Disember 2012

    Section A : Question 5

    With the aid of a diagram, draw an appropriate ER based on the following scenario.

    1. A company operates four departments

    2. Each department employs employees

    (4 marks)

    Disember 2012

    Section B : Question 2 (b)

    With the aid of a diagram, sketch and describe clearly the following ER Model

    1. 1 : 1 (One to one)

    2. 1 : M (one to many)

    3. M : N (Many to many)

    (9 marks)

    Disember 2013

    Section A : Question 3

    Figure below is the ER model of a Product. Produce the data for the product in:

    1. Model scheme

    2. Model instance

    (4 marks)

  • 2

    Disember 2013

    Section A : Question 4

    State the purpose of the E-R model and how it helps in the designing of databases.

    (4 marks)

    Disember 2013

    Section A : Question 5

    Draw an E-R diagram for each of the following statements:

    a. The Machines are made up of parts. Attribute of the parts include PartID and PartName.

    b. A publisher publishes several books. Attribute of the books include ISBN and Author.

    (4 marks)

    Disember 2012

    Section B : Question 2 (b)

    Draw the ER model and state the cardinality for every scenario below:

    1. Painter can paint many paintings, each painting is painted by one painter.

    (3 marks)

    2. An employee can learn many skills, each skill can be learned by many employees.

    (3 marks)

    3. An employee manages one store, each store is managed by one employee.

    (3 marks)

    Jun 2013

    Section A : Question 4

    Patients are treated in a single ward by the doctors assigned to them. Usually each patient will be

    assigned a single doctor, but in rare cases they will have two. Healthcare assistants also attend to the

    patients, a number of these are associated with each ward

    From the statement above, identify the entity and the relationship between all the entity.

    (4 marks)

    Jun 2013

    Section A : Question 5

    Draw an ER diagram with attributes and entities for the following:

    Customer identified by a CUSTOMER_NAME and with an address buy items, items are identified by an

    ITEM_NO an have a COLOR. The QTYBOUGHT of an item by each customer is recorded. An item can be

    bought by many customers.

    (4 marks)

  • 3

    Jun 2013

    Section B : Question 2

    The company you work wants to digitize their time cards. You have been asked to design the database

    for submitting and approving time cards. With the following information:

    . A timecard should have hours worked and date submitted

    . Each timecard is associated with exactly one employee

    . Each timecard should have a unique id

    . Each timecard has a status: it is either approved, not approved, or pending

    . Each employee has a unique id

    . Each employee has a name and address.

    . Each employee submits a time card every pay period. i.e. In I year, they will submit multiple time cards

    . Each employee either has direct deposit or physical check as their method of payment

    . Each employee is associated with exactly one manager

    . Each manager has a unique id and a name

    . Each manager is in charge of multiple employees

    . Each manager approves timecards for multiple employees

    Based on the above statements,

    (a) Identify the entities and their attributes

    [8 marks]

    (b) Draw all the relationship between entities.

    [3 marks]

    (c) Draw the complete Entity Relationship (ER) diagram.

    [9 marks]