BYU-I CIT225 - W01

0.0(0)
studied byStudied by 3 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/236

flashcard set

Earn XP

Description and Tags

Database Design and Development - Week 1 - Notes from Textbook "Learning SQL" and Lecture Presentations

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

237 Terms

1
New cards
TRUE or FALSE: SQL schema statements define data structures.
TRUE
2
New cards
TRUE or FALSE: SQL transaction statements determine where to begin, end, and roll back transactions.
TRUE
3
New cards
TRUE or FALSE: The results of SQL schema statements are stored in a special set of tables called the data dictionary.
TRUE
4
New cards
TRUE or FALSE: You can access the errata at this page: https://www.oreilly.com/catalog/errata.csp?isbn=0636920274803Links to an external site..
TRUE
5
New cards
SQL has been evolving to retrieve data from which of the following? (Multiple answers are possible.)

* Table
* Webpages
* Comma-separated value files (CSV)
* Documents
* Flat files
* Table
* Documents
* Flat files
6
New cards
A "database system" does which of the following? (Multiple answers are possible.)

* Provide tools for locating a tree
* Store data in a computerized system
* Retrieve data from a computerized system
* Store data in cloud services
* Manage network packets

 
* Store data in a computerized system
* Retrieve data from a computerized system
* Store data in cloud services
7
New cards
TRUE or FALSE: A "database system" is nothing more than a set of related information.
FALSE
8
New cards
TRUE or FALSE: A "network database system" can work as a multi-parent hierarchy.
TRUE
9
New cards
TRUE or FALSE: A "database" is nothing more than a set of related information.
TRUE
10
New cards
TRUE or FALSE: A modern "database system" can manage more than gigabytes of data.
TRUE
11
New cards
What are SQL previous names?
SQUARE , SEQUEL
12
New cards
When was ANSI SQL first standard published?
1986
13
New cards
SQL was initially created to be the language for which of the following? (Multiple answers are possible.)

* Querying JSON
* Generating data
* Manipulating data
* Retrieving data
* Storing data

 
* Generating data
* Manipulating data
* Retrieving data
14
New cards
TRUE or FALSE: A "hierarchical database" system configures data in a single-parent hierarchy.
FALSE
15
New cards
TRUE or FALSE: The SEQUEL language was shortened to SQL.
TRUE
16
New cards
TRUE or FALSE: Relational databases always report how many rows you insert, update, or delete.
TRUE
17
New cards
TRUE or FALSE: A "surrogate key" is generated by database management systems as a unique set of numbers.
TRUE
18
New cards


The American National Standards Institute (ANSI) established SQL standards in which of the following years? (Multiple answers are possible.)
* 1986
* 1989
* 1992
* 1999
* 2003
* 2006
* 2008
* 2011
* 2016
19
New cards
*hierarchical database system*
data is represented as one or more tree structures (examples include Microsoft’s Active Directory, Apache Directory Server)
20
New cards
*single-parent hierarchy*
each node in the tree may have either zero or one parent and zero, one, or many children
21
New cards
*network database system*
exposes sets of records and sets of links that define relationships between different records
22
New cards
*multiparent hierarchy*
each node in the tree may have multiple parent and zero, one, or many children
23
New cards
*tables*
A set of rows, held either in memory (nonpersistent) or on permanent storage (persistent).
24
New cards
*rows*
A set of columns that together completely describe an entity or some action on an entity. Also called a record.
25
New cards
*columns*
An individual piece of data stored in a table.
26
New cards
*primary key*
information that uniquely identifies a row in that table 

One or more columns that can be used as a unique identifier for each row in a table

uniquely identify rows
27
New cards
*compound key*
is a primary key consisting of two or more columns

One or more columns that can be used together to identify a single row in another table.
28
New cards
*foreign keys*
One or more columns that can be used together to identify a single row in another table

are copies of primary keys

(redundant data) that let you join rows

the only redundant piece(s) of data in a database
29
New cards
*natural key*
A descriptive column or set of columns can be a primary key |

A set of descriptive columns is a compound key
30
New cards
*surrogate key*
A stand-in for the natural key

A sequence-driven number

A surrogate key must exist for each unique natural key
31
New cards
*normalization*
the process of refining a database design to ensure that each independent piece of information is in only one place, aside from foreign keys
32
New cards
*entity*
Something of interest to the database user community. Examples include customers, parts, geographic locations, etc.
33
New cards
*result set*
Another name for a nonpersistent table, generally the result of an SQL query.
34
New cards
*SQL schema statements*
used to define the data structures stored in the database
35
New cards
*SQL data statements*
used to manipulate the data structures previously defined using SQL schema statements
36
New cards
*SQL transaction statements*
used to begin, end, and roll back transactions
37
New cards
*procedural* *languages*
defines both the desired results and the mechanism, or process, by which the results are generated
38
New cards
*nonprocedural languages*
define the desired results, but the process by which the results are generated is left to an external agent.
39
New cards
*optimizer*
The optimizer’s job is to look at your SQL statements and, taking into account how your tables are configured and what indexes are available, decide the most efficient execution path (well, not always the *most* efficient).
40
New cards
*optimizer hints*
ways to influence the optimizer’s decisions
41
New cards
*Relational Model*
evolved from Hierarchical databases and Network databases and replaced networked database pointers with redundant data
42
New cards
TRUE or FALSE: SQL data statements manipulate data.
TRUE
43
New cards
TRUE or FALSE: "Foreign keys" are examples of redundant data in relational database systems.
TRUE
44
New cards
TRUE or FALSE: SQL transaction statements determine where to begin, end, and roll back transactions.
TRUE
45
New cards
TRUE or FALSE: A "database" is much more than a set of related information.
FALSE
46
New cards
TRUE or FALSE: A "surrogate key" is generated by database management systems as a unique set of numbers.
TRUE
47
New cards
TRUE or FALSE: The roots of SQL go all the way back to the 1970s.
TRUE
48
New cards
TRUE or FALSE: A primary key made up of descriptive columns, like fname and lname are known as surrogate keys.
FALSE
49
New cards
TRUE or FALSE: "Primary keys" are examples of redundant data in relational database systems.
FALSE
50
New cards
TRUE or FALSE: A "database" is nothing more than a set of related information.
TRUE
51
New cards
Which of the following are SQL integration toolkits? (Multiple answers are possible.)
* JDBC (Java Database Connectivity)
* ADO.NET (Microsoft)
* Ruby DBI
* Python DB
* Package database/sql
52
New cards
Table, Documents, Flat files
SQL has been evolving to retrieve data from which of the following? (Multiple answers are possible.)
53
New cards
Relational databases always report how many rows you insert, update, or delete.

TRUE OR FALSE
True
54
New cards
The American National Standards Institute (ANSI) established SQL standards in which of the following years? (Multiple answers are possible.)
1986, 1992, 2016
55
New cards
A "database system" is nothing more than a set of related information.

TRUE OR FALSE
extensions

False
56
New cards
SQL was initially created to be the language for which of the following? (Multiple answers are possible.)
Generating data, Manipulating data, Retrieving data
57
New cards
Relational databases always report how many rows you change in the data dictionary when you CREATE a table.
False
58
New cards
You can access the errata at this page:
https://www.oreilly.com/catalog/errata.csp?isbn\=0636920274803
True
59
New cards
A "network database system" can work as a multi-parent hierarchy.
True
60
New cards
SELECT statements retrieves data.
True
61
New cards
A "network database system" exposes sets of records and links, where the links define relationships between different records.
True
62
New cards
"Primary keys" are examples of redundant data in relational database systems.
False
63
New cards
SQL transaction statements determine where to begin, end, and roll back transactions.
True
64
New cards
A "primary key" consisting of two or more columns is a compound key.
True
65
New cards
The roots of SQL go all the way back to the 1970s.
True
66
New cards
Which of the following are SQL integration toolkits? (Multiple answers are possible.)
JDBC, ADO.NET, Ruby DBI, Python DBI, Package Database/SQL
67
New cards
Foreign keys in a relational database system are like lines that connect entities in a hierarchical or network database management system.
T
68
New cards
A "surrogate key" is generated by database management systems as a unique set of numbers.
True
69
New cards
The following WHERE clause filters on the combination of two criteria.
mysql\> SELECT title -\> FROM film -\> WHERE rating \= 'G' AND rental_duration \>\= 7;
True
70
New cards
Which of the following are valid clauses in an SQL query? (Multiple answers are possible.)
having, select, from, where, order by
71
New cards
Which of the following best describes a permanent table?
A table created by using the CREATE TABLE statement.
72
New cards
The following WHERE clause filters on the combination of one or the other of two criteria.
mysql\> SELECT title -\> FROM film -\> WHERE (rating \= 'G' OR rental_duration \>\= 7) -\> AND (rating \= 'PG' OR rental_duration
True
73
New cards
A "database connection" gets generated when the server verifies your username and password are correct.
True
74
New cards
The following SELECT clause is the first clause of a SELECT statement but the last clause evaluated by the SQL engine.
True
75
New cards
The following SELECT statement is using what type of table:
mysql\> SELECT CONCAT(cust.last_name, ', ',cust.first_name) AS full_name -\> FROM (SELECT first_name -\> , last_name -\> , email -\> FROM customer -\> WHERE first_name LIKE 'JE%') cust;
It displays the following result set:
+\------------------+ | full_name | +\------------------+ | DAVIS, JENNIFER | | HALL, JESSICA | | BELL, JEAN | | GREENE, JEANETTE | | LAWSON, JEANNE | | BANKS, JESSIE | | TERRY, JENNIE | | CASTRO, JENNY | | SPEAR, JEFFREY | | JORDON, JERRY | | HURTADO, JEREMY | | SCHILLING, JESSE | | PINSON, JEFFERY | | EAST, JEFF | | MCCARTNEY, JESUS | | KENYON, JEROME | | MILAM, JESSIE | +\------------------+
Derived table
76
New cards
"Column aliases" let you rename columns in the SELECT clause.
True
77
New cards
The following CREATE VIEW statement creates a customer_view of four columns from the customer table:
mysql\> CREATE TEMPORARY TABLE actors_j -\> ( actor_id smallint(5) -\> , first_name varchar(45) -\> , last_name varchar(45));
This inserts rows into the temporary table:
mysql\> INSERT INTO actors_j -\> SELECT actor_id -\> , first_name -\> , last_name -\> FROM actor -\> WHERE last_name LIKE 'J%';
The following SELECT statement is using what type of table:
mysql\> SELECT * FROM actors_j;
The query displays the following result set:
+\----------+\------------+\-----------+ | actor_id | first_name | last_name | +\----------+\------------+\-----------+ | 119 | WARREN | JACKMAN | | 131 | JANE | JACKMAN | | 8 | MATTHEW | JOHANSSON | | 64 | RAY | JOHANSSON | | 146 | ALBERT | JOHANSSON | | 82 | WOODY | JOLIE | | 43 | KIRK | JOVOVICH | +\----------+\------------+\-----------+
Temporary table
78
New cards
A FROM clause with two tables requires a link between the tables inside an ON clause.
True
79
New cards
Which of the following can request and hold a MySQL "database connection"? (Multiple answers are possible.)
MySQL Shell, MySQL
80
New cards
Which of the following best describes a virtual table?
A view created by using the CREATE VIEW statement.
81
New cards
The following WHERE clause filters on the combination of two criteria.
mysql\> SELECT title -\> FROM film -\> WHERE rating \= 'G' AND rental_duration \>\= 7;
True
82
New cards
The following mysql client command lets you connect to the MySQL studentdb database:
\[username@localhost ~] $ mysql -ustudent -p -Dstudentdb
True
83
New cards
The following GROUP BY clause lists the raw columns returned with the result of an aggregating function, like the COUNT(), SUM() or others.
mysql\> SELECT CONCAT(c.first_name,' ',c.last_name) AS full_name -\> , COUNT(*) AS number_of_customer -\> FROM customer c INNER JOIN rental r -\> ON c.customer_id \= r.customer_id -\> GROUP BY c.first_name -\> , c.last_name;
True
84
New cards
You define table aliases by appending
True
85
New cards
The following SELECT statement returns a string literal in a its result set:
mysql\> SELECT 222 AS room_number -\> , 'Kotter' AS teacher;
+\-------------+\---------+ | room_number | teacher | +\-------------+\---------+ | 222 | Kotter | +\-------------+\---------+
True
86
New cards
The following WHERE clause filters on the combination of one or the other of two criteria.
mysql\> SELECT title -\> FROM film -\> WHERE (rating \= 'G' OR rental_duration \>\= 7) -\> AND (rating \= 'PG' OR rental_duration
True
87
New cards
The following mysql client command lets you connect to the MySQL studentdb database:
\[username@localhost ~] $ mysql -ustudent -p
False
88
New cards
A "condition" in the WHERE clause may compare equality between literal, column, or expression values.
True
89
New cards
A WHERE clause can only filter in some data and filter out other data.
True
90
New cards
A "condition" in the WHERE clause may compare inequality between literal, column, or expression values.
True
91
New cards
A "condition" in the WHERE clause may compare equality between literal, column, or expression values with the REGEXP regular expression operator.
True
92
New cards
A "range condition" in the WHERE clause may compare whether a literal, column, or expression values of a NULL value, like an optional middle_name column value, is between a set of literal, column, or expression values that exclude a NULL value.
mysql\> SELECT first_name -\> , last_name -\> FROM customer -\> WHERE middle_name BETWEEN 'FA' AND 'G';
False
93
New cards
A "condition" in the WHERE clause may compare a literal, column, or expression values to see if it is a null value by using the IS NULL operator. True or False
True
94
New cards
A "condition" in the WHERE clause may compare inequality, like \>, \>\=,
False
95
New cards
A WHERE clause can only filter in data.
False
96
New cards
A WHERE clause supports one or more "conditions."
True
97
New cards
Sometimes you will want to work with every row in a table to accomplish which of the following? (Multiple answers are possible.)
Purging all data from a table used to stage new data warehouse feeds.
Modifying all rows in a table after a new column has been added.
Retrieving all rows from a message queue table.
98
New cards
Which of the following "membership conditions" may replace a set of comparisons made against string literal values with the OR operator in the WHERE clause? (Multiple answers are possible.)
mysql\> SELECT title -\> , rating -\> FROM film -\> WHERE rating \= 'G' OR rating \= 'PG';
IN, \=ANY
99
New cards
A "range condition" in the WHERE clause may compare whether a literal, column, or expression values of a NULL value, like an optional middle_name column value, is not between a set of literal, column, or expression values that exclude a NULL value.
mysql\> SELECT first_name -\> , last_name -\> FROM customer -\> WHERE NOT middle_name BETWEEN 'FA' AND 'G';
True
100
New cards
A "range condition" in the WHERE clause may compare whether a literal, column, or expression values is between a set of literal, column, or expression values that include a NULL value.
mysql\> SELECT first_name -\> , last_name -\> FROM customer -\> WHERE last_name BETWEEN 'FA' AND NULL;
False