Databases

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Consider the relational schema below: Employee (EmpID, Name, Address, DeptID, IsManager) And a brief description of the attributes: EmpID: A unique identity number for each employee Name: A name of the employee Address: The address of where the employee currently resides DeptID: A unique identity number for the department in which the employee works IsManager: An indication of whether the employee is a manager or not. The value can either be true or false. Which of the following options is CORRECT? - EmpID, Name and Address combined is a part of the super key - DeptID and IsManager acts as foreign keys - EmpID and Address combined is a candidate key - IsManager is a foreign key - DeptID can be used as a primary key - EmpID, Name and Address combined is a candidate key

?

Consider the relational schema below: Product (ProductID, Name, Price, Description, ManufacturerID) And a brief description of the attributes: ProductID: A unique identity number for each product Name: A name of the product Price: The price of the product Description: A textual description of the product ManufacturerID: A unique identity number for the manufacturer that produces the product Which of the following options is INCORRECT? - ProductID and Name combined is not a candidate key - ManufacturerID and ProductID combined can be used to identify all products produced by a specific manufacturer - ManufacturerID acts as a foreign key - ProductID and ManufacturerID combined acts as a candidate key - ProductID, Name and Price combined is a part of the super key - ProductID and Description combined is a part of the super key

?

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

All of his/her dependents

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

And

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

Atomicity and Isolation

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

Attributes, Relation

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

BankAccount_Num is a candidate key

What is a relationship called when it is maintained between two entities? - Ternary - Binary - Unary - Quaternary

Binary

The term attribute refers to a ___________ of a table. - Tuple - Key - Column - Record

Column

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

Composite attribute

The three general design phases when it comes to database design are _____, _____, and _____. - Logical design, Physical design, Conceptual design -Relational design, Logical design, Conceptual design - Conceptual design, Logical design, Relational design - Conceptual design, Logical design, Physical design - Logical design, Conceptual design, Relational design - Physical design, Logical design, Conceptual design

Conceptual design, Logical design, Physical design

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

Course_id

The terms information, data and knowledge are often used in the context of databases. A brief description of each concept would be: -Data: Is textual values that can be stored in a database. Information: Data collated to derive meaningful inferences, Knowledge: Expertise used to infer results from information. - Data: Is information collated to derive meaningful inferences. Information: Can be defined as meaningful symbols or facts that represent properties of objects. E.g., an attribute of an entity. Knowledge: Expertise used to infer results from data. - Data: Is numerical values that can be stored in a database. Information: Data collated to derive meaningful inferences, e.g., the number 10 can be represented as 10 km. Knowledge: Expertise used to infer results from information. - Data: Can be defined as symbols or facts that represent properties of objects. Information: Is data collated to derive meaningful inferences. Knowledge: Expertise used to infer results from information.

Data: Can be defined as symbols or facts that represent properties of objects. Information: Is data collated to derive meaningful inferences. Knowledge: Expertise used to infer results from information.

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

Deadlock

Imagine an attribute called age. This attribute is calculated from another attribute called DoB, making age a so called ______ attribute. NOTE: You need to enter only the correct alternative/alternatives. Choosing incorrect alternatives will result in 0 pts and not choosing the correct alternative/all correct alternatives will result in 0 pts. Choose one or multiple alternatives: - Derived - Single-valued - Multi-valued - Simple - Key Composite

Derived

The attribute AGE is calculated from DATE_OF_BIRTH. The attribute AGE is _________ . - Multi-valued - Single-valued - Derived - Composite

Derived

A _____ constraint specifies that a particular entity occurrence can be a member of only one of its subclasses. - Specialization - Hierarchical - Disjoint - One-to-One - Overlapping - Uniqueness

Disjoint

A _____________ constraint requires that an entity occurrence can be a member of only one of the subclasses. - Uniqueness - Special - Disjointness - Hierarchical

Disjointness

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. Choose one option: - Relation - Attribute - Entity - Value

Entity

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

Generalisation

Imagine two entities; Junior_Developer and Senior_Developer. These two sets share a number of attributes between themselves such as FirstName, LastName, Phone, Salary, and so on. The process of combining these shared attributes in order to create a separate entity is known as: ________ - Generalization - Substitution - Inheritance - Specialization - Interface implementation - Super- and subclasses

Generalization

Which relationship is used to represent a specialization entity? Choose one option: - WHOIS - ISA - ONIS - AIS

ISA

Consider two student tables: xxx.... AND .....xxx Which operator would you yield the empty table? - Difference - Intersection - None of the mentioned - Union

Intersection

The terms information, data and knowledge are often used in the context of databases. The main difference between the terms is their level of abstraction. The most abstract being _______, the second most abstract being _____, and the most concrete being ______. - Information, Knowledge, Data - Knowledge, Information, Data - Data, Information, Knowledge - Data, Knowledge, Information - Information, Data, Knowledge - Knowledge, Data, Information

Knowledge, Information, Data

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

Knowledge, Information, Data

In order to maintain transactional integrity and database consistency, what technology does a DBMS deploy? - Cursors - Triggers - Locks - Pointers

Locks

Which of the following indicates the maximum number of entities that can be involved in a relationship? - Modality - Minimum Cardinality - Maximum Cardinality - Participation

Maximum Cardinality

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

Normalisation

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

Only, Primary

Which of the following can be a multivalued attribute? - Name - Phone_number - Date_of_birth - All of the mentioned

Phone_number

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

Produce a set of tables with minimal redundancy

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

Recursive

A ________ in a table represents a relationship among a set of values. - Row - Entry - Key - Column

Row

Imagine an attribute called address which could consist of a city, a zip code and a street as a single value. In this particular case, the object with this attribute can only have one address. This type of attribute is known as: - Multi-valued attribute - Key attribute - Single-valued attribute - Derived attribute - Simple attribute - Composite attribute

Single-valued attribute?

By maximising the differences between members of the entity set person, it can be classified as both student and employee. This process is called _________ . Choose one option: - Inheritance - Object oriented - Specialisation - Generalisation

Specialisation

Imagine an entity or a set called Person. Let us then propose that a person, by maximizing the differences between people, can be classified as both a student and a teacher. This process is known as: ________ - Specialization - Generalization - Interface implementation - Inheritance - Substitution - Super- and subclasses

Specialization

A relational database consists of a collection of: - Fields - Records - Tables - Keys

Tables

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

Time-stamp ordering protocol

The term _______ is used to refer to a row. - Instance - Tuple - Attribute - Field

Tuple

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))

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


Set pelajaran terkait

Computer Science Principles Midterm

View Set

mutually exclusive and independent events

View Set

International Marketing Exam 4 (2)

View Set

Intro to Criminal Justice Chapter 10

View Set

Testout Chapter 1 Linux Admin Midterm 2.19.19 1.1-1.11 10.3 7.9 2.3 6.1-6.3 9.1-9.3

View Set

Black Book: Reading RIGHT and WRONG Answers (p64-69)

View Set

Chapter 11 Push/Pull Factors and Reasons

View Set