Databases Reference
In-Depth Information
Summary
A relation is a two-dimensional table in which the entries are single-valued, each field has a distinct name,
all the values in a field are values of the same attribute (the one identified by the field name), the order of fields
is immaterial, each row is distinct, and the order of rows is immaterial.
64
A relational database is a collection of relations.
An unnormalized relation is a structure in which entries need not be single-valued but that satisfies all the
other properties of a relation.
A field name is qualified by preceding it with the table name and a period (for example, Rep.RepNum).
A table's primary key is the field or fields that uniquely identify a given row within the table.
Query-By-Example (QBE) is a visual tool for manipulating relational databases. QBE queries are created by
completing on-screen forms.
To include a field in an Access query, place the field in the design grid and make sure a check mark appears
in the field's Show check box.
To indicate criteria in an Access query, place the criteria in the appropriate columns in the design grid of the
Query window.
To indicate AND criteria in an Access query, place both criteria in the same Criteria row of the design grid;
to indicate OR criteria, place the criteria on separate Criteria rows of the design grid.
To create a computed field in Access, enter an appropriate expression in the desired column of the design grid.
To use functions to perform calculations in Access, include the appropriate function in the Total row for the
appropriate column of the design grid.
To sort query results in Access, select Ascending or Descending in the Sort row for the field or fields that are
sort keys.
When sorting query results using more than one field, the leftmost sort key in the design grid is the major
sort key (also called the primary sort key) and the sort key to its right is the minor sort key (also called the sec-
ondary sort key).
To join tables in Access, place field lists for both tables in the upper pane of the Query window.
To make the same change to all records that satisfy certain criteria, use an update query.
To delete all records that satisfy certain criteria, use a delete query.
To save the results of a query as a table, use a make-table query.
Relational algebra is a theoretical method of manipulating relational databases.
The SELECT command in relational algebra selects only certain rows from a table.
The PROJECT command in relational algebra selects only certain columns from a table.
The JOIN command in relational algebra combines data from two or more tables based on common columns.
The UNION command in relational algebra forms the union of two tables. For a union operation to make sense,
the tables must be union compatible.
Two tables are union compatible when they have the same number of columns and their corresponding col-
umns represent the same type of data.
The INTERSECT command in relational algebra forms the intersection of two tables.
The SUBTRACT command in relational algebra forms the difference of two tables.
The product of two tables (mathematically called the Cartesian product) is the table obtained by concatenat-
ing every row in the first table with every row in the second table.
The division process in relational algebra divides one table by another table.
 
Search WWH ::




Custom Search