Databases of Web Applications
Notes written by Skill-Lync from the recording · Updated 17 Nov 2026
What this workshop covers
This databases of web applications workshop explains DBMS basics, ACID, SQL vs NoSQL, e-commerce database design, caching and how databases scale. Recorded by Skill-Lync in March 2021, part 1 places the database behind the front end and back end of a web app, defines data, database and DBMS, walks through the ACID properties with a bank-transfer example, and contrasts relational tables with primary and foreign keys in phpMyAdmin (MySQL) against MongoDB collections and documents.
Part 2 turns an e-commerce requirement list into an entity relationship (ER) diagram and then into tables linked by keys. It then covers the other NoSQL families - column stores such as Cassandra, search databases such as Elasticsearch and key-value caches such as Redis - and the ways a busy application scales: vertical and horizontal partitioning, primary-replica replication, splitting data across machines and moving to the cloud. It closes with database job roles and salary figures the instructor quotes for 2020.
It suits computer science students and beginners who want the big picture of how data sits behind a web application. It is conceptual: no SQL queries are written, and normalization is only named, not taught.
Chapters
Part 1
- 0:00 What a web application is and why data matters
- 2:55 Data, database and DBMS defined
- 4:30 Front end, back end and database layers
- 5:33 DBMS components and the query language
- 6:33 ACID properties with a bank-transfer example
- 9:30 Backup, security, integrity and redundancy in a DBMS
- 11:14 Challenges: cost, hardware and transaction volume
- 12:27 Relational tables, primary and foreign keys in phpMyAdmin
- 14:21 MongoDB documents, Redis caching and when to pick NoSQL
Part 2
- 0:07 SQL as the way an application talks to the database
- 0:33 Case study: requirements for an e-commerce database
- 1:26 ER diagram: entities, attributes and participation
- 3:04 From ER diagram to tables linked by keys
- 4:01 Database design steps, ending with normalization
- 5:00 Column stores (Cassandra) and search DBs (Elasticsearch)
- 7:19 Key-value stores as a cache in front of the database
- 8:52 Scaling: vertical and horizontal partitioning
- 10:39 Primary-replica replication and splitting across machines
- 12:56 Database job roles and 2020 salary figures
Key points from the session
- A typical web app has three layers: a front end (HTML, CSS, JavaScript, React or Angular), a back end in Java, Python, Node.js or PHP, and a database that is either relational (MySQL, Oracle, PostgreSQL) or NoSQL (MongoDB, Cassandra). The back end sends a constant stream of requests to the database, which is why the database is often the first layer to get overloaded.
- Atomicity, shown with a transfer of 1,000 rupees: the debit from account A and the credit to account B must both happen or neither does. If anything fails midway the transaction is rolled back, and only when every step succeeds is it committed. Durability means a committed change, such as a like on a photo, is still there the next time you log in.
- In a relational database each table has a fixed schema of columns and a primary key that identifies each row, such as a student's roll number. A foreign key, like a faculty ID stored in a log table, points to a row in another table. The instructor shows both on a MySQL database in phpMyAdmin.
- To design a relational database, pick out the nouns in the requirements (customer, product, brand, category, segment, cart, payment, seller) as entities, draw the ER diagram with attributes and relationships, then turn it into tables that carry the keys they depend on. The payment timestamp is an attribute of the relationship between customer and payment, not of either entity.
- Cache pattern taught in the session: the application asks a key-value store such as Redis first; on a miss it reads the main database, saves the result to the cache and returns it. This takes repeated reads off the database server and suits short-lived data you only need for seconds.
- Search databases such as Elasticsearch keep their own index of the data, like the index of a book, which is how a name search across a huge user base returns in a fraction of a second. Because that index sits outside the primary database, a newly registered user takes a little time to appear in search.
- Scaling order covered: partition vertically (keep rarely read columns such as photos and signatures apart from ID and name) or horizontally (by ID range), replicate so writes go to one primary and reads are spread over replicas, then split the data across several machines. Replicas can lag slightly, which is acceptable for numbers like a follower count shown as 3.1 million.
What is the difference between SQL and NoSQL databases?
A relational (SQL) database stores data in tables with a fixed schema, keys and constraints, and supports ACID transactions, which is why the instructor says banking apps stay relational. NoSQL databases - document, key-value, column and search stores - trade some of that structure for flexible schemas, fast reads and writes and easier scaling to millions of users.
Why do web applications put a cache in front of the database?
Every request that reaches the main database adds load and delay. A key-value cache such as Redis holds frequently read or short-lived data. The application checks the cache first, queries the database only on a miss and then stores the result, so popular data comes back quickly and the database server handles far fewer requests.
How do you design a database for an e-commerce website?
Start from the requirements: customers register, browse products by brand, category and segment, use a wishlist and cart, pay and review; sellers list products and fulfil orders. Turn those nouns into entities in an ER diagram, then into tables that hold the keys they depend on, such as brand and category IDs in the product table, and refine the design.
Where to go next
Who should watch
For Computer Science Students
A 24 Mar 2021 workshop recording from Skill-Lync on CSE. For a structured course with projects on this topic, see Skill-Lync's computer science engineering courses.