SQL ET POSTGRE 2.1 : What is a database

In this lesson we look at what a database actually is. We can say there are two complementary definitions. The first one: a database is an organised compilation of information or data. A simple offline example is the index at the back of a cake recipe book — recipes are compiled and ordered alphabetically. That index is useful if you want to find a specific cake, like a tiramisu on page 21. But that is the only thing the index lets us do. If we want to find every recipe that uses coffee, or sort the list by page rather than alphabetically, the index becomes completely useless.

The second definition

That is where the second definition comes in: a database is also a method to access and manipulate that data. It lets us sort recipes by page or select all cakes that contain coffee or vanilla. There are many kinds of databases. Flat files such as text-oriented stores or Excel spreadsheets allow recipes to be sorted alphabetically or filtered by an ingredient. There are also document-oriented databases, also known as NoSQL, where data is stored in flexible formats such as XML or JSON documents — they are very extensible but come with their own trade-offs.
  • Flat files / spreadsheets: sort, filter, easy to start with.
  • NoSQL / document databases: flexible, schemaless, scalable.
  • Relational databases: the most popular today (Oracle, MySQL, SQL Server, PostgreSQL).
Finally there are relational databases, which are by far the most popular today. When you hear about Oracle, MySQL or SQL Server, these are all relational database systems. PostgreSQL is also a relational database. In the next video we will see exactly what a relational database is and how PostgreSQL fits into this picture.

Summary

A database is both an organized compilation of information AND a method for accessing and manipulating that data. The lesson illustrates this with a cookbook index example: while a simple alphabetical index helps find recipes by name, a true database system enables filtering by ingredient or sorting by other criteria. Three main database types are introduced: flat-file/text databases (spreadsheets), document-oriented databases (NoSQL with XML/JSON), and relational databases (Oracle, MySQL, SQL Server, PostgreSQL), which dominate modern use.

Key points

  • A database has two essential components: organized data AND methods to access/manipulate it
  • A simple offline index (like a cookbook) shows the limitation of data without query/filter capabilities
  • Flat-file and text databases (spreadsheets) enable sorting and filtering by columns
  • Document-oriented (NoSQL) databases use flexible formats like XML and JSON, offering extensibility but with tradeoffs
  • Relational databases (Oracle, MySQL, SQL Server, PostgreSQL) are the most popular and widely used database type today

FAQ

What is the difference between a simple data collection and a true database?

A simple collection (like a cookbook index) is just organized information. A true database combines organized data with methods to query, filter, and manipulate it. You can search by specific criteria and sort in multiple ways.

What are the three main types of databases discussed?

Flat-file/text databases like Excel spreadsheets; document-oriented databases (NoSQL) using XML or JSON formats; and relational databases including Oracle, MySQL, SQL Server, and PostgreSQL, which are the most popular today.

What will be covered in the next lesson?

The next video will explore what a relational database is and how SQL and PostgreSQL specifically align with relational database concepts.