database and sql interview questions

This class was created by Brainscape user se7en coding. Visit their profile to learn more about the creator.

Decks in this class (10)

RDBMS Fundamentals
What is an RDBMS? Tables, rows, columns Primary key, foreign key, composite key Constraints: NOT NULL, UNIQUE, CHECK, DEFAULT Relationships: One-to-One, One-to-Many, Many-to-Many Normalization: 1NF, 2NF, 3NF, BCNF Denormalization and its trade-offs
42  cards
SQL Basics (DQL + DML)
SQL categories: DQL, DML, DDL, DCL, TCL SELECT, WHERE, ORDER BY, LIMIT INSERT, UPDATE, DELETE Aggregate functions: COUNT, SUM, AVG, MIN, MAX GROUP BY and HAVING JOINs: INNER, LEFT, RIGHT, FULL OUTER Aliases, DISTINCT, IS NULL vs = NULL
43  cards
Schema Design & DDL
CREATE, ALTER, DROP (tables, columns) Data types (PostgreSQL vs Oracle differences) Index creation syntax Unique constraints and composite keys Views and materialized views Sequences and identity columns Referential integrity
38  cards
Advanced SQL Queries
Subqueries and nested SELECTs Correlated subqueries Common Table Expressions (CTEs) with WITH Recursive CTEs CASE statements Window functions: RANK, DENSE_RANK, ROW_NUMBER, LAG/LEAD Advanced filtering and pagination
34  cards
Transactions & Concurrency
Transactions: BEGIN, COMMIT, ROLLBACK Savepoints and nested transactions ACID properties: Atomicity, Consistency, Isolation, Durability Isolation levels: READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, SERIALIZABLE Locking: Shared vs Exclusive locks Deadlocks and prevention
35  cards
Indexing & Optimization
Index types: B-tree, Hash, GiST (Postgres), Bitmap (Oracle) Index usage in queries EXPLAIN / EXPLAIN ANALYZE (Postgres), Execution Plan (Oracle) Index-only scans Composite and partial indexes Query rewriting and hints Vacuum and analyze in Postgres
32  cards
Stored Procedures & Triggers
Functions vs Procedures (Oracle PL/SQL, Postgres PL/pgSQL) Trigger types: BEFORE, AFTER, INSTEAD OF Writing procedures with control flow Exception handling in procedures Invoking from client code or SQL Security and performance considerations
30  cards
PostgreSQL Deep Dive
Data types: JSON, JSONB, arrays, enums SERIAL, BIGSERIAL, IDENTITY columns RETURNING clause on INSERT/UPDATE Table inheritance and partitioning Extensions: PostGIS, pg_trgm, uuid-ossp Role-based access control Vacuuming, analyze, and autovacuum
31  cards
Oracle Deep Dive
Oracle-specific data types Pseudocolumns: ROWNUM, ROWID Sequences and triggers for auto-incrementing MERGE statement for upserts PL/SQL packages, cursors, and exception handling Oracle optimizer hints Oracle tools: SQL*Plus, SQL Developer
29  cards
Real-World Scenarios & Interview Challenges
Schema design case studies Soft deletes vs hard deletes Data archiving strategies Denormalization in practice Query optimization walkthroughs Data migration (e.g., Oracle to Postgres) Data consistency across services
41  cards

More about
database and sql interview questions

  • Class purpose General learning

Learn faster with Brainscape on your web, iPhone, or Android device. Study se7en coding's database and sql interview questions flashcards now!

How studying works.

Brainscape's adaptive web mobile flashcards system will drill you on your weaknesses, using a pattern guaranteed to help you learn more in less time.

Add your own flashcards.

Either request "Edit" access from the author, or make a copy of the class to edit as your own. And you can always create a totally new class of your own too!

What's Brainscape anyway?

Brainscape is a digital flashcards platform where you can find, create, share, and study any subject on the planet.

We use an adaptive study algorithm that is proven to help you learn faster and remember longer....

Looking for something else?

Make Flashcards