Explore key concepts and features of Azure SQL Database and Cosmos DB with this fundamentals quiz. Assess your understanding of cloud-based data storage, scalability, deployment models, security, and consistency levels in distributed databases.
Which type of resource is primarily designed for storing structured, relational data with support for SQL queries?
Explanation: A SQL Database is meant for handling structured data with a fixed schema and supports SQL queries for data manipulation and retrieval. Document stores are optimized for semi-structured data, while blob storage handles unstructured files, and key-value stores focus on simple key-based access. Therefore, SQL Database best fits the need for relational data and query support.
When you need to handle a sudden increase in traffic for your application, which scaling option allows Azure SQL Database to add more compute resources automatically?
Explanation: Automatic scaling adds or reduces compute resources as needed without manual intervention, making it effective for handling fluctuating workloads. Horizontal and vertical partitioning are data management strategies, not resource scaling techniques, and manual resizing requires direct user action, which is less responsive to sudden changes.
Which data consistency level guarantees that read operations always return the most recent committed data in a globally distributed NoSQL database?
Explanation: Strong consistency ensures clients get the latest committed data, even in a globally distributed setup. Eventual consistency may lead to stale reads, session consistency applies only within a specific client session, and bounded staleness allows some lag between replicas. Thus, only strong consistency offers immediate and accurate data visibility.
What deployment option allows you to create and manage multiple isolated databases under a single management environment for cost efficiency?
Explanation: Elastic pools let you group several databases to share compute resources cost-effectively, ideal for workloads with varying usage patterns. A single-instance database manages only one database, table partitioning is a method to organize individual tables, and cold storage is unrelated to operational resource sharing, focusing instead on data archiving.
In a globally distributed database, what concept refers to storing copies of data in multiple regions to ensure higher availability?
Explanation: Replication involves storing identical copies of data in multiple locations, ensuring data is available even if one region goes down. Indexing improves search performance, caching stores frequently-accessed data temporarily, and sharding splits data into separate pieces but does not inherently create multiple copies for redundancy and availability.
Which security feature ensures that data stored at rest in a cloud database is unreadable without decryption keys?
Explanation: Encryption protects data by converting it into an unreadable format unless one has the correct decryption key. Geo-replication refers to data distribution across regions, automatic failover relates to high-availability configurations, and scaling addresses resource allocation, none of which inherently protect the content of stored data.
Which data storage option uses flexible schemas and supports storing JSON-like documents?
Explanation: Document databases are designed for semi-structured data and allow storage of document-like objects such as JSON. Relational databases require a fixed schema, file systems store files with limited metadata, and columnar stores are optimized for analytical workloads rather than flexible document storage.
If you want to perform complex joins and aggregations in a structured data store, which language would you typically use?
Explanation: SQL is specifically designed for interacting with relational databases, supporting complex joins and aggregations. YAML is a data notation format, HTML is for web page markup, and Python is a general-purpose programming language, none of which are designed to query a structured data store directly.
What feature lets you restore a cloud database to a previous point in time, for example, before accidental data deletion?
Explanation: Point-in-time restore recovers a database to a chosen moment, which is crucial after accidental data changes. Autoscaling adjusts resources rather than data state, index rebuild improves search operations, and sharding divides the database for performance, offering no built-in data recovery.
Which feature allows a NoSQL database to support multiple data models, such as key-value, graph, document, and column-family?
Explanation: Multi-model capability enables one database engine to handle different types of data structures and query types, increasing flexibility. Partition tolerance addresses distribution and fault tolerance, table normalization organizes relational schema, and compression reduces storage consumption but does not relate to supporting multiple data models.