Practice Lecture 1 - October 8 2009 View-Based Data Integration (Relational Data Model)
Practice Lecture 1 - October 8 2009 View-Based Data Integration (Relational Data Model)
Exercise:
ROOM-BOOKING-DB (DS1)
DS1.DEPARTMENT(dept-code, dept-name, address)
DS1.RESEARCH_STAFF (email, name, school, dept-code, position)
DS1.LECTURER(email, name, school)
DS1.LECTURE (lecturer, session);
DS1.SESSION(s-code, session-name, length, room-code)
DS1.ROOM(room-code, seats-number, conference-room)
NB: A research staff member is always bound to a department but, in general, a lecturer could be an
external person.
A research staff must also be a lecturer.
Sessions are intended as both lectures and seminars.
The address has the following form (Chicago Av., Washington DC, USA)
People names are encoded as (name second_name$surname).
TAX-POSITION-DB (DS2)
DS2.STUDENT (s-code, name, surname, email, school-name, income-bracket)
COURSES-DB (DS3)
NB: There is not an explicit separation between students and professors; it can be inferred by the
participations to certain relationships. A course has one and only one tenured professor. A student is
enrolled in at least one course.
Step 1 - Schema analysis:
No normalization needed.
Main entities: Students, Professors, Research Staff Members, Rooms, Departments,
Courses, Seminars, Talks, Locations
income-bracket
STUDENT
belongs
position
address
course-name edition
enrolled
(0,n) (1,1)
COURSE taught-by
Steps 3 and 4: GS conceptual schema:
email dept-name
(1,n)
SESSION lecturer ROOM
Conflicts analysis:
UNION
UNION
UNION
Further problems:
1) If a tuple of SESSION in DS1 represents a course which is not present also in DS3, we won't
be able to find out that it is actually a course.
2) If we want to allow users of DS1 to query the whole database, we need to enforce a
constraint which returns only one affiliation for each research staff member.
3) If a person gave different emails in DS1, DS2 and DS3 we won't be able to recognize the
same person in different databases.