Asking questions with SQL
You talk to a relational database in SQL, the Structured Query Language. IBM developed it in the 1970s, with Oracle as a major early contributor, and it became an ANSI standard. Nearly every relational database still speaks it, with extensions from vendors like IBM, Oracle and Microsoft. SQL is declarative: you describe what you want, and the database works out how to find it. Without an index, the simplest strategy is to check every row and keep the ones that match. Figure 1 shows exactly that. Four verbs cover most daily work:SELECT reads, UPDATE changes, INSERT adds and DELETE removes. The WHERE clause narrows any of them to the rows you mean.
The DBMS in the middle
Apps never open the stored files themselves. Every request goes through the DBMS, which acts as the interface between the data and everyone who needs it. Familiar examples include MySQL, Microsoft SQL Server, Oracle Database, Microsoft Access, FileMaker Pro and dBASE. One DBMS deserves a mention for its reach. MySQL is an open source relational system built for web applications. It runs on almost any platform and handles millions of queries, which is why it powers services like Airbnb, Uber, LinkedIn and YouTube.Sixty years of data models
The first databases of the early 1960s were navigational: programs had to walk from record to record along fixed paths. They worked, but they were rigid. Each generation since has fixed a limit of the one before it.The relational model won because it let people ask new questions without rewriting the program.
Why not a spreadsheet?
Spreadsheets and databases both store information, but they were built for different jobs. They differ in how data is stored and manipulated, who can access it, and how much it can hold. A spreadsheet was designed for one person working on one file. A database is designed for large volumes of data and many people querying and changing it at the same time, securely and with complex logic. Figure 4 runs the same six requests against each.Types of databases
There are several dozen kinds of database, and the best one depends on how the data will be used. Here are the ones you will meet most often. Two more labels describe how a database is built or delivered rather than its shape. An open source database publishes its code and can be SQL or NoSQL. A multimodel database combines several models, such as tables, documents and graphs, in one back end.What makes it hard
Large databases are expected to answer complex queries almost instantly. Keeping that promise puts constant pressure on the people who run them.Self-driving databases
Today many databases run in the cloud, either as a traditional install on cloud machines or as database as a service, where the provider handles administration. The newest step is the self-driving or autonomous database. It uses machine learning to handle tuning, security, backups and updates that administrators used to do by hand. The first one was announced in late 2017. The goal is to free people from routine upkeep so they can spend time on what the data means.Check yourself
Glossary
For AI agents
Adapted from Oracle’s overview “What Is a Database?”. Figures are simplified teaching models; timings in Figure 4 are illustrative.