LearnThatStack Ace your next interview
Database Technologies

Database Design.

Start free Change topic Change
Practice · Questions

All questions

Showing of 39
Beginner 10
01

What is a database and what are the advantages of using a database management system (DBMS)?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

A database is an organized collection of structured data stored electronically. A database management system (DBMS) is the software that stores, retrieves and manages that data.

Its advantages:

  • Data independence, so applications don't depend on how the data is stored.
  • Integrity, because constraints keep the data accurate and consistent.
  • Security through access control and authentication.
  • Concurrent access by many users at the same time.
  • Built-in backup and recovery.
  • Less redundancy, with duplicate data kept to a minimum.
  • Central control of every data operation.
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

Why there's no diagram: “”

The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

02

What is the difference between DDL, DML, DCL, and TCL?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

These four categories group SQL commands by what they act on. Data Definition Language (DDL) defines the structure of the database, such as its tables. Data Manipulation Language (DML) reads and changes the rows in those tables. Data Control Language (DCL) grants and revokes access, and Transaction Control Language (TCL) manages transactions.

Group What it does Commands Example
DDL Defines the database structure CREATE, ALTER, DROP, TRUNCATE CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(50));
DML Manipulates data within tables SELECT, INSERT, UPDATE, DELETE INSERT INTO users (id, name) VALUES (1, 'John');
DCL Controls access to data GRANT, REVOKE GRANT SELECT ON users TO user_role;
TCL Manages transactions COMMIT, ROLLBACK, SAVEPOINT COMMIT; or ROLLBACK;

COMMIT makes a transaction's changes permanent and ROLLBACK undoes them. SAVEPOINT marks a point inside the transaction that you can roll back to.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

Why there's no diagram: “”

The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

03

What is an Entity-Relationship (ER) model and what are its components?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

An Entity-Relationship (ER) model is a conceptual data model that describes the structure of a database as entities, attributes and relationships. Its components are:

  • An entity is a real-world object or concept, drawn as a rectangle, such as a Customer, Product or Order.
  • An attribute is a property of an entity, drawn as an oval, like a Customer's CustomerID, Name and Email.
  • A relationship is an association between entities, drawn as a diamond, such as a Customer that "places" an Order.
  • Cardinality is how many instances of one entity can link to another. A user and their profile are one-to-one, or 1:1. A customer and their orders are one-to-many, or 1:M. Students and courses are many-to-many, or M:N.
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

Why there's no diagram: “”

The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

04

What is normalization and why is it important?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Normalization is the process of organizing a database to reduce redundancy and improve data integrity. You decompose large tables into smaller, well-structured ones and define the relationships between them, so each fact is stored once.

It matters because:

  • Removing duplicate data saves storage and removes copies that could disagree.
  • It prevents update anomalies, because a change is made in only one place.
  • Data integrity improves, with fewer chances of inconsistent data.
  • The structure is easier to maintain and modify.

The cost is more tables to manage and more JOINs in queries, which can slow reads.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

Why there's no diagram: “”

The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

05

Explain different types of keys in a database.

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Most types of key identify the rows of a table, and a foreign key links one table to another. Each is a column or a set of columns.

  • A primary key uniquely identifies each row, so it is unique and never NULL, like CustomerID in Customer.
  • A candidate key is any minimal column or combination that could be the primary key. It is unique and not NULL, and a table can have several. The ones not chosen are alternate keys.
  • A super key is any set of columns that uniquely identifies a row, such as the primary key plus extra columns.
  • A composite key is a primary key of several columns, like (OrderID, ProductID) in OrderDetails.
  • A foreign key references another table's primary key to create a relationship, like CustomerID in Order. It can be NULL unless constrained.
  • A unique key enforces uniqueness but allows NULL. PostgreSQL allows many NULL values by default, while SQL Server allows one.
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

Why there's no diagram: “”

The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

06

What are the different types of relationships in databases?

Part of Pro
07

What are database indexes and how do they improve performance?

Part of Pro
08

What are database constraints and how do they ensure data integrity?

Part of Pro
09

Explain the concept of database views and their advantages.

Part of Pro
10

Explain the ACID properties of a transaction and why they matter.

Part of Pro
Intermediate 25
11

Explain the difference between OLTP and OLAP systems.

Part of Pro
12

How do you convert an ER diagram to a relational model?

Part of Pro
13

What is a database schema, and what is the three-level architecture?

Part of Pro Visual
14

Explain the different normal forms (1NF, 2NF, 3NF, BCNF).

Part of Pro
15

When would you consider denormalization?

Part of Pro
16

What is referential integrity and how is it maintained?

Part of Pro
17

When should you create an index and when should you avoid it?

Part of Pro
18

Explain query optimization techniques.

Part of Pro
19

What are database transactions and isolation levels?

Part of Pro
20

Explain deadlocks and how to prevent them.

Part of Pro
21

What is the difference between optimistic and pessimistic locking?

Part of Pro
22

When would you choose NoSQL over relational databases?

Part of Pro
23

What are materialized views and when would you use them?

Part of Pro
24

Explain database connection pooling and its benefits.

Part of Pro
25

What are database triggers and when should you use them?

Part of Pro
26

Explain database backup and recovery strategies.

Part of Pro
27

What is data modeling and what are the different approaches?

Part of Pro
28

Explain database security best practices.

Part of Pro
29

What are Common Table Expressions (CTEs) and when are they useful?

Part of Pro
30

What is the difference between a natural key and a surrogate key?

Part of Pro
31

What is the difference between a star schema and a snowflake schema?

Part of Pro
32

Does column order matter in a composite index?

Part of Pro
33

How would you design a database schema for an e-commerce application?

Part of Pro Visual
34

What is database partitioning and when is it useful?

Part of Pro
35

How does database partitioning differ from sharding?

Part of Pro
Expert 4
36

Explain CAP theorem and its implications for database design.

Part of Pro
37

What is database sharding and what are its challenges?

Part of Pro
38

Explain database replication strategies.

Part of Pro
39

Explain MVCC (Multi-Version Concurrency Control) and its benefits.

Part of Pro

No matches

Try a different filter or search term.

Know someone prepping for Database Design? Send them this set.
Pro · $10/mo

34 of 39 Database Design answers are in Pro.

Full answers, code samples, and AI explanations that go simpler or deeper. Cancel anytime.

  • Full answers + code
  • AI explanations, simpler or deeper
  • 1,000 AI credits / month
  • Cancel anytime

Change topic

Pick a different technology or stack. Your current topic stays put until you choose a new one.

Technologies
No technologies match “”.
Cross-cutting topics
No topics match “”.
By role
Stacks & frameworks

MEAN

MongoDB, Express, Angular, Node.js

MERN

MongoDB, Express, React, Node.js

LAMP

Linux, Apache, MySQL, PHP

Django

Python Full-Stack Development

Ruby on Rails

Convention over Configuration

Serverless on AWS

Serverless Architecture on AWS

Flutter Mobile

Flutter Cross-Platform Mobile Development

Spring Boot

Enterprise Java Development

.NET

Microsoft Ecosystem

Vue

Vue.js, Vite, TypeScript, Tailwind, Node.js

Go Backend

Golang, gRPC, PostgreSQL, Redis, RabbitMQ

FastAPI

Python, FastAPI, SQLAlchemy, PostgreSQL

React Native

React, TypeScript, Redux, Firebase

iOS Native

Swift, SwiftUI, UIKit, Firebase

Android Native

Java, Jetpack Compose, Firebase

DevOps / Platform

Docker, Kubernetes, Terraform, CI/CD

AI Engineer

LLMs, RAG, Agents, Evals

AI-Powered Developer

Claude Code, Copilot, Agentic Workflows

Core SWE Interview Prep

Data structures, algorithms, OS, concurrency, networking, git