DETAILED STUDY GUIDE WITH COMPREHENSIVE
QUESTIONS AND SOLUTIONS LATEST UPDATE (GRADED
A+)
Domain - (correct answer) In data modeling, the construct used to organize and
describe an attribute's set of possible values.
Primary key (PK) - (correct answer) An identifier composed of one or more attributes
that uniquely identifies a row. Also, a candidate key selected as a unique entity
identifier. A minimal superkey.
Key - (correct answer) One or more attributes that determine other attributes.
Determination - (correct answer) The role of a key. In the context of a database
table, the statement "A determines B" indicates that knowing the value of attribute A
means that the value of attribute B can be looked up.
Determinant - (correct answer) Any attribute in a specific row whose value directly
determines other values in that row.
Dependent - (correct answer) An attribute whose value is determined by another
attribute.
Full functional dependence - (correct answer) A condition in which an attribute is
functionally dependent on a composite key but not on any subset of the key.
Composite key - (correct answer) A multiple-attribute key.
Key attributes - (correct answer) The attributes that form a primary key
Superkey - (correct answer) An attribute or attributes that uniquely identify each
entity in a table.
Candidate key - (correct answer) A minimal superkey; that is, a key that does not
contain a subset of attributes that is itself a superkey.
Entity integrity - (correct answer) The property of a relational table that guarantees
each entity has a unique value in a primary key and that the key has no null values.
Null - (correct answer) The absence of an attribute value.
Foreign key - (correct answer) An attribute or attributes in one table whose values
must match the primary key in another table or whose values must be null.
,Referential integrity - (correct answer) A condition by which a dependent table's
foreign key must have either a null entry or a matching entry in the related table.
Secondary key - (correct answer) A key used strictly for data retrieval purposes. For
example, the combination of last name, first name, middle initial, and telephone number
will probably match the appropriate table row. Also called an alternate key.
Relational algebra - (correct answer) A set of mathematical principles that form the
basis for manipulating relational table contents; the eight main functions are SELECT,
PROJECT, JOIN, INTERSECT, UNION, DIFFERENCE, PRODUCT, and DIVIDE.
Relvar - (correct answer) Short for relation variable, a variable that holds a relation.
It is a container (variable) for holding relation data, not the relation itself.
Closure - (correct answer) A property of relational operators that permits the use of
relational algebra operators on existing tables (relations) to produce new relations.
SELECT operator - (correct answer) An operator used to select a subset of rows.
Also known as RESTRICT.
σ cus_code = 10010
PROJECT operator - (correct answer) An operator used to select a subset of
columns. In other words, it yields a vertical subset of a table. This operation retrieves all
rows and some attributes of a table without using a WHERE clause to limit which rows
of the table are included.
π cus_fname, cus_lname
UNION operator - (correct answer) This set operator combines the result set of two
or more SELECT statements, dropping the duplicate rows.
supplier ∪ vendor
Union-compatible - (correct answer) Two or more tables that have the same number
of columns and the corresponding columns have compatible domains.
INTERSECT operator - (correct answer) This set operator combines the output of
two SELECT queries and returns only the rows that appear in both.
supplier ∩ vendor
DIFFERENCE - (correct answer) An operator used to yield all rows from one table
that are not found in another union-compatible table.
supplier - vendor
, PRODUCT - (correct answer) An operator used to yield all possible pairs of rows
from two tables.
customer × agent
JOIN - (correct answer) In relational algebra, a type of operator used to yield rows
from two tables based on criteria. There are many types, such as natural, theta, equi,
and outer.
Natural join (JOIN) - (correct answer) A relational operation that yields a new table
composed of only the rows with common values in their common attribute(s).
customer ⨝ agent
Equijoin - (correct answer) A join operator that links tables based on an equality
condition that compares specified columns of the tables. Is a special type of theta join
Theta join - (correct answer) A join operator that links tables using an inequality
comparison operator (<, >, <=, >=) in the join condition.
INNER JOIN - (correct answer) A join operation in which only rows that meet a
given criterion are selected. The join criterion can be an equality condition (natural join
or equijoin) or an inequality condition (theta join). This join is the most commonly used
type of join.
OUTER JOIN - (correct answer) This join Returns a set of records that includes
rows for which no corresponding match is found in the other table. Unmatched values in
the related table are left null. Three types LEFT, RIGHT and FULL
LEFT OUTER JOIN - (correct answer) In a pair of tables to be joined, a join that
yields all rows in the left table, including those that have no matching values in the other
table.
SELECT *FROM T1 ____________ T2 ON T1.C1=T2.C1
RIGHT OUTER JOIN - (correct answer) In a pair of tables to be joined, a join that
yields all of the rows in the right table, including the ones with no matching values in the
other table.
SELECT *FROM T1 ____________ T2 ON T1.C1=T2.C1
FULL OUTER JOIN - (correct answer) Returns rows with matching values and
includes all rows from both tables (T1 and T2) with unmatched values
SELECT *FROM T1 ____________ T2 ON T1.C1=T2.C1