Courseiva

DS0-001 · topic practice

Database Structures And SQL practice questions

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.

Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.

Editorial oversight:Johnson Ajibi· MSc IT Security, IEEE Senior Member
20 questionsDomain: Database Structures And SQL

What the exam tests

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.

Practice set

Database Structures And SQL questions

20 questions · select your answer, then reveal the explanation

A business user needs to calculate the average age of customers, but some age fields are NULL. Which function should be used to treat NULL as 0?

A transaction involves multiple updates that must either all succeed or all fail. Which command ensures this behavior?

Which command is used to restrict a user's access to a specific table?

Which THREE of the following are considered ACID properties in database transactions?

A financial analyst needs to calculate the total sales for each product category, but only for orders placed in the last quarter. The Orders table contains order_date and order_total, and the Products table contains product_id and category. Which SQL query correctly returns the category and total sales for the last quarter?

A data analyst runs a query on a PostgreSQL 15 database to find customers whose last purchase was more than 180 days ago. The query returns zero rows even though many customers meet the condition. The analyst confirms the 'last_purchase_date' column is defined as DATE and contains valid dates. Which function should the analyst use to calculate the day difference between the current date and 'last_purchase_date'?

A financial analyst runs a query that joins a large 'Transactions' table to a small 'CurrencyRates' table and filters on a date range. The execution plan shows a nested loop join with an index seek on the small table for every row of the large table, and the query runs slowly. Which change is most likely to improve performance without altering the result set?

A database developer is writing a query to retrieve a list of all customers who have placed at least one order in the last 30 days. The Orders table contains a CustomerID column and an OrderDate column. The developer wants to include each qualifying customer only once in the result set. Which SQL clause should be used?

A database administrator must ensure that a reporting query returns a consistent snapshot of data even while concurrent transactions are committing changes. The database uses multi-version concurrency control. Which isolation level should the administrator configure to guarantee that every read in the transaction sees the same snapshot?

A database developer is building a reporting query that must combine data from an Orders table and a Customers table. The query needs to include all customers, even those who have not placed any orders, and for customers with orders, it should show the order details. The developer wants to avoid returning duplicate customer rows when a customer has multiple orders. Which two techniques should the developer use? (Choose two.)

A database developer is optimizing a query that joins a large fact table 'Sales' with a dimension table 'Products' on product_id. The query filters on Products.category = 'Electronics' and aggregates sales amounts. The developer notices the query performs a sequential scan on 'Products' despite an index on category. The Products table has 100,000 rows, and only 5% belong to 'Electronics'. Which action is most likely to improve query performance?

A data analyst runs a transaction in a PostgreSQL 15 database: they issue an UPDATE on the 'inventory' table for 50 rows, then attempt to run a SELECT on the same table within the same transaction. The SELECT is blocked and waits indefinitely. The analyst confirms that no other session is holding a lock on those rows. Which of the following is the MOST likely cause of the block?

A database developer is writing a query to find all employees whose salary is above the average salary of their own department. The HR database contains an Employees table with columns employee_id, department_id, and salary. Which SQL statement will return the correct result?

A database administrator needs to store unstructured data that scales horizontally across multiple servers while maintaining high availability. Which database structure should be selected?

A user wants to add a new column to an existing table named 'Employees'. Which SQL statement should be executed?

To improve read performance on a table frequently queried by a specific column, which database object should be created?

A 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?

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?

Which SQL command is used to permanently remove all rows from a table while keeping the table definition intact?

Which type of join should be used to return all records from the 'Left' table and only matching records from the 'Right' table?

Free account

Track your progress over time

Create a free account to save your results and see which topics improve across sessions.

Focused Database Structures And SQL sessions

Start a Database Structures And SQL only practice session

Every question in these sessions is drawn from the Database Structures And SQL domain — nothing else.

Related practice questions

Related DS0-001 topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the DS0-001 exam test 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.
How should I use these practice questions?
Select your answer before revealing the explanation. Then read why each option is right or wrong — this active recall approach builds retention far faster than re-reading notes.
Can I practise just Database Structures And SQL questions in a focused session?
Yes — the session launcher on this page draws every question from the Database Structures And SQL domain. Use a 10-question session first to gauge your baseline, then move to 20 or 30 once the weak spots are clear.
Where can I practise other DS0-001 topics?
Use the topic links above to move to related areas, or go back to the DS0-001 question bank to see all topics.
Are these real exam questions or dumps?
These are original practice questions written to test the same concepts the DS0-001 exam covers. They are not copied from any real exam or dump site.