_______ compression reduces the storage size of data without losing any information.
- Decompression
- Encryption
- Lossless
- Lossy
Lossless compression reduces the storage size of data without losing any information. It is commonly used when it's important to preserve all the original data, such as in databases or text files. Unlike lossy compression, there is no loss of quality in the compressed data.
In a fact table, each record represents a _______ at a specific level of detail.
- Entity
- Event
- Relationship
- Transaction
In a fact table, each record represents a transaction at a specific level of detail. A fact table contains quantitative data, such as measurements or metrics, and is typically associated with a timestamp to capture when the transaction occurred. This helps in analyzing and understanding the details of specific events or transactions in the dataset.
Scenario: A university has staff members who can be either professors or administrative staff. How would you model this scenario using superclass and subclass relationships?
- Create separate databases for professors and administrative staff
- Create separate tables for professors and administrative staff
- Use a single table for all staff members
- Use a superclass-subclass relationship with a staff superclass and professor/administrative staff subclasses
In this scenario, the best approach is to use a superclass-subclass relationship. By having a staff superclass and professor/administrative staff subclasses, you can inherit common attributes from the superclass while allowing specific attributes for each subclass. This promotes data integrity and reduces redundancy.
_______ partitioning involves splitting tables vertically based on columns.
- Hash
- Horizontal
- Range
- Vertical
Vertical partitioning involves splitting tables based on columns, which means dividing a table into smaller, more manageable parts based on specific columns. This can be beneficial for improving query performance and managing data more efficiently.
How does a composite key differ from a single-column key in a database?
- Composite key and Single-column key are identical
- Composite key is made up of multiple columns, Single-column key uses only one column
- Composite key is used for foreign key relationships, Single-column key is not
- Single-column key is made up of multiple columns, Composite key uses only one column
A composite key consists of multiple columns to uniquely identify a record, whereas a single-column key uses only one column for this purpose. Composite keys are often used when a single column cannot guarantee uniqueness.
In SQL, what does the term "DDL" stand for?
- Data Definition Language
- Data Description Language
- Data Design Language
- Data Display Language
DDL stands for Data Definition Language in SQL. It is used to define the structure of the database, including creating, altering, and dropping tables and defining constraints. DDL statements include CREATE, ALTER, DROP, and TRUNCATE. Understanding DDL is crucial for database schema design and management.
What are the main advantages of using clustering in a distributed database system?
- Enhanced data security, optimized data replication, improved data distribution
- Improved query performance, simplified data management, reduced storage requirements
- Increased data locality, reduced network overhead, enhanced fault tolerance
- Streamlined data access, reduced latency, simplified data partitioning
Clustering in a distributed database system offers advantages such as increased data locality, which means related data is stored together, reducing network overhead. It also enhances fault tolerance as data redundancy is increased. This improves system resilience and reliability.
How are relationships represented in an Entity-Relationship Diagram (ERD)?
- Diamond
- Hexagon
- Oval
- Rectangle
Relationships in an ERD are represented by a diamond shape. This symbolizes the connection between entities, indicating how data is associated and shared between them.
Advanced ER diagram tools offer _______ functionality to ensure data consistency.
- Collaboration
- Migration
- Validation
- Version Control
Advanced ER diagram tools often provide validation functionality to ensure data consistency. This involves checking the diagram against predefined rules and constraints, helping users identify errors or inconsistencies in their data model. Validation is crucial for maintaining the integrity of the database design.
What are some advantages of using a column-family store over a relational database?
- Better support for complex transactions
- Improved scalability for read-heavy workloads
- Limited horizontal scalability
- Strict adherence to a fixed schema
Using a column-family store over a relational database provides advantages like improved scalability for read-heavy workloads. Column-family stores are designed to efficiently handle large amounts of data with high read-throughput, making them suitable for applications with demanding query patterns and analytical workloads.