Design an EER schema for a database application that you are interested in. Specify all constraints that should hold on the database. Make sure that the schema has at least five entity types, four relationship types, a weak entity type, a superclass/subclass relationship, a category, and an \(n\) -ary \((n > 2)\) relationship type.

Short Answer

Expert verified
The EER schema for the database could include entity types 'Customer', 'Order', 'Product', 'Supplier', and 'Invoice'. The relationship types could be 'Customer places Order', 'Product is included in Order', 'Supplier provides Product', and 'Invoice is generated for Order'. A weak entity could be 'Order Line Item', and a superclass/subclass relationship could exist between 'User' and 'Customer & Supplier'. There could also be a category 'Contact Information' for both 'Customer' and 'Supplier' and an 'Order Relationship' as the n-ary relationship type.

Step by step solution

01

Identify Entity Types

Start by identifying at least five entity types in the application. An entity type can be an object or concept, such as 'Customer', 'Order', 'Product', 'Supplier', and 'Invoice'.
02

Define Relationship Types

Next, define at least four relationship types between the identified entities. For instance, a 'Customer' can 'place' an 'Order', a 'Product' can 'be included in' an 'Order', a 'Supplier' 'provides' a 'Product', and an 'Invoice' 'is generated for' an 'Order'.
03

Introduce a Weak Entity

Now, introduce a weak entity type that doesn't have a key attribute of its own but depends on its existence with another entity type. An example could be an 'Order Line Item', which depends on 'Order'.
04

Specify Superclass/Subclass Relationship

Make sure to establish a superclass/subclass relationship. This could be for instance a superclass 'User' and two subclasses 'Customer' and 'Supplier'.
05

Include a Category

Next, include a category that is a subset of the union of several entity types. A category 'Contact Information' could be example that combines 'Customer' and 'Supplier'.
06

Create an n-ary Relationship Type

Finally, create a relationship type that involves more than two entity types. This could be an 'Order Relationship' involving 'Customer', 'Product', and 'Order'.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

How does a category differ from a regular shared subclass? What is a category used for? Illustrate your answer with examples.

Discuss the two notations for specifying constraints on \(n\) -ary relationships, and what each can be used for.

Discuss user-defined and attribute-defined specializations, and identify the differences between the two .

Identify all the important concepts represented in the library database case study described here. In particular, identify the abstractions of classification (entity types and relationship types), aggregation, identification, and specialization/generalization. Specify \((\min , \max )\) cardinality constraints whenever possible. List details that will affect the eventual design but have no bearing on the conceptual design. List the semantic constraints separately. Draw an EER diagram of the library database. Case Study: The Georgia Tech Library (GTL) has approximately 16,000 members, 100,000 titles, and 250,000 volumes (or an average of 2.5 copies per book). About 10 percent of the volumes are out on loan at any one time. The librarians ensure that the books that members want to borrow are available when the members want to borrow them. Also, the librarians must know liow many copies of each book are in the library or out on loan at any given time. A catalog of books is available online that lists books by author, title, and subject area. For each title in the library, a book description is kept in the catalog that ranges from one sentence to several pages. The reference librarians want to be able to access this description when members request information about a book. Library staff is divided into chief librarian, departmental associate librarians, reference librarians, check-out staff, and library assistants. Books can be checked out for 21 days. Members are allowed to have only five books out at a time. Members usually return books within three to four weeks. Most members know that they have one week of grace before a notice is sent to them, so they try to get the book returned before the grace period ends. About 5 percent of the members have to be sent reminders to return a book. Most overdue books are returned within a month of the due date. Approximately 5 percent of the overdue books are either kept or never returned. The most active members of the library are defined as those who borrow at least ten times during the year. The top 1 percent of membership does 15 percent of the borrowing, and the top 10 percent of the membership does 40 percent of the borrowing. About 20 percent of the members are totally inactive in that they are members but never borrow. To become a member of the library, applicants fill out a form including their SSN, campus and home mailing addresses, and phone numbers. The librarians then issue a numbered, machine-readable card with the member's photo on it. This card is good for four years. A month before a card expires, a notice is sent to a member for renewal. Professors at the institute are considered automatic members. When a new faculty member joins the institute, his or her information is pulled from the employee records and a library card is mailed to his or her campus address. Professors are allowed to check out books for three-month intervals and have a two-week grace period. Renewal notices to professors are sent to the campus address. The library does not lend some books, such as reference books, rare books, and maps. The librarians must differentiate between books that can be lent and those that cannot be lent. In addition, the librarians have a list of some books they are interested in acquiring but cannot obtain, such as rare or out- of-print books and books that were lost or destroyed but have not been replaced. The librarians must have a system that keeps track of books that cannot be lent as well as books that they are interested in acquiring. Some books may have the same title; therefore, the title cannot be used as a means of identification. Every book is identified by its International Standard Book Number (ISBN), a unique international code assigned to all books. Two books with the same title can have different ISBNs if they are in different languages or have different bindings (hard cover or soft cover). Editions of the same book have different ISBNs. The proposed database system must be designed to keep track of the members, the books, the catalog, and the borrowing activity.

What is the difference between specialization and generalization? Why do we not display this difference in schema diagrams?

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free