Summary

In this chapter you learned that:

  • Querying tables in a database using a SELECT statement retrieves records that are divided into fields.

  • A table applies structure to data.

  • A record repeats the structure of a table by storing data such as customer names and addresses.

  • A field is used to store an individual value such as the name or address of a customer.

  • The WHERE clause can be used to apply a filter to records retrieved by the SELECT statement.

  • The ORDER BY clause is used to sort records by one or more fields or expressions.

  • Field headers in queries change only the header of the column in the record output.

  • The AS clause can be used to change a field name, where the new name can be used in some of the other clauses of a query.

  • The GROUP BY clause is used to summarize record output into fewer, aggregated records.

  • Subqueries can be constructed in various ways.

  • Subqueries can be nested to many levels.

  • Subqueries do not always join records as they do not always return values to a calling query.

  • Records found by a subquery can be filtered by passing values into a subquery from the parent query. This is called a correlated query because a correlation is established between the parent query and the subquery.

  • The JOIN clause merges records from two tables based on matching field values.

  • The UNION clause can be used to retrieve records from two tables, such that all records are retrieved from both tables.

  • Records can be changed in tables using the INSERT , UPDATE , and DELETE statements.

  • Subqueries can be used in some parts of INSERT , UPDATE , and DELETE statements.

  • A transaction begins when INSERT , UPDATE , and DELETE statements are executed.

  • A transaction is completed when a COMMIT or ROLLBACK statement is executed.

  • Database objects are changed with specialized database object CREATE , ALTER , and DROP statements.



Beginning XML Databases
Beginning XML Databases (Wrox Beginning Guides)
ISBN: 0471791202
EAN: 2147483647
Year: 2006
Pages: 183
Authors: Gavin Powell

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net