Long-Term Learning
Learn efficiently and remember over time.
Start Long-Term Learning
Add this set to a folder
What type of relationship exists between this pair of related entities?
BOOK and BOOK COPY (books have copies)
one-to-many
Popular ____ include Access, Oracle, DB2, MySQL, and SQL Server.
DBMSs (Data Base Management Systems)
________ are established between entities in a well-structured database so that the desired information can be retrieved.
Relationships
A person, place, an object , an event or concept about which the organization wishes to maintain data is called a:
Entity
________ is a property that lets you change the structure of the database without requiring you to change the programs that access the database
Data independence
When duplicate column names exist in a database and you need to indicate the column to which you are referring, ____.
write both the table name and the column name, separated by a period
Count, Sum, Avg, Max, and Min are a few of the built-in statistics or ____ functions that can be used in a query.
Aggregate
The ____ key of a table is the column or collection of columns that uniquely identifies a given row in that table.
Primary
Based on the statement below, which of the following is the primary key?
Part (PartNum, Description, OnHand, Class, Warehouse, Price)
PartNum
When used after the word SELECT, the ____ symbol indicates that you want to include all fields in the query results in the order in which you described them to the DBMS when you created the table.
*
Customer ( CustomerNum, CustomerName, Street, City, State, Zip, Balance, CreditLimit, RepNum )
Based on the code above, list the number, name, credit limit, and
balance for all customers with credit limits that exceed their balances.
SELECT CustomerNum, CustomerName, CreditLimit, Balance FROM Customer WHERE CreditLimit>Balance;
data type for fields that contain letters and other special characters, and for fields that contain numbers that will not be used for arithmetic.
CHAR
By including the word ______ in a query after a computation , you can assign a name to the computed field.
AS
List the name of each trip that does not start in New Hampshire (NH).
SELECT TripName
FROM Trip
WHERE State !='NH';
List the name of each trip that has the type Hiking and that has a distance of greater than six miles.
SELECT TripName
FROM Trip
WHERE Type='Hiking' AND Distance >6;
How many trips have a type of Hiking or Biking?
SELECT COUNT (*)
FROM Trip
WHERE Type='Hiking' OR Type='Biking'
List the trip name and state for each trip that occurs during the Summer season. Sort the results by trip name within state.
SELECT TripName, State
FROM Trip
WHERE Season='Summer'
ORDER BY State, TripName;
A column in a relation of a database that serves as the primary key of another relation in the same database is called a:
foreign key
A rule that states that each foreign key value must match a primary key value in the other relation is called the:
referential integrity constraint.
Which of the following are anomalies that can be caused by redundancies in tables?
Insertion
Deletion
Modification
A candidate key must satisfy all of the following conditions:
a. each nonkey attribute is functionally dependent upon it.
b. the key must be nonredundant.
c. the key must uniquely identify the row.
(All of the above)
A ____ is a column or collection of columns on which all columns in the table are functionally dependent.
candidate key
________ normal form has an additional condition hat the only determinants the table contains are candidate keys.
Third
If B (an attribute) is functionally dependent on A, we can also say that _________.
A functionally determines B
The ____ is a column (or collection of columns) A such that all other columns are functionally dependent on A and no subcollection of the columns in A has this property
primary key
Essentially, setting the value of a given field to ______________ is similar to not entering a value into it at all.
null
Second normal form can be defined as a table that is in first normal form and contains no _________.
partial dependencies
In SQL you specify referential integrity using a______ clause in either the CREATE TABLE or the ALTER TABLE commands.
foreign key
In a system catalog, the ________ table contains information about the tables known to SQL.
Systables
If the primary key of a table contains only a single column, the table is automatically in 3rd normal form.
False
Indexes are most useful for columns that frequently appear in WHERE clauses of SQL commands, either to qualify the rows to select or for linking.
True
Database design decisions must be made carefully because of impacts on:
Data accessibility
Response times
Security
Which of the following are properties of relations?
Each attribute has a unique name
No two rows in a relation are identical
There are no multivalued attributes in a relation
(All the above)
Which of the following is a generic entity type that has a relationship with one or more subtypes?
Supertype
A form of database specification that indicates all the parameters for data storage that are then input to a database implementation is:
Physical
In 1:M relationships, the entity on the one-side of the relationship becomes a foreign key in the table of the many-side of the relationship
True
A(n) _____ is an attribute in a relation that serves as a primary key of another relation in the same database.
Foreign Key
Which of the following is NOT a reason to create an instance of a relational schema with sample data?
Sample data can reverse database implementation errors
Normalization is the process of decomposing relations to produce smaller, well- structured relations
True
A determinant is an attribute or combination of attributes that uniquely identifies a row in a relation.
False
_____ entities are entities that cannot exist except with an identifying relationship with a regular entity type.
Weak
A rule that states that each foreign key value must match a primary key value in the other relation is called the:
Referential integrity contraint
Which of the following are anomalies that can be caused by redundancies in tables?
Insertion anomaly
Deletion anomaly
Modification anomaly
(All the above)
A relation that contains minimal redundancy and allows easy use is considered to be:
Well-Structured
Understanding the steps involved in transforming EER diagrams into relations is important because:
You must be able to check the output of a CASE tool
A functional dependency in which one or more nonkey attributes are functionally dependent on part but not all of the primary key is called a _____ dependency.
Partial functional
A relation that contains no multivalued attributes, but has nonkey attributes not dependent on the primary key is in which normal form?
First
A relation that contains no multivalued attributes, and has nonkey attributes solely dependent on the primary key, but contains transitive dependencies is in which normal form?
Second
Physical-level design
information-level design adapted for the specific DBMS that will be used
Must consider characteristics of the particular DBMS
One-to-many relationship
include primary key of the "one" table as a foreign key in the "many" table
Many-to-many relationship
create a new table whose primary key is the combination of the primary keys of the original tables
Foreign key
column(s) in one table that is required to match value of the primary key for some row in another table or is required to be null
Natural key
consists of a column that uniquely identifies an entity
-Also called a logical key or an intelligent key
Artificial key
: column created for an entity to serve solely as the primary key and that is visible to users