You are on page 1of 6

MJ514 - BASIS DATA

Pokok Bahasan Entity-Relationship Diagram (E-R Diagram)


TIK 1. Memodelkan permasalahan di dunia nyata ke dalam model ER
2. Membuat Diagram ER
Setoran Laporan (Format Word) dan ER Diagram (Format Visio)
Zip dengan nama file: Prakt2_NIM.zip
Batas Akhir Setoran Akhir sesi praktikum

Nama : Geovany Moura Patrycia Siahaan


NIM : 4311901028
Kelas : MJ 2 A

1. (Exercise 2.1) Explain the distinctions among the terms primary key, candidate key,
and superkey.
2. (Exercise 2.2) Construct an E-R diagram for a hospital with a set of patients and a set
of medical doctors. Associate with each patient a log of the various tests and
examinations conducted.
3. (Exercise 2.4) A university registrar’s office maintains data about the following
entities: (a) courses, including number, title, credits, syllabus, and prerequisites; (b)
course offerings, including course number, year, semester, section number,
instructor(s), timings, and classroom; (c) students, including student-id, name, and
program; and (d) instructors, including identification number, name, department, and
title. Further, the enrollment of students in courses and grades awarded to students in
each course they are enrolled for must be appropriately modeled.
Construct an E-R diagram for the registrar’s office. Document all assumptions that
you make about the mapping constraints.
4. (Exercise 2.5) Consider a database used to record the marks that students get in
different exams of different course offerings.
a. Construct an E-R diagram that models exams as entities, and uses a ternary
relationship, for the above database.
b. Construct an alternative E-R diagram that uses only a binary relationship
between students and course-offerings. Make sure that only one relationship
exists between a particular student and course-offering pair, yet you can
represent the marks that a student gets in different exams of a course offering.
5. (Exercise 2.12) Consider the E-R diagram in Figure 2.29, which models an online
bookstore.
a. List the entity sets and their primary keys.
b. Suppose the bookstore adds music cassettes and compact disks to its collection.
The same music item may be present in cassette or compact disk format, with
differing prices. Extend the E-R diagram to model this addition, ignoring the
effect on shopping baskets.
1
c. Now extend the E-R diagram, using specialization, to model the case where a
shopping basket may contain any combination of books, music cassettes, or compact
disks.

Answering in Bahasa Indonesia

1. (Latihan 2.1)
Superkey adalah himpunan satu atau lebih atribut yang, diambil secara
kolektif, memungkinkan kami untuk mengidentifikasi secara unik suatu entitas
dalam himpunan entitas. Superkey mungkin berisi atribut yang tidak berhubungan.
Jika K adalah superkey, maka superset dari K. superkey yang tidak ada subset yang
tepat juga merupakan superkey disebut kunci kandidat. Ada kemungkinan bahwa
beberapa set atribut yang berbeda dapat berfungsi sebagai kunci kandidat. Kunci
utama adalah salah satu kunci kandidat yang dipilih oleh perancang basis data
sebagai sarana utama untuk mengidentifikasi entitas dalam set entitas.

2. (Latihan 2.2)

E.R Diagram Rumah Sakit

2
3. (Latihan 2.4)

E.R diagram university

3
4. (Latihan 2.5)
a. Lihat figure ER. Diagram University

b.

5. (Latihan 2.12)
a. The entity sets
- Author (name,addres,phone,URL)
- Publisher (name,addres,phone,UUR)
- Customer (email,name,addres,phone)
- Book(ISBN,titke,year,price)
- Warehouse (code,addres,phone)
- Shopping basket (basket_id)

The primary keys for each entity given in figure 7,29are as follows;
Entity name primary key
Author
Publisher
Warehaouse

4
b. suppose the bookstore adds music cassettes and compact diks to its collection.the same
music item may be perent in cassetle or compact disk
format,withdifferingprices.extand the E-R diagram to model this addition,ignoringthe
effecton shopping baskets.
c.

Now extend the E-R diagram,using specialization, to model the case where a
shoppimg basketmay contain any combination of books, music cassetes,or compact disk.

5
6

You might also like