chapter 3 Flashcards
(16 cards)
Q: What is an E/R Model?
A: The Entity-Relationship Model is a high-level way to design databases by visually representing entities, their attributes, and relationships.
Q: What is an entity in the E/R Model?
A: An entity is a real-world object or thing about which data is stored (e.g., Student, Book, Department).
Q: What are the two types of entities?
-Strong Entity: Exists independently (e.g., Employee).
-Weak Entity: Depends on a strong entity and requires a foreign key for identification (e.g., OrderItem depends on Order).
Q: What is an attribute in the E/R Model?
A: A property or characteristic of an entity (e.g., Name, Age, Salary).
Q: What are the types of attributes?
Simple: Cannot be divided (e.g., Age).
Composite: Can be split into smaller parts (e.g., FullName → FirstName, LastName).
Derived: Calculated from other attributes (e.g., Age from DateOfBirth).
Multivalued: Can have multiple values (e.g., Languages Spoken).
Q: What is a relationship in the E/R Model?
A: A link between two or more entities (e.g., Student enrolls in Course).
Q: What are the types of relationships?
One-to-One (1:1): One entity links to one other entity (e.g., one person has one passport).
One-to-Many (1:N): One entity links to many others (e.g., one teacher teaches many courses).
Many-to-Many (M:N): Many entities link to many others (e.g., students enroll in many courses).
What is cardinality in a relationship?
A: Cardinality specifies the maximum number of times an entity can participate in a relationship (e.g., 1:1, 1:N, M:N).
Q: What is participation in a relationship?
: Defines whether all entities must participate in a relationship.
Total Participation: Every entity must participate.
Partial Participation: Some entities may not participate.
Q: What is the difference between specialization and generalization in EER?
Specialization: Dividing an entity into subgroups based on unique characteristics (e.g., Employee → {Manager, Engineer}).
Generalization: Combining similar entities into one general entity (e.g., Car and Truck → Vehicle).
Q: What is aggregation in E/R Models?
: A way to represent relationships between relationships. Example: An Employee works on a Project using Machinery.
Q: What is an E/R Diagram (ERD)?
A: A graphical representation of entities, attributes, and relationships in a database design.
Q: What symbols are used in an ERD?
A:
Rectangle: Entity.
Oval: Attribute.
Diamond: Relationship.
Q: What is the purpose of the Enhanced E/R (EER) Model?
A: To handle complex database designs using features like specialization, generalization, and aggregation.
Q: What is a weak entity set?
A: An entity set that cannot be uniquely identified without a foreign key and a discriminator attribute.