Exam 1 Study Material Flashcards

1
Q
  1. A foreign key is
    A) A key from another country
    B) A key from another table
    C) A duplicated primary key
    D) A key duplicated in the junction table
A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  1. In relational database, records are navigated to each other through the use of which technique?
    A) Pointers
    B) Networks
    C) Duplicating common data
    D) Stacking similar records
A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  1. The optionality for relationship Product — Order is usually
    A) M:M
    B) O:M
    C) M:O
    D) O:O
    E) 1:M
A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  1. What is a logical data model used for:
    A) For representing data requirements
    B) For representing business logics
    C) For representing how data is organized in a database
    D) For representing how functions are performed
A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  1. Assume customers may have joint or shared accounts. Which is the best entity-relationship diagram to model a small bank accounts, customers, and Transactions?
    A) Customer – (m::1) – Account – (m:m) – Transaction
    B) Customer – (m::m) – Account – (1:m) – Transaction
    C) Customer – (1:m) – Account – (1:m) – Transaction
    D) Customer – (m::m) – Account – (m:m) – Transaction
A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  1. What is not correct about a record?
    A) it is made of many values observed from one entity
    B) it is usually linked to other records
    C) it is made of a single value
    D) it is also called a tuple
    E) It is usually identifiable through some parts of the record
A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  1. What is not true about a hierarchical database?
    A) records are linked by pointers
    B) records are organized as an inverted tree
    C) records are not identified by keys
    D) it is not a dominant type of databases nowadays
A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  1. What is not true about Codasyl?
    A) it established the common business-oriented language (COBOL) for programming
    B) it was not supported by Ted Codd
    C) It resulted in System R
    D) it resulted in the Codasyl approach to database management
A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

9.(check all that apply) Identify Object Attributes: Which of the following are attributes of orders in
an e-commerce system?
A) order date
B) promised date
C) ship date
D) total order amount
E) order quantity

A

ABD

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

10.A composite attribute is which of the following?
A) An attribute that can be broken into components
B) An attribute that cannot be broken into components
C) Multiple attributes
D) An identifier

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  1. True/False: A recursive relationship is always O:O
    A) True
    B) False
A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  1. What is not right about weak entities?
    A) often used to model multivalued attributes
    B) do not have a full UID themselves
    C) must have 1:m relationships with a strong entity
    D) cannot exist independently of a strong entity
A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  1. When do you use gerunds?
    A) when there are data about relationships
    B) when there exist m:m relationships between two entities
    C) when there is a need to treat a relationship as an enity
    D) All of the above
A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  1. (select all that apply) If a weak entity E depends on entity S to exist and has 1:m relationship with entity F. Then, what must be true?
    A) the table for E will have the UID of S as a part of the primary key
    B) the table for F will have the UID of S as a part of the primary key
    C) the table for F will have the UID of S as a part of a foreign key
    D) the table for S will have the UID of E as a part of the primary key
A

AC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
  1. (check all that apply) Identify Objects for Data Modeling: Which of the following are objects for the problem domain of inventory management?
    A) products, warehouses, inventories, accounts
    B) orders, shipments, invoices, packingslips, employees, locations
    C) price, quantity, balance, business, services
    D) minimum reorder level, balance, inventory system, company
    E) suppliers, checkouts, checkins
A

ABE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
  1. Identify Object Attributes: Which of the following are legitimate attributes of students in a college clinic system?
    A) weight
    B) parents
    C) blood pressures
    D) full name
    E) roommates
A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q
  1. (check all that apply) Identify Object Relationships: Check all that justify a direct relationship between the two mentioned objects in each sentence for a point of sale system (POS)?
    A) cashiers checkout items
    B) managers balance inventories
    C) customer check price
    D) cashiers performs transactions
    E) employee handle returns
A

DE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q
  1. Identify Object Relationships: A flight has a starting airport, a destination airport, and zero or pass-over airports. How do you model the relationships between Flight and Airports?
    A) create three different relationships respectively for starting, destination, and passover
    B) create a gerund between Flight and Airport and use an attribute to indicate starting, destination, and passover
    C) create one direct m:m relationship between Flights and Airports
    D) create an recursive relationship on Airports
A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

9.(check all that apply) The ER model for a small bank system has Customer, Account, Checking, Account, Employee, Check, Transactions, etc. as entities. Which of the following is correct use of weak
entities?
A) Check is a weak entity of Checking Account
B) Checking Account is a weak entity of Account
C) Transaction is a weak entity of Account
D) Account is a weak entity of Customer

A

AC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q
  1. Which statement is not true about weak entities?
    A) It does not exist independently
    B) it does not have UID
    C) It can be used to model a multi-valued attribute
    D) it can be used to convert 1:m relationships into tables?
    E) It may be connected to other entities in ERD
A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

There is many-to-many relationship between two tables. How do you connect them so that you can navigate from one record to a related record?
A) Duplicate the primary key of one table into another
B) Duplicate the primary key of both tables into a junction table
C) Duplicate the primary key of each of the tables into the other table
D) None of the above

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What technique is used to model the situation that Student may have multiple addresses?
A) Associative Entity (gerund)
B) Weak entities
C) Super/sub types
D) Recursive relationships

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

There is m:m relationship between students and classes. Which technique is used for
representing the student grade?
A) Associative Entity (gerund)
B) Weak entities
C) Super/sub types
D) Recursive relationships

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

To implement 1:1 relationships, you would
A) Duplicated the PK from 1-side table to the m-side table as a FK
B) Duplicated the PK from each side to the other side as a FK
C) Duplicated the PK from any one side table to the other table as a FK
D) Create a junction table and duplicate the PKs from both sides into here as foreign keys

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

(check all that apply) When do you use recursive relationships?
A) the relationship between employees and their supervisors
B) the relationship between employees and their dependents
C) the relationship between employees and their departments
D) the relationship between employees and their team members
E) the relationship between employees and their job assignments

A

AD

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

How do you convert a recursive m:m relationship into relational tables?
A) duplicate the primary key twice inside the same table
B) duplicate the primary key once inside the same table
C) create a junction table and duplicate the primary key twice in the junction table
D) create a junction table and duplicate the primary key once in the junction table

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Which one of the following is NOT true with arc implementation of the super- and sub-type entities
A) The table for each subtype entity will use its own UID, if there exists, to make the primary key
B) The table for the super type will use its UID, if there exist, to make the primary key
C) The primary key of he super type table is duplicated in each sub-type table
D) The primary key of each subtype table is duplicated in the super-type table

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

(check all that apply) Identify Object Relationships: Check all that justify the direct connection between the two mentioned objects for an inventory system?
A) vendors send out shipments
B) customers make payments
C) employees checkout items
D) employees balance inventories
E) vendors sell products

A

ABE

26
Q

In the ER model for a library checkout system, the involved entities include Book, BookCopy, Patron, Checkout, Return, Reservation, Employee, and Transaction. Assume each return is for many books. If a book is returned with damage, where do you record the information so that we can track the
damage by user in case we need to?
A) Book
B) BookCopy
C) Patron
D) Association between Return and BookCopy
E) Return

A

D

27
Q

In the ER diagram for a Point of Sale system, there are entities such as Cashier, Product, Checkout, Transaction, CheckoutStand, Return, Inventory, etc. Here inventory records each storage location and its capacity. Sometimes, a customer may need to come back to pickup their items after checking out while most of the time they leave the store with their purchases. Which of the following is the better design for manage transactions?

A) Add an attriute to transaction to indicate whether goods have been pickuped or not
B) Create two subtyeps of Transaction
C) Create a weak entity Pickup to link with Transaction
D) Add a relationship between Transaction and Product

A

A

28
Q

In SQL statements, constraint X foreign key (Y) references Z, what is Y?
A) The name of the foreign key columns in the current table
B) The name of the constraint
C) The name of the table to which the foreign resides
D) The name of the table from which the corresponding PK resides
E) The name of primary key columns in the referenced table

A

A

29
Q

Which of the following is NOT required by the referential integrity rule #1
A) A foreign key column must have the same data type as the corresponding primary key column
B) A foreign key column must have the same field size as the corresponding primary key column
C) A foreign key column must have the optionality as the corresponding primary key column
D) None of the above

A

C

30
Q

What SQL command can be used to delete columns from a table?
A) MODIFY TABLE TableName DROP COLUMN ColumnName
B) MODIFY TABLE TableName DROP ColumnName
C) ALTER TABLE TableName DROP COLUMN ColumnName
D) ALTER TABLE TableName DROP ColumnName

A

C

31
Q

What SQL command will allow you to change the table STUDENT to add the constraint named
GradeCheck that states that the values of the Grade column must be greater than 0?
A) ALTER TABLE STUDENT ALTER CONSTRAINT GradeCheck (Grade > 0);
B) ALTER TABLE STUDENT ADD CONSTRAINT GradeCheck (Grade > 0);
C) ALTER TABLE STUDENT ADD CONSTRAINT GradeCheck CHECK (Grade > 0);
D) None of the above is correct.

A

C

32
Q

Based on the following SQL script, which command is correct to change the size of title to
varchar2(50)?

<pre>
create table books (
ISBN char(15),
title varchar2(100),
price number(4,2) null,
constraint pk_bk primary key (ISBN));
</pre>

A) alter table books modify (title varchar2(50));
B) alter table books alter (title varchar2(50));
C) alter table books modify (title char(50));
D) alter table books alter (title char(50));
E) none of the above

A

E

33
Q

When using the arc implementation to convert a super set entity into a relation, what if the entity does not have a UID?
A) create an artificial UID for the super entity
B) create an artificial UID for the super entity and each sub type entity
C) use another attribute of the super type entity as UID
D) ask the designer to provide a UID

A

A

34
Q

(check all that are necessary) Which Oracle server parameters do you need to know in order to set up an client to connect to the server?
A) Host Name or IP address of the server
B) Oracle Serial Number
C) TCP Port Number to Oracle Service
D) Oracle Instance ID
E) Operation Systems that Holds Oracle

A

ACD

35
Q

(select all that apply) What do you need to create a database link in your Oracle account?
A) user name for the linked database account
B) password for the linked database account
C) Administrator’s email for the linked database
D) Table Names inside the linked database
E) connection string or alias for the linked database

A

ABE

36
Q

Which of the following is correct to create a new user account scott/tiger in Oracle?
A) create new user Scott with password tiger;
B) create user Scott identified by tiger;
C) create Scott identified by tiger;
D) insert into dba_users (username, password) values (‘Scott’, ‘tiger’);

A

B

37
Q

How do you create a sequence that can generate integers numbers 1, 5, 9, 13, …?
A) create sequence mySEQ start with 1 increment by 4;
B) create sequence mySQL as 1, 5, 9, 13, …;
C) create sequence mySEQ start with 4 increment by 1;
D) create sequence mySEQ start 1 and increment 4;

A

A

38
Q

The essential condition of third normal form is automatically satisfied when
A) a table has only one non-key column
B) a table has only one key column
C) a table has only one primary key
D) a table has no foreign key

A

A

39
Q

Assume each bank branch can issue loan independently of other branches and assume
customers may jointly make a loan. Which of the following is correct functional dependency for the table
Loans (CustomerID, Branch, LoanNo, LoanAmount)?
A) CustomerID –> LoadNo, LoanAmount
B) CustomerID, Branch –> LoanNo, LoanAmount
C) LoanNo, Branch –> CustomerID
D) Branch, LoanNo –> LoanAmount
E) LoanNo –> LoanAmount

A

D

40
Q

In the table Enrollments (studentID, courseNo, sectionNo, grade, status), which of the following functional dependency is true?
A) studentID –> grade
B) studentID, courseNo, sectionNo –> grade, status
C) studentID, courseNo –> grade, status
D) grade, status –> studentID, courseNo, sectionNo

A

B

41
Q

(check all that apply) Under what conditions, the 3rd normal form is automatically satisfied if a relation is in the 2nd normal form?
A) a table has only one non-key column
B) a table has only one key-column
C) a table has two key-columns
D) a table has no non-key column

A

AD

42
Q

Normalization ________ data duplication.
A) eliminates
B) reduces
C) increases
D) maximizes

A

B

43
Q

A transitive dependency is equivalent to which of the following?
A) A functional dependency between two or more key attributes.
B) A functional dependency between two or more nonkey attributes.
C) A relation that is in first normal form.
D) A relation that is in second normal form.

A

B

44
Q

How can we check if a table has minimum redundency?
A) There is no way to check
B) See if a table has any primary values duplicated somewhere else
C) Use a normal form to check
D) See if a table has a lot of null values

A

C

45
Q

The violation of the second normal form is often due to combining tables whose records are in
A) 1:1 relationships
B) 1:m relationships
C) m:m relationships
D) O:O relationships

A

C

46
Q

The violation of the third normal form is often due to combining tables whose records are in
A) 1:1 relationships
B) 1:m relationships
C) m:m relationships
D) O:O relationships

A

B

47
Q

How do you create a database link to link to Scott/tiger account located on db2.oracle.com with port 1521 and service name db2?
A) create database link DB2 connect to scott identified by tiger using ‘db2’;
B) create database link DB2 connect to scott/tiger@’db2.oracle.com:1521/db2’;
C) create database link DB2 connect to scott identified by tiger using ‘db2.oracle.com:1521/db2’;
D) create database link DB2 connect to scott/tiger@db2;

A

C

48
Q

organizes records into tables called relations. each table consists of multiple columns (fields, attributes) and rows (records, tuples)

A

Relational Model

49
Q

a set of data well organized fer a framework

A

Database

50
Q

Oracle, SAP, Teams, IBM

A

DBMS

51
Q

Each record is a collection of fields (attributes, properties), each of which contains one and only one data value. 4 different types, hierarchical, network, relational, and object-oriented

A

Logical Data Model

52
Q

consists of a set of relations, which are simply visualized and commonly referred to as tables. Uses pointers to connect data

A

Hierarchical Model

53
Q

link a collection of records into a network structure, similar to a hierarchical model by using pointers to connect records. They model allows loops

A

Network Model

54
Q

for a table, it one or more columns whose value or value combination can be uniquely identify each record in the table, can only be one per table.

A

Primary Key

55
Q

a duplicate of a primary key in another table, one table can have multiple.

A

Foreign Key

56
Q

are represented by duplicating primary key values

A

relationships

57
Q

turns a relationship into an entity. We create this and link it to the two original entity set. Does not have a UID

A

Gerund

58
Q

a piece of data that provides details about an entity

A

Attributes

59
Q

contains attributes which describe that ____.

A

entity

60
Q

outlines if the relationship is optional or mandatory

A

Optionality

61
Q

Concept of functional dependencies

A

Normal Forms

62
Q

no repeating data and attributes are dependent on the primary key

A

1NF

63
Q

does not include any functional dependencies between parts of the primary key and another column. No attribute is dependent on only a portion of the primary key

A

2NF

64
Q

does not contain any transitive dependencies

A

3NF

65
Q

every determinant in the relation is a key

A

BCNF

66
Q

referred to when attribute B is______ to attribute A

A

Functional Dependency