|
Matthew Kerridge
A relational database, one of several prevalent database types or models, serves as a good example
for describing database concepts. The associated database software can be referred to as a
relational database management system or RDBMS. Popular implementations include Microsoft SQL
Server, MySQL, and Oracle.
When operating upon data through an RDBMS, there are two sides to the operation of which one should
be aware. The server side handles the physical storage of the data. The client side interfaces with
the end user. The user process may take on many forms, from a report job running on a mainframe to
an interactive application on a wireless hand-held device. Because only the server side does the
actual storing and retrieving of data, and only the client side talks to the customer, the two work
in tandem to perform all operations.
Consider an example of a restaurant. Customers interface with the wait staff, who function as the
client side. When a meal is ordered, the waiter delivers the order to the kitchen, which is
equivalent to the database server. Once the chefs have prepared the meal, the waiter delivers it to
the diners' table.
Just as there is a menu governing what may be ordered in a restaurant, specific actions may be
performed on an RDBMS. The American National Standards Institute (ANSI) has defined a language of
commands for interacting with an RDBMS called Standard Query Language or SQL. Although individual
implementations of SQL may vary to some degree, they all allow the same basic operations.
The database server can handle multiple databases. For example, a state government could have
separate databases for the state's parks, driver registration, and department of revenue, all being
controlled by the same RDBMS server.
Within a database, data is stored in tables. Each table contains fields called columns. In the
licensed drivers database, relevant columns for the drivers table would include first, middle, and
last name, class of license, date of birth, and date of license expiration. Columns are defined as
different types of data; the name fields would hold character data, while a specific type exists
for holding the dates. Each licensed driver would be stored in a single entry or row in the table.
Tables also contain a field called the primary key that ensures that each row in the table is
unique; for the drivers table, the primary key would be the license number. An index can be added
to one or more columns in a table to speed access to data.
Data resides in multiple tables within a database. The street, city, state and zip code for each
driver could be stored in an address table, again including the license number as a primary key. It
would then be possible to bring the name and address information together by linking the license
number from the drivers table with the same column in the address table; this operation is called a
join.
SQL statements include write operations to insert a new row, and update or delete an existing row,
plus select statements for reading data from tables. Operations can either be performed on a single
row, e.g. by specifying a license number, or on a set of rows, say all drivers who reside in a
certain city.
Although specifics vary for other types of database software, many of the concepts remain the
same.
|