0% found this document useful (0 votes)
73 views2 pages

Relational Schema of The Library Management System: Isbn, Pages, Duration, Class, Publisher)

The document describes a relational schema for a library management system. It includes tables for users, topics, publishers, authors, and mediums (books, DVDs, magazines). The mediums table includes attributes from the subclass tables and a "class" attribute to indicate the type. Relationship tables like MediumsTopics and MediumsAuthors use foreign keys to link the tables. Reservation and lending tables also use foreign keys from the user and medium tables to track checkouts.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views2 pages

Relational Schema of The Library Management System: Isbn, Pages, Duration, Class, Publisher)

The document describes a relational schema for a library management system. It includes tables for users, topics, publishers, authors, and mediums (books, DVDs, magazines). The mediums table includes attributes from the subclass tables and a "class" attribute to indicate the type. Relationship tables like MediumsTopics and MediumsAuthors use foreign keys to link the tables. Reservation and lending tables also use foreign keys from the user and medium tables to track checkouts.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Relational schema of the Library Management System

Users (uid, name, address, plz, city, country, telephone, email, birthdate)

Topics (tid, name)

Publishers (pid, name, city, country)

Authors (aid, name, country)

Mediums (mid, title, description, notes, language, shelfmark, barcode, lendability, pub_date,
isbn, pages, duration, class, publisher)

FK1: Medium(publisher) REFERENCES Publisher(pid)

MediumsTopics (tid, mid)

FK2: MediumTopics(tid) REFERENCES Topics(tid)

FK3: MediumTopics(mid) REFERENCES Medium(mid)

MediumsAuthors (aid, mid)

FK4: MediumAuthor(aid) REFERENCES Author(aid)

FK5: MediumAuthor(mid) REFERENCES Medium(mid)

Reservations (mid, startdate, uid)

FK6: Reservations(uid) REFERENCES User(uid)

FK7: Reservations(mid) REFERENCES Medium(mid)

Lendings (mid, startdate, uid, duration, returndate)

FK8: Lendings(uid) REFERENCES User(uid)

FK9: Lendings(mid) REFERENCES Medium(mid)


Description:

To derive the abstract class Medium in a relational schema, we have chosen the method C
(create only one relation - for the superclass), which means, that we have added an attribute
“class” to the relation mediums. This attribute can take only the following values: “Book”,
“DVD” and “Magazine”. This follows, that all attributes from the subclasses were moved to
the super class. For that reason attributes that are connected to a specific class cannot be set
for another class type. For example: if the medium is a Book or a Magazine the ISBN number
has to be set and the duration (which is for DVDs) has to be NULL (not set). The number of
pages can be set or not, there is no restriction. If the medium is a DVD the duration has to be
set and the isbn and the number of pages have to be NULL (not set).

The relations Users, Topics, Publishers and Authors are simple relations with the attributes
defined in the ER-diagram. For the many – many relations, like Mediums - Topics and
Mediums - Authors we’ve build a relation with two foreign keys in each case.

For the two relations with a weak entity, Reservations and Lendings, we’ve made a relation
with two foreign keys. The primary key is composed by the discriminator start date and by
the primary key of the identifying weak entity (medium id).

You might also like