In which scenarios would you consider adding an index to a database table?
- Frequently updated columns
- Small tables with a few records
- Tables used for historical data
- Tables with sequential data access patterns
Indexing is beneficial in scenarios where columns are frequently updated. However, it may not be suitable for small tables or those with sequential data access patterns, as the overhead may outweigh the benefits.
When might denormalization be beneficial in database design?
- To enforce data integrity constraints
- To improve read performance in a data warehouse
- To reduce redundancy and storage space
- To simplify complex queries
Denormalization can be beneficial in database design when there is a need to improve read performance in a data warehouse scenario. It involves strategically introducing redundancy to streamline query processing and retrieval of large datasets.
What is the primary goal of Reverse Engineering in database management?
- To create a conceptual data model
- To create a physical data model
- To generate a higher-level model from an existing database schema
- To optimize database performance
Reverse Engineering in database management aims to generate a higher-level model, such as a conceptual data model, from an existing database schema. This process is useful for understanding and documenting an already implemented database structure.
_______ is a constraint that enforces data integrity by ensuring that a column cannot contain NULL values.
- Foreign Key
- NOT NULL
- Primary Key
- Unique Key
NOT NULL is a constraint that enforces data integrity by ensuring that a column cannot contain NULL values. It is used to specify that a column must have a value, preventing the insertion of records with missing or undefined data.
Column-family stores are optimized for _______ and _______.
- Consistency, Availability
- Read-intensive workloads, Write-intensive workloads
- Readability, Writeability
- Transactions, Indexing
Column-family stores are optimized for both read-intensive and write-intensive workloads. This makes them suitable for scenarios where there is a need for high scalability and performance in both read and write operations.
The _______ model in NoSQL databases allows nested structures and dynamic schemas.
- Column-Family
- Document
- Graph
- Key-Value
The Document model in NoSQL databases allows nested structures and dynamic schemas. This means that each document in the database collection can have a different structure, allowing for flexibility in data representation.
In an ERD, an _______ key is a key that consists of more than one attribute.
- Composite
- Foreign
- Primary
- Unique
In an ERD, a composite key is a key that consists of more than one attribute. It is used to uniquely identify an entity when a single attribute is not sufficient. Composite keys are common in situations where a combination of attributes is needed for uniqueness.
What is aggregation in the context of data modeling?
- Breaking down a large dataset into smaller pieces
- Combining multiple entities into a single entity
- Creating relationships between entities
- Summarizing and combining data at a higher level
Aggregation in data modeling involves summarizing and combining data at a higher level. It is used to provide insights into the overall trends and patterns within a dataset, often involving the use of aggregation functions like SUM, AVG, COUNT, etc., to analyze and present data in a more meaningful way.
What is the central table in a Star Schema?
- Dimension Table
- Fact Table
- Lookup Table
- Reference Table
In a Star Schema, the central table is the Fact Table. This table contains the core data of the schema and is usually surrounded by Dimension Tables that provide context and additional details for the data in the Fact Table. The Fact Table typically contains numerical measures or facts that business users want to analyze.
How does indexing improve query performance in a database?
- Decreases the overall database size
- Increases the complexity of queries
- Reduces the number of records in a table
- Speeds up data retrieval by providing a quick access path
Indexing improves query performance by creating a quick access path to the data. It reduces the number of records that need to be scanned, making data retrieval faster for specific queries.