What is a key characteristic of document databases in terms of schema flexibility?
- Dynamic schema
- Fixed schema
- Relational schema
- Semi-structured schema
A key characteristic of document databases is their dynamic schema. Unlike traditional relational databases with fixed schemas, document databases allow for flexible schema designs where each document can have its own unique structure. This flexibility accommodates evolving data requirements and simplifies the development process.
Scenario: A company has employees and projects. An employee can work on multiple projects, and a project can have multiple employees working on it. Which type of relationship would you use to represent this scenario in an ERD?
- Many-to-Many
- Many-to-One
- One-to-Many
- One-to-One
In this scenario, a Many-to-Many relationship is appropriate. This allows each employee to work on multiple projects, and each project to have multiple employees associated with it. It involves a junction table to manage the relationship.
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.
What is a transitive dependency in the context of normalization?
- Dependency between non-prime attributes
- Dependency where a non-prime attribute determines a prime attribute
- Dependency where a non-prime attribute determines another non-prime attribute
- Dependency where a prime attribute determines another prime attribute
In normalization, a transitive dependency occurs when a non-prime attribute determines another non-prime attribute. It violates the principles of normalization, and resolving such dependencies is crucial for achieving higher normal forms.
What strategies can be employed to ensure data consistency across partitions?
- Consistent hashing
- Eventual consistency
- Two-phase commit protocol
- Vector clocks for timestamp ordering
Strategies like the Two-phase commit protocol can be employed to ensure data consistency across partitions in distributed databases. This involves a coordinated approach to commit or abort transactions across all nodes, ensuring that data remains consistent even in a distributed environment.
Data _______ is a technique used to maintain consistency and accuracy of data in a database.
- Encryption
- Indexing
- Normalization
- Validation
Data Validation is a technique used to maintain consistency and accuracy of data in a database. It involves checking the accuracy and reliability of data entered into the system, ensuring that it meets specific criteria or conditions. This is crucial for data integrity and quality.
What is the purpose of branching in version control systems for data modeling?
- Archiving old data models
- Creating backups
- Generating reports
- Managing concurrent development
The purpose of branching in version control for data modeling is to manage concurrent development. Branches allow data modelers to work on separate features or changes without affecting the main development line. This helps in organizing and merging changes efficiently.