Font size
WorksheetsEntity Relationship Diagram (ERD) Multiple Choice Questions
Total questions: 100
Worksheet time: 50mins
What is the primary purpose of an Entity Relationship Diagram (ERD)?
To write database code
To visually represent the logical structure of a database
To physically store data
To query the database
In a standard ERD, what does a rectangle represent?
A relationship
An attribute
An entity
A constraint
An attribute that can be broken down into smaller, meaningful parts is called a(n):
Simple attribute
Composite attribute
Derived attribute
Multivalued attribute
Which symbol is used to represent a relationship in an ERD?
Circle
Rectangle
Diamond
Line
A person's age, which can be calculated from their date of birth, is an example of a(n):
Stored attribute
Composite attribute
Derived attribute
Key attribute
What does cardinality specify in the context of an ERD?
The number of tables in a database
The number of attributes in an entity
The number of instances of one entity that can be associated with an instance of another entity
The level of normalization
A relationship between three distinct entities is called a:
Binary relationship
Unary relationship
Ternary relationship
Recursive relationship
A "weak entity" is best defined as an entity that:
Has very few attributes
Is not important to the database
Cannot be uniquely identified by its own attributes alone
Has no relationships with other entities
The attribute that uniquely identifies an entity is known as the:
Foreign attribute
Descriptive attribute
Key attribute (or Primary Key)
Composite attribute
In a one-to-many relationship, the "many" side is often represented by what symbol in Crow's Foot notation?
A single vertical line
A circle
A three-pronged "crow's foot"
A double vertical line
An attribute that can have more than one value for a single entity instance (e.g., 'phone_number' for a 'Student') is a:
Simple attribute
Derived attribute
Multivalued attribute
Composite attribute
A relationship where an entity is related to itself is known as a(n):
Binary relationship
Ternary relationship
Associative relationship
Recursive (or Unary) relationship
The double line connecting a weak entity to its identifying relationship indicates:
A one-to-one relationship
Total participation (existence dependency)
A many-to-many relationship
Partial participation
What is generalization in an ERD?
Combining several entities into a single, higher-level entity
Breaking down an entity into several, lower-level entities
Creating a relationship between two entities
Defining the attributes of an entity
An entity that participates in a relationship is called a(n):
Participant
Attribute
Relation
Schema
Which of the following best describes an "associative entity"?
An entity used to implement a one-to-one relationship
An entity used to represent a multivalued attribute
An entity used to resolve a many-to-many relationship
A weak entity
The minimum number of times an instance in one entity can be associated with an instance in a related entity is called:
Degree
Cardinality
Modality (or Participation)
Arity
What does a double rectangle represent in an ERD?
A strong entity
A weak entity
An associative entity
A superclass entity
A 'Student' entity can have a 'Locker' entity. Each student can have only one locker, and each locker is assigned to only one student. This is a:
One-to-many relationship
One-to-one relationship
Many-to-many relationship
Recursive relationship
The process of designating a more general entity type from a set of more specialized entity types is:
Specialization
Generalization
Aggregation
Normalization
In an ERD, ovals (or ellipses) are used to represent:
Entities
Relationships
Attributes
Keys
The degree of a relationship is the:
Number of attributes in the relationship
Number of participating entity types
Number of foreign keys used
Number of instances in the relationship
The key of a weak entity is formed by the primary key of the parent entity plus a:
Foreign key
Super key
Discriminator (or partial key)
Candidate key
A relationship that has its own attributes is a sign that you might need a(n):
Weak entity
Recursive relationship
Associative entity
Superclass
The constraint that specifies whether the existence of an entity depends on its relationship to another entity is:
Cardinality constraint
Participation constraint
Domain constraint
Key constraint
Specialization is a:
Top-down process
Bottom-up process
Left-to-right process
Ad-hoc process
The concept of IS-A is related to:
Aggregation
Generalization/Specialization
Cardinality
Recursive relationships
In a university database, the relationship between 'Student' and 'Course' is typically:
One-to-one
One-to-many
Many-to-many
Self-referencing
What is a schema?
The raw data in the database
A query used to retrieve data
A diagram representing the database structure
A single table in the database
Which notation uses arrows and text labels (e.g., P, F) to define relationships?
Crow's Foot
Chen Notation
UML (Unified Modeling Language)
Information Engineering (IE) notation
An attribute that cannot be divided further is called:
Composite
Simple (or Atomic)
Multivalued
Derived
Aggregation in an ERD allows you to:
Treat a relationship as an entity
Combine multiple entities into one
Define subtypes
Enforce referential integrity
An identifying relationship is the relationship between a weak entity and its:
Subtype
Supertype
Owner (or Parent) entity
Sibling entity
A single line connecting an entity to a relationship indicates:
Total participation
Partial participation
A weak relationship
A strong relationship
The set of permitted values for an attribute is called its:
Domain
Range
Type
Schema
An entity set is a:
Collection of attributes of a particular entity
Collection of all relationships in a database
Collection of similar entities
Collection of all primary keys
If an employee can be a manager of other employees, this represents a:
Ternary relationship
Binary relationship
Recursive relationship
Weak relationship
The process of converting an ERD into a set of tables is called:
Normalization
Schema mapping
Querying
Indexing
The primary key of a table is underlined in many ERD notations. What about a multivalued attribute?
It is underlined twice
It is in a dashed oval
It is in a double oval
It is in a bolded oval
When an entity instance must participate in a relationship, it is called:
Mandatory (Total) Participation
Optional (Partial) Participation
Compulsory Cardinality
Required Degree
A 'Pilot' flies an 'Airplane'. In this statement, 'flies' represents the:
Entity
Attribute
Relationship
Key
The process of defining a set of subclasses of an entity type is called:
Generalization
Specialization
Aggregation
Association
Which of the following is NOT a component of an ERD?
Entity
Attribute
Relationship
Table
A database model that is based on the perception of the world as consisting of objects and their relationships is the:
Relational Model
Network Model
Hierarchical Model
Entity-Relationship Model
A 'part-of' relationship is best represented by:
Generalization
Specialization
Aggregation
Ternary relationship
The structural description of a database is called the:
Database instance
Database schema
Database relation
Database attribute
In a 'Book' entity, 'ISBN' would be the best choice for a:
Descriptive attribute
Multivalued attribute
Composite attribute
Key attribute
The number of tuples (rows) in a relation is called its:
Cardinality
Degree
Domain
Schema
An entity that is not dependent on any other entity for its existence is a:
Weak entity
Strong entity
Associative entity
Subclass entity
What is the main benefit of creating a conceptual data model like an ERD?
It guarantees the database will be fast
It provides a clear communication tool for stakeholders
It automatically generates the physical database
It eliminates the need for normalization
Which key ensures that each row in a table is uniquely identifiable?
Foreign Key
Primary Key
Super Key
Alternate Key
A key that consists of one or more attributes that can uniquely identify a row in a table is a:
Candidate Key
Foreign Key
Composite Key
Non-prime attribute
What is a Foreign Key?
A key that uniquely identifies a row in the same table
A field (or collection of fields) in one table that uniquely identifies a row of another table
A key that is composed of more than one attribute
Any key that is not the primary key
A key that is a candidate key but not selected to be the primary key is called a(n):
Super Key
Composite Key
Alternate Key
Foreign Key
What is the primary purpose of an index in a database?
To enforce uniqueness
To improve the speed of data retrieval operations
To establish relationships between tables
To reduce the storage space of the database
A key composed of two or more attributes is known as a:
Primary Key
Simple Key
Composite Key
Surrogate Key
A Super Key is a set of attributes that:
Can uniquely identify a tuple in a relation
Is a subset of a candidate key
Is always a single attribute
Links two tables together
What is a potential disadvantage of adding too many indexes to a table?
It can speed up data retrieval too much
It can slow down data modification operations (INSERT, UPDATE, DELETE)
It can cause data to be lost
It prevents the use of a primary key
A "surrogate key" is a:
Key made from business data (e.g., social security number)
Unique identifier generated by the database system with no business meaning
Key that references another table
Synonym for a composite key
Referential Integrity is a rule that ensures that relationships between tables remain consistent. It is typically enforced using:
Primary Keys
Indexes
Foreign Keys
Super Keys
Which of the following is true about a Primary Key?
It can contain NULL values
A table can have multiple Primary Keys
It must contain unique values for each row
It is optional for a table
An index where the data is physically ordered on the disk in the same order as the index is a:
Clustered Index
Non-Clustered Index
Secondary Index
Unique Index
How many clustered indexes can a table have?
Unlimited
As many as there are columns
Only one
None
What is a "unique index"?
An index that speeds up queries
An index that enforces the uniqueness of column values
An index that is also a primary key
An index created on a foreign key
A "natural key" is a key that:
Is automatically generated by the database
Is a single integer value
Is formed of attributes that already exist in the real world (e.g., VIN for a car)
Cannot be used as a primary key
A Candidate Key is a minimal:
Foreign Key
Super Key
Primary Key
Index
Which property is NOT required for a Primary Key?
Unique
Not Null
Stable (rarely changes)
Must be a single attribute
The set of all attributes in a relation is, by definition, a:
Primary Key
Foreign Key
Super Key
Candidate Key
A non-clustered index:
Determines the physical order of data in a table
Has a separate structure from the data rows that points
An index on multiple columns is known as a:
Composite index
Secondary index
Clustered index
Partial index
When you define a primary key, most database systems automatically create a:
Non-clustered index
Unique index
Foreign key constraint
Trigger
What happens if you try to insert a duplicate value into a column with a unique index?
The operation succeeds, but a warning is issued
The database system automatically changes the value
The operation fails, and an error is returned
The existing record is overwritten
The relationship from a Foreign Key to a Primary Key is often called a:
Parent-child relationship
Master-slave relationship
Hierarchical relationship
Sibling relationship
A "partial index" is an index that:
Covers only some of the rows in a table based on a condition
Covers only some of the columns in a table
Is not fully built yet
Is only used for read operations
An attribute that is part of a candidate key is called a:
Non-prime attribute
Prime attribute
Foreign attribute
Simple attribute
If a table has columns (StudentID, CourseID, Grade) and the primary key is (StudentID, CourseID), this key is a:
Simple Key
Surrogate Key
Natural Key
Composite Key
What is the main benefit of using a surrogate key over a natural key?
It takes up more space
It is more meaningful to the user
It is stable and will not change if business rules change
It is always a single column
The ON DELETE CASCADE option for a foreign key means:
You cannot delete the parent row if child rows exist
The foreign key in the child row is set to NULL when the parent row is deleted
The child rows are deleted when the parent row is deleted
The deletion is blocked
A "covering index" is one that:
Contains all columns needed to satisfy a query, avoiding a table lookup
Is created on every column of a table
Is another name for a clustered index
Physically covers the data on the disk
A simple key is a key that consists of:
A single attribute
A numeric data type
Two attributes
A foreign key reference
Which key type is NOT necessarily unique?
Primary Key
Candidate Key
Foreign Key
Super Key
An index scan is generally slower than an index seek because:
It reads all the index entries
It uses a binary search approach
It ignores the index completely
It only works on small tables
A "secondary key" is a key used for:
Uniquely identifying records
Establishing relationships
Data retrieval purposes, not necessarily unique
Backing up the primary key
What constraint is implicitly created when you declare a column as a Primary Key?
CHECK
DEFAULT
NOT NULL
FOREIGN KEY
A Bitmap index is most suitable for:
Columns with high cardinality (many unique values)
Columns with low cardinality (few unique values)
Columns that are frequently updated
Primary key columns
Which of the following is the best candidate for a primary key?
A person's full name
A person's date of birth
A system-generated unique ID number
A person's phone number
A key that uniquely identifies a record within the context of its parent is a:
Primary Key
Partial Key (or Discriminator)
Alternate Key
Foreign Key
A full table scan occurs when:
The query uses an index to find data
The database reads every row in the table to find the data
The query returns the entire table
The index is being rebuilt
A hash index is most effective for:
Range queries (e.g., WHERE price > 100)
Equality queries (e.g., WHERE id = 123)
Sorting data
Pattern matching queries (e.g., WHERE name LIKE 'A%')
A "function-based index" is an index built on:
A single column
Multiple columns
The result of a function or expression on one or more columns
A foreign key column
If Key1 is a candidate key and Key2 is a candidate key, then Key1 can be chosen as the Primary Key and Key2 becomes the:
Super Key
Alternate Key
Foreign Key
Secondary Key
The process of the query optimizer choosing the best way to execute a query (e.g., using an index) is called:
Query compilation
Query execution planning
Query parsing
Query indexing
A foreign key value must match an existing value in the primary key column of the referenced table, or it must be:
Zero
A negative number
NULL
Unique
What is index fragmentation?
When an index becomes too large
When the logical ordering of pages in an index does not match the physical ordering
When an index is not used by a query
When two indexes conflict with each other
In a composite index on (LastName, FirstName), a query WHERE FirstName = 'John' would likely be:
Very efficient, using the index fully
Inefficient, as it cannot use the leading part of the index
Able to use the second part of the index only
Converted to a full table scan
A key that can identify a set of related records, but not necessarily a unique record, is a:
Primary Key
Secondary Key
Candidate Key
Super Key
The UNIQUE constraint ensures that all values in a column are different. How does it differ from a PRIMARY KEY constraint?
It allows multiple NULL values (in most systems)
It cannot be a foreign key reference
It does not create an index
It can only be applied to one column per table
A "fill factor" for an index refers to:
The percentage of space on each leaf-level page to be filled with data
The number of columns in the index
The number of rows the index covers
The speed of the index
An index organized tree (IOT) is a table where the data is stored:
In a heap separate from the index
Within the B-tree structure of the index
What is the primary goal of database normalization?
To increase data redundancy to improve performance
To reduce data redundancy and improve data integrity
To create as many tables as possible
To make the database schema harder to understand
