sqlexam1review.ppt exam - 1. sql stands for -- structured query language putting a manual database...
TRANSCRIPT
sqlExam1Review.ppt
EXAM - 1
SQL stands for -- Structured Query Language
Putting a manual database on a computer ensures?
Data is more current
Data is more accurate
You can generate useful reportsTimely & Accurate
Relational DBMS provides?
- Ask questions of the database- Retrieve information from the database quickly- Find the answer to a question easily
Before storing data in a database, you should know?
Know what information you will maintain in the database
The most basic form of an SQL statement is?SELECT FROM SELECT FROM WHERE
Each table in your database will normally have a(n) ____________ that uniquely identifies each _____________.Primary Key Row/Record
FACT!!
Relational DBMS allows you to retrieve information from the database quickly!!!
The phase that is needed in the SELECT command to restrictto picking particular rows?
WHERE
You list the name of the table that contains the data to retrieve in the _________________ clause of the SELECT command.
FROM
Another name for AND, OR? BOOLEAN
The =, >, <, and <> are what type of operators?
Relational
Rapid system development process is also defined as?
Prototyping
Comparison operators
Operations for manipulating relations
1. Product
2. Union
3. Intersect (ion)
4. Difference
Commutative
Operations
We match every row of relation A with every row of relation B
Join all rows in both relations, removing duplicates
Including only the rows that match your where clause
Including only rows that do not match -- select all rows from firsttable that are NOT in the second table
II. Relational Algebra - continued
C. Operations for manipulating relations
5. Selection
6. Projection
7. Join
8. Assignment
Select only specific attributes (columns)
Selects specific rows based on data values
Using operators (=, >, etc..) to combine data from two or more relations
Assign a new name to relations that are created as a result of a join, projection, selection, etc.
If you want to select all rows from a table, you do not need to use a ____________ in your SELECT command.WHERE
If you want to select all columns from a table, you need to use a ____________ in your SELECT command.*
WHERE SLSREP_NUMBER = '06' is an exampleof a _______________ condition.SIMPLE
Wild card symbols that we have used are?* -- selects ALLcolumns% -- group of characters can be placed at the beginning or
end of character (Used with the LIKE clause)_ -- represents any individual character
LIKE ?? -- operator lets you test a string value to see whether it contains certain characters
The ___________ clause is used to sort output in a specific order.Order By
IN ?? -- operatorlets you test a field against a list of values.
ALL ?? -- operatorlets you use a relational operator against a subselect & determine whether
the condition is true for ALL values in the list.
ANY ?? -- operatorlets you use a relational operator against a subselect to determine whether
the condition is true for SOME values in the list.
Sorting by multiple columns the least important column is called?
FunctionsAVGSUMCOUNTMAXMIN
Use the __________ operator to select a count of unique values.DISTINCT
A query within a query is called a ______________________.Nested Query/SubQuery
What is evaluated first in a subquery? Inner Query
GROUPING -- examples
rows for all customers who have the same sales reprows for all customers who have the same credit limitrows for all customers who have the same balance
When rows are grouped there is one row of output for each group
The condition to set a Column name to unknown is ___________.NULL
Joining tables you must?From clause -- Where clause
Questions