1.2. What Is a Relational Database?
According to our definition, a database is an organized collection of data. A relational database organizes data into tables. It is probably easier to illustrate the concept of a table than try to explain it. Table 1-1 is an example of a table that might appear in a book database.
Table 1-1. A Table of Books
Table 1-2. A Table of NBA Teams
Table 1-3. A Table of NBA Players
We'll get into the specifics about tables later on, but you should note a few things about these examples. Each table has a name, several columns, and rows containing data for each of the columns. A relational database represents all of your data in tables just like this and provides you with retrieval operations that generate new tables from existing ones. As a result, the user sees the entire database in the form of tables.
Where does SQL fit into all of this? We need some way to interact with the database. We need to define tables and retrieve, add, update, or delete data. SQL (Structured Query Language) is a computer language used to express database operations for data organized in a relational form (e.g., in tables). SQL is the industry standard language that most database programmers speak, and it is used by most RDBMS packages. As their names indicate, MySQL and mSQL are both SQL database engines. Due to their simplicity, however, they only support a subset of the current SQL standard, SQL2. We will discuss exactly how MySQL and mSQL support for SQL differs from the standard in later chapters.
Copyright © 2001 O'Reilly & Associates. All rights reserved.