COMP 251 Final Flashcards
Relationship level integrity is part of overall data integrity
True
2 tables can participate in multiple types of relationships with each other.
False
A one-to-many relationship can only exist between 2 tables.
False
You will need a Primary Key and a Foreign Key when you establish a 1-M relationship.
True
An advantage of relating tables is that you can draw data from multiple tables simultaneously.
True
1:M + 1:M = 2:M
False
It is appropriate for a Foreign Key to have the same name as a Primary Key.
True
Cascading deletes will delete records in a parent table and all associated records in a child table.
True
(Open Quiz 2 Diagram image)
The diagram represents a self-referencing relationship.
True
(Open Quiz 2 Diagram image)
It is mandatory for employees and mentors to exist in the table.
False
(Open Quiz 2 Diagram image)
A deletion rule is present that restricts deletions in certain situations.
False
(Open Quiz 2 Diagram image)
A mentor can have only one employee mentee.
False
(Open Quiz 2 Diagram image)
Degree of participation is correctly diagramed.
False
A SQL join is not a physical nor a logical data base structure.
True
Application oriented rules are not valid business rules.
False
Which item describes a relationship type?
A. one-to-many
B. mandatory
C. maximum
D. cascade
E. referential
A
A relationship exists between two tables that are ___________________ to each other.
A. physically related
B. logically related
C. RDBMS related
D. joined via SQL
E. none of these
B
A table with curved corners represents a __________.
A. data table
B. linking table
C. validation table
D. subset table
E. none of these
D
A table with distinct columns on both the right and left ends represents a _________.
A. data table
B. linking table
C. validation table
D. subset table
E. none of these
B
You completed the process for identifying a relationship between a Client Table and an Account Executives Table. You concluded that a single record in the Account Executives table can have one or more records in the Client Table and that a single record in the Client Table can have one or more records in the Account Executives table. You concluded that you need to:
A. define a one-to-many relationship
B. define a self-referencing relationship
C. define a subset relationship
D. define an alias field for the relationship
E. none of these
E
You have a Foreign Key in Table B that is associated with a Primary Key in Table A. Further, you have a 1-M relationship between Table A and Table B. In the logical elements field specifications for the Foreign Key, you will set the Uniqueness Element as:
A. non-unique
B. unique
C. FK
D. Replica
E. No Nulls
A
You have a parent Table A that has a 1-1 relationship with Table B. You want to ensure that a record in Table A is not deleted and remains active when you have a record in Table B. You establish a deletion rule of:
A. Set Default
B. Nullify
C. Cascade
D. Restrict
E. Deny
D
Refer to this SQL for questions 8 and 9.
SELECT employee_number, employee_last_name, employee_first_name, annual_salary
FROM Employee, Salary
WHERE Employee.employee_number = Salary.employee_number;
In this SQL, you will:
A. Get a valid result as long as the right table relationships have been established.
B. Get an error since going across tables in this manner is a relationship violation.
C. Get a valid results set, but the output will be restricted.
D. Get an error since you can’t compare fields across tables on a WHERE clause.
E. “a” and “c”
E
Refer to this SQL for questions 8 and 9.
SELECT employee_number, employee_last_name, employee_first_name, annual_salary
FROM Employee, Salary
WHERE Employee.employee_number = Salary.employee_number;
In this SQL, you have:
A. fully qualified column names
B. alias table names
C. outer join syntax
D. “a” and “c”
E. all of these
A
In defining Business Rules for your data base, you can set up rules through:
A. Field Specifications
B. Relationship Characteristics
C. Validation Tables
D. “a” and “b”
E. “a”, “b”, and “c”
E
“Required values = Yes” is an example of business rules set up through:
A. Field Specifications
B. Relationship Characteristics
C. Validation Tables
D. “a” and “b”
E. None of these
A
In your data base design for an International Import and Export Company, you have been asked to restrict the countries that we will trade with on any given month; you further learn that the list of restricted countries can change frequently. Your best approach would be to:
A. Place business rules in the application programs
B. Establish Range of Value in the Field Specification Tables
C. Establish a Validation Table
D. Establish a Linking Table
E. Establish a Subset Table
C
Which of the following isn’t a valid join type:
A. Inner Join
B. Left Outer Join
C. Self Join
D. Cross table Join
E. Natural Join
D
A linking table will include:
A. Composite Primary keys that are also primary key in the associated tables
B. More than one foreign key
C. Other non-key fields when appropriate
D. “a” and “b”
E. “a”, “b”, and “c”
E
Which of the following is not a recommended diagramming technique for an Entity Relationship Diagram:
A. Note the Index field
B. Relationship line should connect PK and FK
C. Show type of relationship
D. Show degree of participation
E. Show business rules where possible
F. All are recommended
A
Types of Cardinality:
1-1, 1-M, M-M
Type of Cardinality: usually a subset table. A single record in Table A related to only one record in Table B (and vice versa)
1-1
Type of Cardinality: the most common table relationship
A single record in Table A is related to one or more records in Table B, but a single record in Table B is related to only one record in Table A.
1-M
Type of Cardinality: Single record in Table A can be related to one or more records in Table, and a single record in Table B can be related to one or more records in Table A. Will need a linking table.
M-M
Relationships that exist between recs in the same table (can be any type of cardinality)
Ex: Each employee is tied to a mentor (mentorID would be an alias of employeeID and these two columns would be in the same table)
Self-Referencing Relationships (aka recursive relationships)
Type of Table:
For M-M relationships
2 keys serve as this table’s composite primary key (CPK) as well as FK’s
Linking Table
Relational database’s leading advantage is speed of processing
False
In a relational DB, it is important to know where the RDBMS stores the data to expedite data retrieval
False
(don’t have to know where it’s stored)
The RDBMS will detect a logic error if you store NULL in a value
False
(null CAN be an acceptable value)
An Index is a special type of logical DB structure used to build table relationships
False
(Index is a PHYSICAL structure, indexes are a special object that allows the user to quickly retrieve records from the database)
Calculated fields should not be stored in a table
True
Table-level integrity ensures no duplicate records in a table and that the primary key is unique
True
Relationship level integrity is also known as Referential Integrity
True
Duplicate fields in your DB are never okay
False
IS NULL and =’ ‘ are filtering operations that achieve the same results
False
!= and <> are operators that achieve the same results
True
System Software Used to create, maintain, modify and manipulate a relational database with tools for the applications to interact with stored data
a. Database
b. SQL
c. RDBMS
d. XML
e. both a and b
C
The advantages of a relational database do not include:
a. data integrity at multiple levels
b. data accuracy
c. ease of access
d. built-in referential integrity
D
- Set of rules that decomposes data tables to minimize redundancy, minimize dependency, and enforce relationship integrity is known as:
a. Abstraction
b. Normalization
c. Data modeling
d. Decomposition
B
Known as a Tuple in relational database theory, the ______ represents an instance in the table
a. Field
b. Column
c. Primary Key
d. Table
e. None of these
E
Elements of an Ideal Field include
a. Has only 1 value
b. Can easily be decomposed into small parts
c. Is a distinct characteristic of the subject
d. a and c
e. all of these
D