flervalsfrågor 2020 Flashcards

1
Q

A relational database consists of a collection of:

Fields
Records
Tables
Keys

A

Tables

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

Consider two student tables:

StudID Course
Ida IS
Fredrik Econ

and

StudID Course
Michelle Physik
Frank CompSci
Oscar AeroEng

Which operator would yield the empty table?

Difference
Intersection
None of the mentioned
Union

A

Intersection

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

There are similarities between the instructor entity set and the secretary entity set in the sense that they have several attributes that are conceptually the same across the two entity sets: namely, the identifier, name, and salary attributes. This process is called:

Similarity
Commonality
Specialisation
Generalisation

A

Generalisation

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

Which relationship is used to represent a specialization entity?

WHOIS
ISA
ONIS
AIS

A

ISA

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

Consider a phone number that can take one or more values. Treating a phone number as a _________ permits a database to have several phone numbers associated to a person or organisation.

Relation
Attribute
Entity
Value

A

Entity

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

By maximising the differences between members of the entity set person, it can be classified as both student and employee. This process is called _________ .

Inheritance
Object oriented
Specialisation
Generalisation

A

Specialisation

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

A ________ in a table represents a relationship among a set of values.

Row
Entry
Key
Column

A

Row

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

Course_id Sec_id Semester Year
BIO-101 1 Spring 2021
CS-102 4 Summer 2020
EE-201 3 Fall 2020
FIN-301 1 Spring 2019

The primary key in the above table is ____________.

Sec_id and Semester
Sec_id
Course_id
All of the attributes

A

Course_id

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

Tables in Third Normal Form (3NF) are already in 1NF and 2NF and in which the values in all non-primary-key columns can be worked out from _______ the ________ key column(s).

All, Candidate
Only, Foreign
Some of, Primary
Only, Primary

A

Only, Primary

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

Which of the following indicates the maximum number of entities that can be involved in a relationship?

Modality
Minimum Cardinality
Maximum Cardinality
Participation

A

Maximum Cardinality

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

What is a relationship called when it is maintained between two entities?

Ternary
Binary
Unary
Quaternary

A

Binary

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

Which of the following can be a multivalued attribute?

Name
Phone_number
Date_of_birth
All of the mentioned

A

Phone_number

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

What is the optimised version of the relation algebra expression:
π A1 (π A2 (σ F1 (σ F2 (r)))),
where A1, A2 are sets of attributes in r with A1 ⊂ A2 and F1, F2 are Boolean expressions based on the attributes in r?

π A1 (σ (F1 ∨ F2) (r))
π A2 (σ (F1∧ F2) (r))
π A2 (σ (F1 ∨ F2) (r))
π A1 (σ (F1 ∧ F2) (r))

A

π A1 (σ (F1 ∧ F2) (r))

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

In order to maintain transactional integrity and database consistency, what technology does a DBMS deploy?

Cursors
Triggers
Locks
Pointers

A

Locks

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

Consider a relational table with a single record for each registered student with the following attributes:

  1. Registration_Num: Unique registration number of each registered student
  2. UID: Unique identity number, unique at the national level for each citizen
  3. BankAccount_Num: Unique account number at the bank. A student can have multiple accounts or joint accounts. This attribute stores the primary account number.
  4. Name: Name of the student
  5. Hostel_Room: Room number of the hostel

Which of the following options is INCORRECT?

UID is a candidate key if all students are from the same country
Registration_Num can be a primary key
BankAccount_Num is a candidate key
If S is a superkey such that S∩UID is NULL then S∪UID is also a superkey

A

BankAccount_Num is a candidate key

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

Which is the name given to the bottom-up approach to database design that begins by examining the relationship between attributes?

Decomposition
Normalisation
Functional Dependency
Database modelling

A

Normalisation

17
Q

A member of Staff could be described in EER as either Manager or Assistant. Moreover an entity occurrence of Staff could be a member of both Manager and Assistant subclasses. What is placed next to the participation constraint within the curly brackets?

Both
All
Or
And

A

And

18
Q

Consider the relational schema given below, where eId of the relation dependent is a foreign key referring to empId of the relation employee. Assume that every employee has at least one associated dependent in the dependent relation:

employee (empId, empName, empAge)
dependent(depId, eId, depName, depAge)

Consider the following relational algebra query:

π empId (employee) −
π empId (employee ⋈ ((empId=eID) ∧ (empAge ≤ depAge)) Dependent)

The above query evaluates to the set of empIds of employees whose age is greater than that of

Some of his/her dependents
All of his/her dependents
All dependents
Some dependents

A

All of his/her dependents

19
Q

Consider the following case. Transaction A might hold a lock on some rows in the Accounts table and needs to update some rows in the Orders table to finish. Transaction B holds locks on those very rows in the Orders table but needs to update the rows in the Accounts table held by Transaction A. What problem has arisen?

Stamp lock
Exclusive lock
Gridlock
Deadlock

A

Deadlock

20
Q

The attribute name could be structured as an attribute consisting of first name, middle initial, and last name.
This type of attribute is called

Composite attribute
Simple attribute
Derived attribute
Multivalued attribute

A

Composite attribute

21
Q

The attribute AGE is calculated from DATE_OF_BIRTH. The attribute AGE is _________ .

Multi-valued
Single-valued
Derived
Composite

A

Derived

22
Q

The basic locking mechanism allows a transaction that needs to access a data item to request either a shared or exclusive lock. Once granted the transaction will hold the lock until it explicitly releases it. This method does not guarantee serializability as it permits transaction to interfere with one another. Which two ACID properties are therefore not supported?

Consistency and Durability
Atomicity and Consistency
Isolation and Durability
Atomicity and Isolation

A

Atomicity and Isolation

23
Q

The terms information, knowledge and data are frequently used for overlapping concepts. The main difference is in the level of abstraction being considered. The most abstract is _______, while ______ is below, and the most concrete is known as ______.

Data, Information, Knowledge
Knowledge, Data, Information
Knowledge, Information, Data
Information, Data, Knowledge

A

Knowledge, Information, Data

24
Q

A _____________ constraint requires that an entity occurrence can be a member of only one of the subclasses.

Uniqueness
Special
Disjointness
Hierarchical

A

Disjointness

25
Q

The term _______ is used to refer to a row.

Instance
Tuple
Attribute
Field

A

Tuple

26
Q

Course (course_id, sec_id, semester)
Here the course_id, sec_id and semester are __________ and Course is a _________.

Tuple, Attributes
Relations, Attribute
Tuple, Relation
Attributes, Relation

A

Attributes, Relation

27
Q

What is the aim of Normalisation?

Produce a set of tables that have update anomalies
Produce a set of tables with minimal redundancy
Remove redundant data from the tables
Produce a minimal set of tables

A

Produce a set of tables with minimal redundancy

28
Q

Which of the following protocols ensures conflict serializability and safety from deadlocks?

Two-phase locking protocol
None of the mentioned
Time-stamp ordering protocol
Graph based protocol

A

Time-stamp ordering protocol

29
Q

The term attribute refers to a ___________ of a table.

Tuple
Key
Column
Record

A

Column

30
Q

What is the name of a relationship where the same entity participates more than once in different roles. For example, Staff supervises Staff?

ISA
Onto
One to One
Recursive

A

Recursive