- SQL is a data sublanguage. This means it is not a complete programing system, but rather it only creates and processes database data and metadata. These are called SQL statements and can be used in a number of ways. One of them is submitting them directly to the DBMS for processing.
- The data extraction process selects only a few columns of the operational data. They use the example of Cape Codd Outdoor Sports and their database.
- The framework for SQL query statements are SELECT/FROM/WHERE. For example SELECT Department, Buyer FROM SKU-DATA; These SQL statements transform tables. In the query results, they do not eliminate duplicate rows.
- The DISTINCT keyword in query searches to remove duplicate rows, so there are less results to sift through. This is really important when there can be results of 100,000 or more to sift through
- in order to SELECT ALL in a search use the * (asterisk) symbol. It will query all columns of a table.
- The query to get specific rows from a specific table can use the WHERE in the query statement. For example:
SELECT * FROM SKU-DATA WHERE Department = 'Water Sports'; - In the WHERE section, if the column contain texts or date data, the comparison value must be contained within quotation marks (' '), for numeric data there doesn't need to be any notes EX. WHERE SKU > 200000;
- You can also do a query for a single table and specified rows by changing how the SELECT section looks. For example: SELECT SKU-Description, Department
- The Column used in the WHERE clause does not have to be the same as the column in the SELECT clause
- In SQL queries, standard practice is to write SELECT, FROM, WHERE on separate lines
- You cannot execute SQL queries unless your computer has Access installed. In Access you can create a "New Query" by clicking on the query tab on the left-hand side of the Access window.
Tuesday, March 13, 2007
Database Processing, Chapter 2 (Week 7)
Journeying deeper in database processing, including delving deeper into SQL and how it works. Some important points to note follow:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment