Chemistry Reference
In-Depth Information
chapter 2
Relational Database Fundamentals
2.1 Introduction
A relational database provides a way to store large amounts of data in
tables that are either independent or related to one another. These tables
have some similarities to spreadsheets, such as those used in Excel or
OpenOffice. However, there are many advantages to storing data in rela-
tional tables. The purpose of this chapter is to provide guidelines for
database design to ensure the creation of clear, extensible, and efficient
database tables. There are many topics with much more detailed informa-
tion about database design, rules, and theory. After reading this chapter,
you will be familiar with the concepts of tables, rows, columns, schemas,
entity-relationship diagrams, primary keys, foreign keys, indexes, unique-
ness, sequences, constraints, and joining tables.
The tables are formally called relations, referring to the mathematical
set theory used in the original work on relational databases. 1 In database
theory, rows are called tuples and columns are called attributes of a tuple .
The focus of this topic is practical, so the common terms table, row, and
column are used. The detail of using the SQL language to perform these
operations is left to a later chapter of this topic.
2.2 Tables, Rows, and Columns
A table is a collection of data in rows and columns. As with tables in a
scientific publication, each row typically represents some entity, such as
a molecule, and each column represents some attribute of the entity, such
as the name, molecular weight, ionization potential, or other theoretical
or experimental data measurement. A table in a publication is laid out
for clarity to the reader. Spreadsheet programs typically include ways to
control the layout and look of the table. Display and layout features are
irrelevant in a relational database.
A table in a relational database is intended to provide a consistent
way to organize large amounts of data, constrain the data in meaningful
ways, and extend the tables when new data becomes available. It does
not contain any formatting or display information. Programs that access
the database provide any display or formatting of the data in the table.
5
Search WWH ::




Custom Search