Database Quizzes/Exams
Nulls are acceptable in a primary key field T/F
False
Primary keys and foreign keys are the same (T/F)
False
Multivalued attribute
An attribute for which instances of an entity can have multiple values for the same attribute. (Employee could have multiple phone numbers)
Problems with Data Dependency
Duplication of data, Limited data sharing, Lengthy Development Times, Excessive program maintenance
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
In order for a table to be a relation, the following conditions must hold:
Each column must have a name Within one table, each row must be unique Within each row, each value in each column must be single valued All values in each column must be from the same (predefined) domain Order of columns is irrelevant Order of rows is irrelevant
A Database contains
End-user data: raw facts of interest to end user Metadata: data about data and provides a description of data characteristics and relationship in the data.
The first popular use of a database, SABRE for airlines, also led to the first ethical issue in database use (T/F)
True
There are two broad categories of databases, OLTP (transaction databases) and OLAP (data warehouses) (T/F)
True
Metadata
data about data, schema
Data dependence
data access changes with data storage characteristics change
Physical database design decisions must be made carefully because of impacts on
data accessibility, response times, security
Program-data dependence is caused by
data descriptions being written into programming code
Another form of denormalization where the same data are stored in multiple places in the database are called..
data duplication
User-defined constraints
database constraints that are added by the database designer
An attribute that can be calculated from related attribute values is called a(n)..
derived attribute
Data
facts that are recorded and can be accessed, raw numbers and facts
Data management
focuses on proper generation, storage, and retrieval of data
Referential integrity constraint
in each row of a relation containing a foreign key, the value of the foreign key either matches one of the values in the primary key column of the referred relation or the value of the foreign key is null.
___________ are used to query data from two or more tables, based on a relationship between some columns in the tables
joins
Relational database model
logical database model that represents a database as a collection of related tables
A student can attend 5 classes, each with a different professor. Each professor has 30 students. The relationship of students to professors is a
many-to-many relationship
Transforming the data specifications into basic, or atomic elements following well-established rules is called..
normalization
Unary relationship (recursive relationship)
occurs when an entity is involved in a relationship with itself (degree 1 relationship)
An attribute or attributes that uniquely identifies each row in a relation is called a..
primary key
Not an advantage of database systems
redundant data
Information
refers to the data that is accessed by a user for some particular purpose, the result of processing raw data to reveal meaning
Degree of a relationship
reflects how many entities are involved in the relationship
A two-dimensional table of data is called a..
relation
Binary relationship
relationship between two entities
A business rule specification should be..
simple and well structured
A simultaneous relationship among the instances of three entity types is called a(n)
ternary relationship
Implicit constraint
the implicit relational database model rules that a relational database must satisfy in order to be valid
Primary keys
unique identifiers that can be used to retrieve a single row from the table
Relational schema
visual depiction of the relational database model, a picture of the database
Data that describes the properties and context of the user data is known as
Meta-data
A candidate key must satisfy all of the following conditions
The key must uniquely identify the row The key must be nonredundant Each nonkey attribute is functionally dependent upon it
A business rule is a statement that defines or constrains some aspect of the business T/F
True
A primary key is an attribute that uniquely identifies each row in a relation T/F
True
A table must be in first normal form (1NF) before it can be in second normal form (2NF) (T/F)
True
An entity can have more than one unique attribute. In such cases each unique attribute is also called a candidate key (T/F)
True
By adding a check constraint to a table as it is being created, DBAs can control the values are entered into a given field (T/F)
True
Databases need to contain, not only the data, but also indexes, statistics, privileges, stored procedures, etc. T/F
True
Development starts from scratch with the traditional file processing approach because new file formats, descriptions, and file access logic must be designed for each new program T/F
True
Enforcement of business rules can be automated through the use of software tools that can interpret the rules and enforce them T/F
True
Hierarchial and Network were two database models that were used early on, but were not used much more (T/F)
True
Information is processed data T/F
True
It is recommended that every table have a primary key (T/F)
True
Metadata are data that describe the properties of other data T/F
True
Relational databases view all data in the form of tables T/F
True
Multiple unique attributes (candidate keys)
When an entity has more than one unique attribute each unique attribute is also called a candidate key (Employee ID and SSN could have key fields)
The SQL command ___________ defines a logical table from one or more tables or views
create view
Data independence
data storage characteristics do not affect data access
An attribute in a relation of a database that serves as the primary key of another relation in the same database is called a
foreign key
Not a cost and/or risk of the database approach
improved responsiveness
Entity Integrity Constraint
in a relational table, no primary key column can have null or empty values
Normalization
is the process of organizing data in a database, includes establishing relationships between tables according to rules designed both to protect the data and to make the database more flexible by eliminating redundancy and inconsistent dependency
The definition of the database that provides all the specifications to a specific database management system is contained in a(n)..
physical schema
Database Management System
A software system that is used to create, maintain, and provide controlled access to user databases. Manages data resources like an operating system manages hardware resources
Database
A structured collection of records or data that is stored in a computer
Relation
A table in a relational database A table containing rows and columns The main construct in the relational database model Every relation is a table, not every table is a relation
First Normal Form
Every column must contain only a single value No table can have repeating groups of data No multi-valued attributes Every attribute value is dependent on everything else
A constraint is a rule in a database system that can be violated by users T/F
False
All databases available today are Relational databases (T/F)
False
Conceptual database designs are closely tied to the brand of database an organization is using (T/F)
False
DBAs decide for the company what the business rules are and implement them in the database (T/F)
False
Data and Information are the same (T/F)
False
Databases can be in a second normal form without being in first normal form T/F
False
Databases that are highly normalized will always give the best performance T/F
False
The terms "database" and "database management system (DBMS)" refer to the same thing (T/F)
False
Unlike columns, the rows of a relation may not be interchanged and must be stored in one sequence T/F
False
A column in a relation that refers to a primary key column in another (referred) relation is called a
Foreign Key
E.F. Codd developed the relational model of the..
1970s
Second Normal Form
1NF plus every non-key attribute is fully functionally dependent on the entire primary key
Third Normal Form
2Nf plus no transitive dependencies (functional dependencies on non-primary-key attributes)
The following criteria should be considered when selecting an identifier..
Choose an identifier that is stable Choose an identifier that won't be null Choose an identifier that doesn't have large composite attributes
Business rules govern the validity of data T/F
True
Relational database
a collection of related relations within which each relation has a unique name
Ternary relationship
a relationship involving three entities (deree 3 relationship)
Relationship roles
additional syntax that can be used in ER diagrams that the discretion of a data modeler to clarify the role of each entity in a relationship
Program Data dependency
All programs maintain metadata for each file they use
Optional attribute
An attribute that is allowed to not have a value (can be null)
Composite unique attribute
An attribute that is composed of several attributes and whose value is different for each entity instance
Composite Attribute
An attribute that is composed of several attributes. Its purpose is to indicate a situation in which a collection of attributes has an additional meaning, besides the individual meanings of each attribute.
The benefits of a standardized relational language include:
Application longevity Reduced training costs Cross-system communication Potential portability of applications
The following is an objective of selecting a data type
Represent a small number of possible values Maximize storage space Limit security
A primary key that consists of more than one attribute is called a..
composite key
In the SQL language the _____________ statement is used to make table definitions
create table
