CHAPTER 10Queries

We have spent a considerable amount of effort designing our database in order to make sure the data can be stored in a consistent and accurate way. In this chapter, we are going to look at how to get information back out again. The data will be stored in many separate tables, and depending on the questions we are asking, we will need to combine data from those tables in a number of different ways. This chapter is just an introduction to the art of querying.

Simple Queries on One Table

Let's start with looking at just one table. We'll use the Student table, a small part of which is shown in Figure 10-1, to illustrate some of the main types of queries that are possible.

Figure 10-1. A small part of the Student table

Over ...

Get Beginning Database Design now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.