1/43
44 practice flashcards covering entities, relationships, cardinalities, annotations, and attribute selection from the lecture notes.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
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
In a library system, what is the relationship between MEMBER and BOOK?
MEMBER borrows BOOK
In a library system, what is the relationship between BOOK and BORROWING_TRANSACTION?
BOOK is borrowed in BORROWING_TRANSACTION
In a library system, what is the relationship between MEMBER and BORROWING_TRANSACTION?
MEMBER is involved in BORROWING_TRANSACTION
Given the rule “A CUSTOMER can place multiple ORDERS,” what is the minimum cardinality from CUSTOMER to ORDER?
0
Given the same rule, what is the maximum cardinality from CUSTOMER to ORDER?
For the rule above, what is the minimum cardinality from ORDER to CUSTOMER?
1
For the rule above, what is the maximum cardinality from ORDER to CUSTOMER?
1
For the rule “Each ORDER must include at least one PRODUCT,” what is the minimum cardinality from ORDER to PRODUCT?
1
For that same rule, what is the maximum cardinality from ORDER to PRODUCT?
In the ORDER–PRODUCT rule, what is the minimum cardinality from PRODUCT to ORDER?
0
In the ORDER–PRODUCT rule, what is the maximum cardinality from PRODUCT to ORDER?
Which entities are involved in the rule “A SUPPLIER may supply multiple ITEMS”?
SUPPLIER and ITEM
What is the relationship between SUPPLIER and ITEM?
SUPPLIER supplies ITEM
What is the cardinality from SUPPLIER to ITEM?
0..*
What is the cardinality from ITEM to SUPPLIER?
1..*
Which E-R notation correctly represents SUPPLIER (0..) supplies ITEM (1..)?
SUPPLIER (0..) — supplies — (1..) ITEM
What does the cardinality CUSTOMER (0..*) indicate?
A CUSTOMER may submit zero or more ORDERS
What does the cardinality ORDER (1..1) indicate?
Each ORDER must be submitted by exactly one CUSTOMER
Given CUSTOMER (0..*) and ORDER (1..1), what is the correct business rule?
Each ORDER must be submitted by exactly one CUSTOMER
What does the cardinality PRODUCT (1..*) indicate?
Each PRODUCT must include at least one ITEM and may include multiple ITEMS
What does the cardinality ITEM (1..*) indicate?
Each ITEM must be included in at least one PRODUCT and may be included in multiple PRODUCTS
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.
In CUSTOMER (0..) submits ORDER (0..), what does CUSTOMER (0..*) mean?
A CUSTOMER may submit zero or more ORDERS
In the same notation, what does ORDER (0..*) mean?
An ORDER may not be submitted by any CUSTOMER
What potential issue exists with CUSTOMER (0..) submits ORDER (0..)?
An ORDER may exist without being submitted by any CUSTOMER
How can you correct the cardinality so each ORDER has exactly one CUSTOMER?
Change ORDER-to-CUSTOMER cardinality from (0..*) to (1..1)
What is the first step in choosing an appropriate E-R notation?
Identify the complexity of the organizational situation
Which E-R notation is best for a small library system?
A simpler E-R notation
Which scenario would most likely need a detailed E-R notation?
A large hospital management system with various entities and intricate relationships
What primary factor should you consider when choosing between simple and detailed notation?
The level of detail required to accurately model the situation
What is the role of special annotations in E-R diagrams?
To represent business rules and constraints not easily captured by standard notation
Why are special annotations important?
They ensure all rules governing entities and relationships are accurately represented
Give an example of a business rule that requires special annotation.
A student can enroll in a maximum of five courses per semester
What is the first step when a problem requires special annotations?
Identify the business rules and constraints that need to be represented
What should you do if a business rule cannot be captured by standard E-R notation?
Use special annotations to represent the rule
Which attributes belong in the Books entity of a bookstore database?
BookID, Title, Genre, Price, PublisherID, AuthorID
Which attributes belong in the Authors entity?
AuthorID, Name, Bio
Which attributes belong in the Publishers entity?
PublisherID, Name, Address
What relationship exists between Books and Authors?
Many-to-One (many books to one author)
What relationship exists between Books and Publishers?
Many-to-One (many books to one publisher)
Which attributes belong in the Students entity?
StudentID (Primary Key), Name, Major
Which attributes belong in the Courses entity?
CourseID (Primary Key), Title, Credits
Which attributes belong in the Enrollments entity?
EnrollmentID (Primary Key), StudentID (Foreign Key), CourseID (Foreign Key), Grade