Entity-Relationship Modeling & Cardinality – Lecture Review

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/43

flashcard set

Earn XP

Description and Tags

44 practice flashcards covering entities, relationships, cardinalities, annotations, and attribute selection from the lecture notes.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

44 Terms

1
New cards

What are the key entities in a library lending scenario where each borrowing transaction involves one member and one book?

BOOK, MEMBER, and BORROWING_TRANSACTION

2
New cards

In a library system, what is the relationship between MEMBER and BOOK?

MEMBER borrows BOOK

3
New cards

In a library system, what is the relationship between BOOK and BORROWING_TRANSACTION?

BOOK is borrowed in BORROWING_TRANSACTION

4
New cards

In a library system, what is the relationship between MEMBER and BORROWING_TRANSACTION?

MEMBER is involved in BORROWING_TRANSACTION

5
New cards

Given the rule “A CUSTOMER can place multiple ORDERS,” what is the minimum cardinality from CUSTOMER to ORDER?

0

6
New cards

Given the same rule, what is the maximum cardinality from CUSTOMER to ORDER?

  • (many)
7
New cards

For the rule above, what is the minimum cardinality from ORDER to CUSTOMER?

1

8
New cards

For the rule above, what is the maximum cardinality from ORDER to CUSTOMER?

1

9
New cards

For the rule “Each ORDER must include at least one PRODUCT,” what is the minimum cardinality from ORDER to PRODUCT?

1

10
New cards

For that same rule, what is the maximum cardinality from ORDER to PRODUCT?

  • (many)
11
New cards

In the ORDER–PRODUCT rule, what is the minimum cardinality from PRODUCT to ORDER?

0

12
New cards

In the ORDER–PRODUCT rule, what is the maximum cardinality from PRODUCT to ORDER?

  • (many)
13
New cards

Which entities are involved in the rule “A SUPPLIER may supply multiple ITEMS”?

SUPPLIER and ITEM

14
New cards

What is the relationship between SUPPLIER and ITEM?

SUPPLIER supplies ITEM

15
New cards

What is the cardinality from SUPPLIER to ITEM?

0..*

16
New cards

What is the cardinality from ITEM to SUPPLIER?

1..*

17
New cards

Which E-R notation correctly represents SUPPLIER (0..) supplies ITEM (1..)?

SUPPLIER (0..) — supplies — (1..) ITEM

18
New cards

What does the cardinality CUSTOMER (0..*) indicate?

A CUSTOMER may submit zero or more ORDERS

19
New cards

What does the cardinality ORDER (1..1) indicate?

Each ORDER must be submitted by exactly one CUSTOMER

20
New cards

Given CUSTOMER (0..*) and ORDER (1..1), what is the correct business rule?

Each ORDER must be submitted by exactly one CUSTOMER

21
New cards

What does the cardinality PRODUCT (1..*) indicate?

Each PRODUCT must include at least one ITEM and may include multiple ITEMS

22
New cards

What does the cardinality ITEM (1..*) indicate?

Each ITEM must be included in at least one PRODUCT and may be included in multiple PRODUCTS

23
New cards

State the full business rule for PRODUCT (1..) includes ITEM (1..).

Each PRODUCT must include at least one ITEM and may include multiple; each ITEM must be in at least one PRODUCT and may be in multiple.

24
New cards

In CUSTOMER (0..) submits ORDER (0..), what does CUSTOMER (0..*) mean?

A CUSTOMER may submit zero or more ORDERS

25
New cards

In the same notation, what does ORDER (0..*) mean?

An ORDER may not be submitted by any CUSTOMER

26
New cards

What potential issue exists with CUSTOMER (0..) submits ORDER (0..)?

An ORDER may exist without being submitted by any CUSTOMER

27
New cards

How can you correct the cardinality so each ORDER has exactly one CUSTOMER?

Change ORDER-to-CUSTOMER cardinality from (0..*) to (1..1)

28
New cards

What is the first step in choosing an appropriate E-R notation?

Identify the complexity of the organizational situation

29
New cards

Which E-R notation is best for a small library system?

A simpler E-R notation

30
New cards

Which scenario would most likely need a detailed E-R notation?

A large hospital management system with various entities and intricate relationships

31
New cards

What primary factor should you consider when choosing between simple and detailed notation?

The level of detail required to accurately model the situation

32
New cards

What is the role of special annotations in E-R diagrams?

To represent business rules and constraints not easily captured by standard notation

33
New cards

Why are special annotations important?

They ensure all rules governing entities and relationships are accurately represented

34
New cards

Give an example of a business rule that requires special annotation.

A student can enroll in a maximum of five courses per semester

35
New cards

What is the first step when a problem requires special annotations?

Identify the business rules and constraints that need to be represented

36
New cards

What should you do if a business rule cannot be captured by standard E-R notation?

Use special annotations to represent the rule

37
New cards

Which attributes belong in the Books entity of a bookstore database?

BookID, Title, Genre, Price, PublisherID, AuthorID

38
New cards

Which attributes belong in the Authors entity?

AuthorID, Name, Bio

39
New cards

Which attributes belong in the Publishers entity?

PublisherID, Name, Address

40
New cards

What relationship exists between Books and Authors?

Many-to-One (many books to one author)

41
New cards

What relationship exists between Books and Publishers?

Many-to-One (many books to one publisher)

42
New cards

Which attributes belong in the Students entity?

StudentID (Primary Key), Name, Major

43
New cards

Which attributes belong in the Courses entity?

CourseID (Primary Key), Title, Credits

44
New cards

Which attributes belong in the Enrollments entity?

EnrollmentID (Primary Key), StudentID (Foreign Key), CourseID (Foreign Key), Grade