Chapter 7: INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL)

Chapter 7: INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL)

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

data-type selection

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

4 years ago

Date created

Mar 14, 2020

Cards (87)

Section 1

(50 cards)

data-type selection

Front

dictated by the nature of the data and by the intended use

Back

Multilevel ordered sequence -attributes, separated by commas, after the ORDER BY clause.

Front

cascading order sequence

Back

The primary key attributes contain

Front

a NOT NULL and a UNIQUE specification(entity integrity requirement)

Back

CREATE TABLE command

Front

Creates a new table in the user's database schema

Back

The command sequence ends with

Front

a semicolon

Back

you cannot have an invalid entry in the foreign key column

Front

referential integrity

Back

AGGREGATE FUNCTIONS

Front

Used with SELECT to return mathematical summaries on columns

Back

data manipulation

Front

(adding, modifying, deleting, and retrieving data)

Back

NOT NULL specification is made at the table level and stored in the data dictionary, application programs can use this information

Front

create the data dictionary validation automatically.

Back

Having command

Front

Restricts the selection of grouped rows based on a condition

Back

Like operator

Front

Checks whether an attribute value matches a given string pattern

Back

In an enterprise RDBMS

Front

every user ID is associated with a database schema.

Back

enforce a first level of security by allowing each user to see only the tables that belong to that user.

Front

Schemas

Back

Character data are ? to process in queries

Front

quicker

Back

If you are working with a composite primary key, all of the primary key's attributes are contained within

Front

parentheses and are separated with commas

Back

The NOT NULL specifications for the attributes ensure

Front

a data entry will be made

Back

CREATE TABLE AS command

Front

Creates a new table based on a query in the user's database schema

Back

spaces are used to line up

Front

the attribute characteristics and constraints

Back

count

Front

Returns the number of rows with non-null values for a given column

Back

Date arithmetic capability is particularly useful in

Front

billing

Back

Create View command

Front

Creates a dynamic subset of rows/columns from one or more tables

Back

most important advantages of SQL is its ability to

Front

produce complex free-form queries

Back

Authentication is the process through which

Front

the DBMS verifies that only registered users may access the database.

Back

even though zip codes contain all digits, they must be defined as ? because some zip codes begin with the digit zero (0), and a numeric data type would cause the leading zero to be dropped.

Front

character data

Back

If you are using Oracle, issue a ROLLBACK command to

Front

undo the changes made by the last two UPDATE statements

Back

Integers are (whole) counting numbers

Front

cannot be used if you want to store numbers that require decimal places.

Back

table and attribute names are

Front

fully capitalized

Back

A comma is used to separate

Front

each table element (attributes, primary key, and foreign key) definition

Back

You can drop a table only if (foreign key integrity violation)

Front

that table is not the "one" side of any relationship

Back

If INTEGER is not supported

Front

use NUMBER

Back

in a 1:M relationship, you must always create the table

Front

for the 1 side first

Back

update command

Front

Modifies an attribute's values in one or more table's rows

Back

P_INDATE should be a ? field rather than a character field

Front

(Julian) DATE which allows you to make simple date comparisons and to perform date arithmetic

Back

exists operator

Front

Checks whether a subquery returns any rows

Back

The order of the primary key components is important because

Front

the indexing starts with the first-mentioned attribute

Back

Character data type

Front

CHAR(L), VARCHAR(L) or VARCHAR2(L)

Back

The ORDER BY clause is especially useful

Front

when the listing order is important

Back

CREATE SCHEMA AUTHORIZATION command

Front

Creates a database schema

Back

rollback command

Front

Restores data to their original values

Back

When adding a column, be careful not to include

Front

NOT NULL clause for the new column

Back

At the heart of SQL is the

Front

query which covers both questions and actions

Back

data definition

Front

(creating tables, indexes, and views)

Back

After importing tables you can reestablish the integrity rules

Front

by using the ALTER command

Back

a schema is a logical grouping of database objects

Front

tables and indexes that are related to each other.

Back

Numeric data type

Front

NUMBER(L,D), INTEGER, SMALLINT, DECIMAL(L,D)

Back

Where command

Front

Restricts the selection of rows based on a conditional expression

Back

The ON UPDATE CASCADE specification ensures that change is automatically applied to all

Front

foreign key references throughout the system (cascade) to ensure that referential integrity is maintained

Back

check command

Front

Validates data in an attribute

Back

commit command

Front

Permanently saves data changes

Back

SQL is a language; that is, the user specifies what must be done, but not how it is to be done.

Front

nonprocedural

Back

Section 2

(37 cards)

can be created quickly and easily using the GROUP BY clause

Front

Frequency distributions

Back

alternative name given to a column or table

Front

An alias

Back

The IN operator is especially valuable

Front

when used in conjunction with subqueries uses a value list

Back

duplication could have been avoided through

Front

the use of a unique composite index

Back

"date" data types gives

Front

benefit of date arithmetic

Back

A wildcard character is a symbol

Front

general substitute for other characters/commands.

Back

WHERE clause to indicate the common attributes used to link the tables

Front

join condition

Back

A SQL set-oriented command works

Front

over a set of rows

Back

Order of operations

Front

parentheses ->power operations-> multiplications/divisions->additions/subtractions.

Back

The EXISTS special operator can be used for

Front

a command based on the result of another query or a subquery returns any rows

Back

The tables on which the view is based

Front

base tables

Back

each time view is invoked

Front

it is re-created on demand

Back

The GROUP BY clause is valid only when used in conjunction with

Front

one of the SQL aggregate functions

Back

rules of precedence

Front

establish the order in which computations are completed

Back

A UNIQUE constraint

Front

is enforced through the creation of a unique index

Back

The COUNT function is used to tally

Front

number of non-null values of an attribute.

Back

To delete an index use the

Front

DROP INDEX command

Back

in SQL, all conditional expressions evaluate

Front

true or false

Back

MS Access automatically adds

Front

Expr label to all computed columns

Back

Using the UNIQUE index qualifier

Front

you can even create an index that prevents you from using a value that has been used before.

Back

A subquery/ a nested query /an inner query,

Front

is embedded (or nested) inside another query.

Back

Views provide a level of security in the database because .

Front

the view can restrict users to only specified columns and specified rows in a table

Back

Special operator: Between

Front

Used to check whether an attribute value is within a range

Back

The inner query is always

Front

executed first by the RDBMS

Back

You can add a column to an existing table by

Front

alter command

Back

The natural join uses the join condition to match

Front

only rows with equal values in the specified columns

Back

because computers identify all characters by their (numeric) American Standard Code for Information Interchange(ASCII) codes

Front

comparison operators may even be used to place restrictions on character-based attributes

Back

character-based queries may be case sensitive

Front

uppercase character has a different ASCII code than a lowercase character

Back

the most important distinction between a relational database and other databases.

Front

The ability to combine (join) tables on common attributes

Back

create an index on any field that is used

Front

as a search key, in comparison operations in a conditional expression, or when you want to list rows in a specific order.

Back

By default all indexes produce results

Front

that are listed in ascending order

Back

set-oriented command

Front

DELETE command

Back

Boolean algebra is dedicated to

Front

the use of logical operators

Back

Any changes made to the table contents are not saved on disk until

Front

you close the database, close the program you are using, or use the COMMIT command.

Back

An alias is especially useful when

Front

a table must be joined to itself in a recursive query.

Back

Join condition -equality comparison between

Front

the foreign key and the primary key of related tables

Back