Database Exercise I

Ace your homework & exams now with Quizwiz!

The tuples of the relation can be of ____ order. a) Any b) Same c) Sorted d) Constant

a) Any The values only count. The order of the tuples does not matter.

For each attribute of a relation, there is a set of permitted values, called the ____ of that attribute. a) Domain b) Relation c) Set d) Schema

a) Domain The values of the attribute should be present in the domain. Domain is a set of values permitted.

The subset of superkey is a candidate key under what condition? a) No proper subset is a superkey b) All subsets are superkeys c) Subset is a superkey d) Each subset is a superkey

a) No proper subset is a superkey The subset of a set cannot be the same set. Candidate key is a set from a superkey which cannot be the whole of the super set.

Using which language can a user request information from a database? a) Query b) Relational c) Structural d) Compiler

a) Query Query language is a method through which the database entries can be accessed.

A ____ integrity constraint requires that the values appearing in specified attributes of any tuple in the referencing relation also appear in specified attributes of at least one tuple in the referenced relation. a) Referential b) Referencing c) Specific d) Primary

a) Referential A relation, say r1, may include among its attributes the primary key of another relation, say r2. This attribute is called a foreign key from r1, referencing r2. The relation r1 is also called the referencing relation of the foreign key dependency, and r2 is called the referenced relation of the foreign key.

A ____ is a pictorial depiction of the schema of a database that shows the relations in the database, their attributes, and primary keys and foreign keys. a) Schema diagram b) Relational algebra c) Database diagram d) Schema flow

a) Schema diagram

A relational database consists of a) Tables b) Fields c) Records d) Keys

a) Tables Fields are the column of the relation or tables. Records are each row in relation. Keys at the constraints on the relation.

The ___ operation performs a set union of two "similarly structured" tables a) Union b) Join c) Product d) Intersect

a) Union Union just combines all the values of relations of same attributes.

Course(course_id, sec_id, semester) Here the course_id, sec_id, and semester are ____ and course is ____ a) Relations, Attributes b) Attributes, Relation c) Tuple, Relation d) Tuple, Attributes

b) Attributes, Relation The relation course has a set of attributes course_id, sec_id, and semester.

The result which operation contains all pairs of tuples from the two relations, regardless of whether their attribute values match. a) Join b) Cartesian product c) Intersection d) Set difference

b) Cartesian product Cartesian product is the multiplication of all the values in the attributes

The term attribute refers to a ____ of a table. a) Record b) Column c) Tuple d) Key

b) Column Attribute is a specific domain in the relation which has entries of all tuples.

Consider attributes ID, CITY, and NAME. Which one of this can be considered as a superkey? a) NAME b) ID c) CITY d) CITY, ID

b) ID Here there ID is the only attribute which can be taken as a key. Other attributes are not uniquely identified.

A domain is atomic if elements of the domain are considered to be ____ units. a) Different b) Indivisible c) Constant d) Divisible

b) Indivisible

The ____ operator takes the result of two queries and returns only rows that appear in both result sets. a) Union b) Intersect c) Difference d) Projection

b) Intersect The union operator gives the result which is the union of two queries and difference is the one where query which is not a part of second query

The ____ operation allows the combining of two relations by merging pairs of tuples, one from each relation, into a single tuple. a) Select b) Join c) Union d) Intersection

b) Join Join finds the common tuple in the relations and combines it

A ____ is a property of the entire relation, rather than of the individual tuples in which each tuple is unique. a) Rows b) Key c) Attribute d) Fields

b) Key Key is the constraint which specifies uniqueness

An attribute in a relation is a foreign key if the ____ key from one relation is used as an attribute in that relation. a) Candidate b) Primary c) Super d) Sub

b) Primary

The relation with the attribute which is the primary key is referenced in another relation. The relation which has the attribute as primary key is called a) Referential relation b) Referencing relation c) Referenced relation d) Referred relation

b) Referencing relation

The ____ provides a set of operations that take one or more relations as input and returns a relation as an output. a) Schematic representation b) Relational algebra c) Scheme diagram d) Relation flow

b) Relational algebra

The term ____ is used to refer to a row. a) Attribute b) Tuple c) Field d) Instance

b) Tuple Tuple is one entry of the relation with several attributes which are fields.

Which of the following attributes can be taken as a primary key? a) Name b) Street c) ID d) Department

c) ID The attribute name, street, and department can repeat for some tuples. The ID attribute has to be unique, so it forms a primary key.

The ____ is the one in which the primary key is one relation is used as a normal attribute in another relation. a) Referential relation b) Referencing relation c) Referenced relation d) Referred relation

c) Referenced relation

Which of the following is a procedural language? a) Domain relational calculus b) Tuple relational calculus c) Relational algebra d) Query language

c) Relational algebra Domain and Tuple relational calculus are non-procedural language. Query language is a method through which the database entries can be accessed.

A _____ in a table represents a relationship among a set of values. a) Column b) Key c) Row d) Entry

c) Row Column has only one set of values. Keys are constraints and row is one whole set of attributes. Entry is just a piece of data.

The most common used operation in relational algebra for projecting a set of tuples from a relation is a) Join b) Projection c) Select d) Union

c) Select Select is used to view the tuple of the relation with or without some constraints.

Which of the following is a set of one or more attributes taken collectively to uniquely identify a record? a) Candidate key b) Sub key c) Super key d) Foreign key

c) Superkey Superkey is the superset of all the keys in a relation.

Department (dept_name, building budget) and Employee (employee_id, name, dept_name, salary). Here the dept_name attribute appears in both the relations. Using common attributes in relation schema is one way of relating ____ relations. a) Attributes of common b) Tuples of common c) Tuples of distinct d) Attributes of distinct

c) Tuples of distinct Here the relations are connected by the common attributes.

Student( ID, name, dept_name, tot_cred) In this query which attribute form the primary key? a) Name b) Dept c) Tot_cred d) ID

d) ID The attribute name, dept, and tot_cred can have the same value unlike ID

Database ____ which is the logical design of the database, and the database ____ which is a snapshot of the data in the database at a given instant in time. a) Instance, Schema b) Relation, Schema c) Relation, Domain d) Schema, Instance

d) Schema, Instance Instance is a instance of time and schema is a representation

Which of the following CANNOT be taken as a primary key? a) ID b) Register Number c) Dept_ID d) Street

d) Street Street is the only attribute which can occur more than once.


Related study sets

#1: Information and Communication Technology

View Set

Turning Points of the Revolution

View Set