A Foreign Key in a database is used to...
Create a primary key for a related table.
Establish a link between two tables based on a common column.
Define a new data type for a column.
Enforce data validation rules on a column.
In a Star Schema, what is the central table called that contains the key performance indicators (KPIs)?
Dimension Table
Fact Table
Lookup Table
Entity Table
A table has a composite primary key (using two columns). What condition must be met for it to be considered in Second Normal Form (2NF)?
It must have no transitive dependencies
All columns must have unique values
No non-key attribute should be dependent on only part of the primary key
It must already be in 1NF
Which of the following is NOT a good practice when designing a simple schema for a single entity?
Defining primary keys to uniquely identify each row
Choosing appropriate data types for columns
Using descriptive names for tables and columns
Storing redundant data in multiple columns
Why is data redundancy undesirable in a database?
It complicates data retrieval and manipulation
It can lead to data inconsistencies and anomalies
It increases storage space requirements
All of the above
What is the role of cardinality in an ER diagram?
It determines the primary key of an entity
It defines the data type of an attribute
It specifies the name of the relationship between entities
It indicates the number of instances of one entity that can be associated with instances of another entity
What is the primary difference between a Star Schema and a Snowflake Schema?
Star Schemas have more joins.
Snowflake Schemas normalize dimension tables.
Snowflake Schemas don't use fact tables.
Star Schemas are used for real-time analytics.
What does the 'ON DELETE CASCADE' constraint do?
It automatically deletes matching records in the child table when a record in the parent table is deleted.
It prevents deletion of records in the parent table if there are matching records in the child table.
It has no impact on the child table when a record in the parent table is deleted.
It sets the foreign key values in the child table to NULL when a record in the parent table is deleted.
Which of the following relationships is typically NOT implemented directly in a database but is often represented using an intermediary table?
One-to-Many
One-to-One
Many-to-Many
Which of the following is NOT a characteristic of a table in First Normal Form (1NF)?
The table contains a foreign key referencing another table
Each column contains atomic values
A primary key uniquely identifies each row
There are no repeating groups of columns