sqlexam1review.ppt exam - 1. sql stands for -- structured query language putting a manual database...

12
sqlExam1Review.ppt EXAM - 1

Upload: logan-harris

Post on 19-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SqlExam1Review.ppt EXAM - 1. SQL stands for -- Structured Query Language Putting a manual database on a computer ensures? Data is more current Data is

sqlExam1Review.ppt

EXAM - 1

Page 2: SqlExam1Review.ppt EXAM - 1. SQL stands for -- Structured Query Language Putting a manual database on a computer ensures? Data is more current Data is

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

Page 3: SqlExam1Review.ppt EXAM - 1. SQL stands for -- Structured Query Language Putting a manual database on a computer ensures? Data is more current Data is

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

Page 4: SqlExam1Review.ppt EXAM - 1. SQL stands for -- Structured Query Language Putting a manual database on a computer ensures? Data is more current Data is

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

Page 5: SqlExam1Review.ppt EXAM - 1. SQL stands for -- Structured Query Language Putting a manual database on a computer ensures? Data is more current Data is

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

Page 6: SqlExam1Review.ppt EXAM - 1. SQL stands for -- Structured Query Language Putting a manual database on a computer ensures? Data is more current Data is

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

Page 7: SqlExam1Review.ppt EXAM - 1. SQL stands for -- Structured Query Language Putting a manual database on a computer ensures? Data is more current Data is

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.

Page 8: SqlExam1Review.ppt EXAM - 1. SQL stands for -- Structured Query Language Putting a manual database on a computer ensures? Data is more current Data is

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

Page 9: SqlExam1Review.ppt EXAM - 1. SQL stands for -- Structured Query Language Putting a manual database on a computer ensures? Data is more current Data is

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?

Page 10: SqlExam1Review.ppt EXAM - 1. SQL stands for -- Structured Query Language Putting a manual database on a computer ensures? Data is more current Data is

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

Page 11: SqlExam1Review.ppt EXAM - 1. SQL stands for -- Structured Query Language Putting a manual database on a computer ensures? Data is more current Data is

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

Page 12: SqlExam1Review.ppt EXAM - 1. SQL stands for -- Structured Query Language Putting a manual database on a computer ensures? Data is more current Data is

Questions