🇮🇳 Full Stack Web Development · subject

Full Stack Web Development Databases & Data Persistence Syllabus

The Databases & Data Persistence syllabus for Full Stack Web Development in full: 4 chapters, 13 topics and 33 sub-topics, every one listed below, plus 50 Databases & Data Persistence flashcards with answers.

4Chapters
13Topics
33Sub-topics
50Flashcards

Databases & Data Persistence syllabus: all 4 chapters

Expand any chapter to see its topics and sub-topics.

  1. Database Fundamentals

    3 topics
    • Types of Databases
      • Relational vs non-relational
      • When to use SQL vs NoSQL
    • Data Modeling
      • Entities, attributes and relationships
      • Schema design principles
    • CRUD and Querying Concepts
      • Create, read, update, delete operations
      • Indexing and basic optimization
  2. Relational Databases with SQL

    4 topics
    • SQL Basics
      • Creating tables and data types
      • SELECT, WHERE and ORDER BY
      • INSERT, UPDATE and DELETE
    • Relationships and Joins
      • Primary and foreign keys
      • INNER, LEFT and RIGHT joins
      • Normalization basics
    • Advanced Queries
      • Aggregations and GROUP BY
      • Subqueries
      • Transactions and ACID
    • PostgreSQL/MySQL with Node
      • Connecting via drivers
      • Parameterized queries
  3. NoSQL with MongoDB

    3 topics
    • MongoDB Fundamentals
      • Documents and collections
      • BSON and data types
      • MongoDB Atlas setup
    • CRUD with MongoDB
      • insertOne, find and projection
      • updateOne and deleteOne
      • Query operators
    • Aggregation and Indexing
      • Aggregation pipeline
      • Indexes and performance
  4. ODM/ORM and Integration

    3 topics
    • Mongoose ODM
      • Schemas and models
      • Validation and middleware (hooks)
      • Population and references
    • SQL ORMs
      • Sequelize/Prisma overview
      • Models and migrations
    • Connecting Databases to APIs
      • Repository pattern
      • Handling connection pooling
      • Seeding and migrations

Full Stack Web Development Databases & Data Persistence flashcards — 50 questions with answers

  1. What is a database?

    An organized collection of structured or unstructured data stored electronically so it can be efficiently accessed, managed, queried, and updated, typically through a Database Management System (DBMS).

  2. What is the difference between a relational (SQL) and a non-relational (NoSQL) database?

    Relational databases store data in tables with fixed schemas and use SQL with relationships/joins (e.g., PostgreSQL, MySQL). NoSQL databases store data flexibly (documents, key-value, column, graph) with dynamic schemas and scale horizontally (e.g., MongoDB).

  3. Name the four main types of NoSQL databases.

    Document (MongoDB), key-value (Redis), column-family (Cassandra), and graph (Neo4j).

  4. What does ACID stand for in relational databases?

    Atomicity, Consistency, Isolation, Durability — the four properties guaranteeing reliable database transactions.

  5. What is the BASE model associated with many NoSQL databases?

    Basically Available, Soft state, Eventual consistency — a relaxed consistency model favoring availability and scalability over strict ACID guarantees.

  6. What is data modeling?

    The process of designing the structure of data — defining entities, attributes, relationships, and constraints — to represent how data is stored and related in a database.

  7. What are the three levels of data modeling?

    Conceptual (high-level entities and relationships), logical (detailed attributes, keys, normalization, DB-agnostic), and physical (actual tables, types, indexes for a specific DBMS).

  8. What is a primary key?

    A column (or set of columns) that uniquely identifies each row in a table; it must be unique and cannot contain NULL values.

  9. What is a foreign key?

    A column that references the primary key of another table, enforcing referential integrity by linking related rows across tables.

  10. What is normalization in database design?

    The process of organizing data to reduce redundancy and improve integrity by dividing tables and defining relationships, typically through normal forms (1NF, 2NF, 3NF).

  11. What do the first three normal forms (1NF, 2NF, 3NF) require?

    1NF: atomic values, no repeating groups. 2NF: 1NF plus no partial dependency on part of a composite key. 3NF: 2NF plus no transitive dependency (non-key attributes depend only on the key).

  12. What does CRUD stand for?

    Create, Read, Update, Delete — the four basic operations for persistent data storage.

  13. Which SQL statements map to each CRUD operation?

    Create = INSERT, Read = SELECT, Update = UPDATE, Delete = DELETE.

  14. What is a query in the context of databases?

    A request to retrieve or manipulate data, typically written in a query language like SQL, that the DBMS executes against stored data.

  15. What is a schema in a relational database?

    The blueprint defining the structure of the database — tables, columns, data types, keys, and constraints.

  16. What is the basic syntax to retrieve all columns from a table named users in SQL?

    SELECT * FROM users;

  17. What does the WHERE clause do in SQL?

    It filters rows in a query, returning only those that satisfy a specified condition (e.g., SELECT * FROM users WHERE age > 18;).

  18. What is the difference between the WHERE and HAVING clauses in SQL?

    WHERE filters individual rows before grouping; HAVING filters groups after GROUP BY and can use aggregate functions.

  19. What does ORDER BY do, and what is its default sort direction?

    ORDER BY sorts query results by one or more columns; the default direction is ascending (ASC), with DESC for descending.

  20. Name the five most common SQL aggregate functions.

    COUNT, SUM, AVG, MIN, and MAX.

Show the other 30 Databases & Data Persistence flashcards
  1. What does the GROUP BY clause do?

    It groups rows that share the same values in specified columns so aggregate functions can be applied to each group.

  2. What are the three types of relationships in relational data modeling?

    One-to-one, one-to-many, and many-to-many.

  3. How is a many-to-many relationship implemented in a relational database?

    Using a junction (join/bridge) table that holds foreign keys referencing the primary keys of both related tables.

  4. What is a SQL JOIN?

    An operation that combines rows from two or more tables based on a related column between them, usually matching foreign keys to primary keys.

  5. What is the difference between an INNER JOIN and a LEFT JOIN?

    INNER JOIN returns only rows with matches in both tables; LEFT JOIN returns all rows from the left table plus matching rows from the right (NULLs where no match).

  6. What does a FULL OUTER JOIN return?

    All rows from both tables, with matching rows combined and NULLs filled in where there is no match on either side.

  7. What is a self join?

    A join in which a table is joined to itself, using table aliases, to compare rows within the same table (e.g., employees to their managers).

  8. What is a subquery in SQL?

    A query nested inside another query (in SELECT, FROM, WHERE, etc.) whose result is used by the outer query.

  9. What is the difference between UNION and UNION ALL?

    UNION combines result sets and removes duplicate rows; UNION ALL combines them and keeps all duplicates, making it faster.

  10. What is an index in a database and why is it used?

    A data structure (often a B-tree) that stores a sorted reference to column values to speed up data retrieval, at the cost of extra storage and slower writes.

  11. What is a transaction in SQL?

    A sequence of one or more operations treated as a single atomic unit that either fully commits or fully rolls back, preserving data integrity.

  12. What are window functions used for in advanced SQL?

    They perform calculations across a set of rows related to the current row (using OVER) without collapsing rows, enabling running totals, rankings, and moving averages.

  13. Which Node.js library is commonly used to connect to PostgreSQL?

    The 'pg' (node-postgres) package.

  14. Which Node.js package is commonly used to connect to MySQL?

    mysql2 (or the older mysql package).

  15. What is a connection pool and why use it when connecting Node to a SQL database?

    A cache of reusable database connections that reduces the overhead of opening/closing connections per request, improving performance and handling concurrency.

  16. What is a parameterized (prepared) query and why is it important?

    A query where values are passed separately from the SQL text using placeholders; it prevents SQL injection and improves performance through query plan reuse.

  17. What is MongoDB?

    A document-oriented NoSQL database that stores data as flexible, JSON-like BSON documents organized into collections, with dynamic schemas.

  18. What are the MongoDB equivalents of a SQL table, row, and column?

    Collection (table), document (row), and field (column).

  19. What is BSON in MongoDB?

    Binary JSON — the binary-encoded serialization format MongoDB uses to store documents, supporting extra types like Date, ObjectId, and binary data.

  20. What is the _id field in a MongoDB document?

    The unique primary key of a document; if not provided, MongoDB auto-generates a 12-byte ObjectId for it.

  21. Which MongoDB methods perform CRUD operations?

    Create: insertOne/insertMany; Read: find/findOne; Update: updateOne/updateMany/replaceOne; Delete: deleteOne/deleteMany.

  22. How do you find all documents in a MongoDB collection where status equals 'active'?

    db.collection.find({ status: "active" })

  23. What is the MongoDB aggregation pipeline?

    A framework that processes documents through a sequence of stages (e.g., $match, $group, $sort, $project), each transforming the data and passing results to the next stage.

  24. What do the $match and $group aggregation stages do?

    $match filters documents (like WHERE); $group aggregates documents by a specified key and computes accumulated values (like GROUP BY with aggregates).

  25. Why are indexes important in MongoDB?

    They allow MongoDB to locate documents efficiently without scanning the whole collection; without them queries perform a full collection scan (COLLSCAN).

  26. What is Mongoose?

    An Object Data Modeling (ODM) library for MongoDB and Node.js that provides schema definitions, validation, type casting, middleware, and model-based queries.

  27. What is a Mongoose schema versus a Mongoose model?

    A schema defines the structure, fields, types, and validation of documents; a model is a constructor compiled from a schema used to create and query documents in a collection.

  28. What is an ORM, and name two popular SQL ORMs for Node.js.

    An Object-Relational Mapper maps database tables to programming objects, letting you query using code instead of raw SQL. Popular Node.js examples: Sequelize and Prisma (also TypeORM).

  29. What is one key advantage and one disadvantage of using an ORM?

    Advantage: faster development with cleaner, database-agnostic, injection-safe code. Disadvantage: performance overhead and less control over complex/optimized queries.

  30. How are databases typically connected to APIs in a backend application?

    The API server uses a database driver or ORM/ODM to open a (pooled) connection, then route handlers execute queries within request handling and return the results as JSON responses, with credentials kept in environment variables.

Full Stack Web Development Databases & Data Persistence FAQ

What is in the Full Stack Web Development Databases & Data Persistence syllabus?

Full Stack Web Development Databases & Data Persistence is split into 4 chapters: Database Fundamentals, Relational Databases with SQL, NoSQL with MongoDB and ODM/ORM and Integration. Together they contain 13 topics and 33 sub-topics.

How many chapters are in Full Stack Web Development Databases & Data Persistence?

4 chapters, containing 13 topics and 33 sub-topics. The largest chapter is Relational Databases with SQL, with 4 topics.

Are there flashcards for Full Stack Web Development Databases & Data Persistence?

Yes — a 50-card Databases & Data Persistence deck, printed in full in the flashcards section of this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.