This video is available to students only


In this lesson, we compare SQL and NoSQL databases.

SQL databases use a defined schema for structured data and NoSQL databases use a dynamic schema for unstructured or polymorphic data. We've heard this quite a bit but what does this actually mean?

To get a better understanding, let's take a look at some live data.

In one browser tab, we'll have a MongoDB database open. We'll refer to the database that was first created with MongoDB Atlas from lesson 4.9 in Part I of the course. In our database, we'll notice each piece of data is stored as a JSON-like document.

In another browser tab, we'll have a PostgreSQL database. We'll show you how to install and seed your own PostgreSQL database in the next few lessons. When we take a look at our PostgreSQL database, we'll notice data is stored in tables much like a spreadsheet.

Both databases contain the same listing data. However, in PostgreSQL, there is a defined schema governing the shape of each listing.

To demonstrate some more, we'll head over to VSCode and start our Node server:

At this moment, our server is still connected to our MongoDB database. If we execute a query for all the listings, we'll see our entire listings collection in the returned output.


When we developed our server in Part I and Part II of the course, we utilized TypeScript in our source code to help define the shape of our listing data in our source code.

Start a new discussion. All notification go to the author.