DS0-001 · domain
Database Structures And SQL
This domain covers relational and non-relational database structures, SQL statement types (DDL, DML, DCL, TCL), and schema design for evolving requirements. Questions present practical scenarios such as granting read-only access, migrating between RDBMSs, or modeling variable attributes. You must choose correct SQL syntax, understand privilege scope, and recognize portability issues across PostgreSQL, MySQL, SQL Server, and Oracle.
Focused practice
Practice Database Structures And SQL questions
Scored sessions drawing only from this domain — pick a length below.
Start 20-question practice test →What this domain covers
What to know about Database Structures And SQL
Candidates must write correct SQL for access control and schema design, and diagnose DDL portability. The single most important thing is to match the exact privilege or data model to the scenario: use GRANT SELECT for read-only, and choose flexible structures for variable attributes.
Granting read-only access with GRANT SELECT on a specific table in PostgreSQL
Using DCL statements to prevent INSERT, UPDATE, or DELETE while allowing SELECT
Designing schemas for variable attributes using JSON, EAV, or document models
Identifying DDL portability issues like data type or constraint differences during migration
Watch out for
Common Database Structures And SQL exam traps
- ▸Confusing GRANT SELECT with GRANT ALL PRIVILEGES or forgetting to revoke default PUBLIC privileges on the table.
- ▸Assuming a single fixed schema can handle thousands of categories with different attributes instead of using flexible models like JSON or EAV.
- ▸Overlooking vendor-specific DDL syntax such as AUTO_INCREMENT vs. SERIAL or IDENTITY, causing migration failures.
Question index
All Database Structures And SQL questions (59)
Click any question to see the full explanation, or start a practice session above.
A developer needs to ensure that a 'Customer_ID' field in a 'Orders' table always references a valid ID in the 'Customers' table. Which constraint should be applied?
Hard2A database administrator is designing a schema for a financial application that must enforce that every account balance is never negative. The application inserts and updates balances frequently, and the DBA wants the rule enforced at the database level regardless of which application or script performs the change. Which database object should the DBA create to enforce this rule?
Hard3Which SQL statement is used to remove a table entirely from the database?
Easy4A database administrator is designing a table to store product inventory. The table must enforce that each product has a unique SKU and that the quantity_on_hand column never drops below zero. The administrator adds a PRIMARY KEY constraint on SKU and a CHECK constraint on quantity_on_hand. A developer then tries to insert a row with a NULL SKU and a negative quantity. Which statement describes the outcome?
Hard5A database architect is designing a schema for a high-volume transaction system. The system requires strict data consistency and supports complex queries with multiple joins. The architect must choose between a normalized relational model and a denormalized model. Which approach is most appropriate and why?
Hard6A financial services company stores trade records in a table where the combination of TradeDate and TradeID must be unique, but individual TradeID values can repeat on different dates. The database administrator needs to enforce this uniqueness at the database level. Which constraint should be implemented?
Medium7A data engineer is designing a table that stores sensor readings. Each row must include the sensor ID, a timestamp, and a numeric reading. The sensor ID and timestamp together uniquely identify each row, and the table will be queried frequently by sensor ID for the most recent reading. Which table design best supports this scenario?
Medium8A data analyst needs to retrieve a list of all unique countries from a Customers table, sorted alphabetically. Which SQL statement should be used?
Easy9An application requires an automatic timestamp for every row inserted into an 'Audit' table. Which feature should the developer implement?
Hard10Which TWO of the following are DDL (Data Definition Language) commands?
Easy11A data analyst needs to calculate the average order value per customer for the previous month. The Orders table contains CustomerID, OrderID, and OrderTotal. The analyst writes a query that includes the AVG(OrderTotal) function and groups by CustomerID. However, the result shows some customers with an average of NULL. Which condition could cause this?
Medium12Which TWO of the following statements about SQL are true?
Easy13A query is slow due to excessive scanning of a large table. The execution plan shows a 'Table Scan'. What is the most likely missing element?
Hard14A developer needs to retrieve a list of all customers who have placed at least one order, along with the total amount spent by each. The 'Customers' table has one row per customer, and the 'Orders' table has one row per order with a 'CustomerID' foreign key. Which SQL construct should the developer use?
Easy15A retail company is designing a data warehouse star schema for sales analysis. The team must choose attributes for the fact table and the dimension tables. Which TWO of the following should be placed in the fact table rather than a dimension table? (Choose two.)
Medium16A user wants to add a new column to an existing table named 'Employees'. Which SQL statement should be executed?
Easy17An application is experiencing deadlocks. Which strategy would effectively reduce the frequency of deadlocks?
Medium18Which SQL command is used to permanently remove all rows from a table while keeping the table definition intact?
Medium19Which THREE of the following are standard SQL aggregate functions?
Hard20A database administrator is reviewing a schema and needs to ensure data integrity. Which TWO of the following are valid SQL constraints that can be applied to a column to enforce data integrity? (Choose two.)
Hard21Which DML statement is used to update existing records in a database table?
Easy22Which operator is used to search for a pattern in a string column?
Easy23To improve read performance on a table frequently queried by a specific column, which database object should be created?
Medium24A database developer needs to combine the results of two different SELECT queries into a single result set. Which operator should be used?
Medium25A financial analyst runs a query that joins a 500-million-row transactions table to a 200-row currency table on a non-indexed currency code column. The optimizer chooses a nested loop join and the query runs for hours. Which execution strategy should the analyst encourage to improve performance most effectively?
Hard26Which SQL keyword is used to eliminate duplicate values from a query result set?
Easy27A database administrator is reviewing a query that joins a large Sales table with a small Regions table. The query filters on a column in the Regions table and returns only matching rows from both tables. The administrator notices that the query plan shows a nested loop join. Which factor most likely influenced the optimizer's choice of this join method?
Hard28A database administrator is designing a schema for a new order processing system. The system must enforce that every order is associated with exactly one customer, and that a customer can place many orders. Which relationship type and implementation should be used?
Hard29Which TWO of the following are common types of NoSQL databases?
Medium30A database administrator is reviewing a schema for a reporting database. The team needs to ensure that queries against a large 'Sales' table return consistent results even if a long-running report is executing while new sales are being inserted. Which TWO of the following techniques help provide a consistent snapshot of data for the report? (Choose two.)
Medium31A database team is designing a new table to store employee data. They need to ensure that the table structure supports efficient queries and maintains data integrity. Which two of the following statements about primary keys and indexes are true? (Choose two.)
Hard32A database developer is writing a query that must return the product_name and the total quantity sold for each product from a Sales table. The Sales table contains product_id, quantity, and sale_date. The Products table contains product_id and product_name. The query should include only products that have total sales quantity greater than 100. Which SQL statement is correct?
Medium33A developer needs to calculate the running total of sales. Which SQL feature is most appropriate?
Hard34To implement a secure 'Multi-Tenant' architecture, which design approach is most effective for data separation?
Hard35Which type of join should be used to return all records from the 'Left' table and only matching records from the 'Right' table?
Easy36Which TWO of the following scenarios are best suited for using a 'View'?
Hard37To prevent unauthorized access to specific columns in a 'Salary' table, which object should be created for the reporting team?
Medium38An analyst is writing an SQL query to retrieve total sales per region, but the result must only show regions with more than 100 transactions. Which clause is required?
Medium39Which NoSQL structure is best suited for scenarios where data relationships are complex and frequently traversed?
Hard40Which TWO of the following are common database maintenance tasks?
Hard41A database administrator needs to add a new column named 'loyalty_points' of type INTEGER to an existing 'customers' table without affecting existing rows' data. Which SQL statement should the administrator execute?
Easy42A database administrator needs to store unstructured data that scales horizontally across multiple servers while maintaining high availability. Which database structure should be selected?
Medium43Which scenario best justifies the use of a relational database over a NoSQL database?
Medium44A database administrator wants to check the current connection count. Which system catalog or dynamic management view would typically provide this information?
Medium45Which THREE of the following are standard SQL join types?
Medium46Which TWO of the following are potential issues when denormalizing a database?
Hard47A database administrator needs to grant a new analyst read-only access to a specific table named 'SalesData' in a PostgreSQL database. The analyst should be able to query the table but not modify it. Which SQL statement should the administrator execute?
Easy48A database administrator needs to grant a user the ability to retrieve data from a specific table but must prevent the user from modifying or deleting any data. Which SQL statement should the administrator execute?
Easy49A data architect is designing a schema for a system that must store highly variable product attributes across thousands of categories, where each category has a different set of attributes and the schema must evolve frequently without downtime. Which database structure is best suited for this requirement?
Hard50When migrating data between two different relational databases, which DDL-related issue is most likely to cause failure if ignored?
Hard51A data engineer is designing a database for a sensor network that generates 20,000 readings per second. The schema is fixed, and each reading must be stored with minimal write latency while preserving the exact order of arrival for later time-series analysis. Which database structure should the engineer choose?
Medium52What is the primary purpose of a 'Normalization' process in database design?
Medium53Which THREE of the following are benefits of database indexing?
Medium54A database administrator is investigating performance degradation during heavy concurrent write operations. Which isolation level provides the highest level of data consistency but the lowest concurrency?
Hard55Which THREE of the following are common SQL constraints?
Medium56Which SQL clause is used to sort the result of a query by one or more columns?
Medium57A data engineer is reviewing a table that stores customer support tickets. The table has a column TicketID defined as an IDENTITY column and a column CreatedDate defined as DATETIME2 with a DEFAULT constraint of SYSDATETIME(). During a bulk insert of 500 rows, the engineer notices that all 500 rows received the exact same CreatedDate value, but each TicketID is unique and sequential. What is the most likely explanation for the identical CreatedDate values?
Medium58A data engineer is designing a table in a relational database to store product inventory records. The business requires that the combination of 'ProductCode' and 'WarehouseID' uniquely identifies each row, and that no duplicate pairs are allowed. Which constraint should be applied to enforce this requirement?
Medium59Which THREE of the following are components of a database connection string?
MediumOther domains
All DS0-001 exam domains
Frequently asked questions
- What does the Database Structures And SQL domain cover on the DS0-001 exam?
- Candidates must write correct SQL for access control and schema design, and diagnose DDL portability. The single most important thing is to match the exact privilege or data model to the scenario: use GRANT SELECT for read-only, and choose flexible structures for variable attributes.
- How many questions are in this domain?
- This page lists all 59 Database Structures And SQL questions in the DS0-001 question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
- What is the best way to practise this domain?
- Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
- Can I practise only Database Structures And SQL questions?
- Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.