IT-244 _ Introduction to Database (Test Bank)  Before Midterm	Chapter 1 , 2 , 7 & 8

IT-244 _ Introduction to Database (Test Bank) Before Midterm Chapter 1 , 2 , 7 & 8

IT-244 _ Introduction to Database (Test Bank)

 

Before Midterm          Chapter 1 , 2 , 7 & 8

 

The Entity-Relationship Model

 

1.  An ________ is a set of entities of the same type that share the same properties, or attributes . a) Entity set

 

b) Attribute set c) Relation set d) Entity model

Explanation: An entity is a “thing” or “object” in the real world that is distinguishable from all other objects.

 

2. Entity is a

a)   Object of relation

b)  Present working model

c)   Thing in real world

 

d)  Model of relation

 

Explanation: For example, each person in a university is an entity.

 

3.  The descriptive property possessed by each entity set is _________ . a) Entity

 

b) Attribute c) Relation d) Model     

 

Explanation: Possible attributes of the instructor entity set are ID, name, dept name, and salary.

 

4.  The function that an entity plays in a relationship is called that entity’s _____________.

 

a)   Participation

b)  Position

c)   Role

 

d)  Instance         

Explanation: A relationship is an association among several entities.

 

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

 

a) Simple attribute

 

b) Composite attribute c) Multivalued attribute d) Derived attribute     

 

Explanation: Composite attributes can be divided into subparts (that is, other attributes).

 

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

a)   Single valued

b)  Multi valued

c)   Composite

 

d)  Derived     

 

Explanation: The value for this type of attribute can be derived from the values of other related attributes or entities.

 

 

 

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]     P.( 1 )

7.  Not applicable condition can be represented in relation entry as a) NA

 

b) 0

c) NULL

 

d) Blank Space         

 

Explanation: NULL always represents that the value is not present.

 

8.  Which of the following can be a multivalued attribute ?

a)   Phone_number

b)  Name

c)   Date_of_birth

 

d)  All of the mentioned         

 

Explanation: Name and Date_of_birth cannot hold more than 1 value.

 

9.  Which of the following is a single valued attribute a) Register_number

 

b) Address

 

c) SUBJECT_TAKEN d) Reference         

 

10.  In a relation between the entities the type and condition of the relation should be specified . That is called as______attribute

 

a) Desciptive b) Derived c) Recursive d) Relative         

 

Explanation: Consider the entity sets student and section, which participate in a relationship set takes. We may wish to store a descriptive attribute grade with the relationship to record the grade that a student got in the class.

 

Entity-Relationship Diagrams

 

1.  Which of the following gives a logical structure of the database graphically ? a) Entity-relationship diagram

 

b) Entity diagram c) Database diagram

 

d) Architectural representation         

 

Explanation: E-R diagrams are simple and clear—qualities that may well account in large part for the widespread use of the E-R model.

 

2.  The entity relationship set is represented in E-R diagram as

a)   Double diamonds

b)  Undivided rectangles

c)   Dashed lines

d)  Diamond

    

Explanation: Dashed lines link attributes of a relationship set to the relationship set.

 

 

 

 

 

 

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]     P.( 2 )

3.  The Rectangles divided into two parts represents a) Entity set

 

b) Relationship set

 

c) Attributes of a relationship set d) Primary key

 

       

 

Explanation: The first part of the rectangle , contains the name of the entity set. The second part contains the names of all the attributes of the entity set.

 

4.  Consider a directed line(-) from the relationship set advisor to both entity sets instructor and student. This indicates _________ cardinality

 

a) One to many b) One to one c) Many to many d) Many to one     

 

Explanation: This indicates that an instructor may advise at most one student, and a student may have at most one advisor.

 

5.  We indicate roles in E-R diagrams by labeling the lines that connect ___________ to __________.

a)   Diamond , diamond

b)  Rectangle, diamond

c)   Rectangle, rectangle

 

d)  Diamond, rectangle      

 

Explanation: Diamond represents a relationship set and rectangle represents a entity set.

 

6.  An entity set that does not have sufficient attributes to form a primary key is termed a __________ . a) Strong entity set

 

b) Variant set

 

c) Weak entity set d) Variable set         

Explanation: An entity set that has a primary key is termed a strong entity set.

 

7.  For a weak entity set to be meaningful, it must be associated with another entity set, called the

a)   Identifying set

b)  Owner set

c)   Neighbour set

 

d)  Strong entity set         

 

Explanation: Every weak entity must be associated with an identifying entity; that is, the weak entity set is said to be existence dependent on the identifying entity set. The identifying entity set is said to own the weak entity set that it identifies.It is also called as owner entity set.

 

8.  Weak entity set is represented as a) Underline

 

b) Double line

 

c) Double diamond d) Double rectangle         

Explanation: An entity set that has a primary key is termed a strong entity set.

 

 

 

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]     P.( 3 )

9.  If you were collecting and storing information about your music collection, an album would be considered a(n) _____.

 

a) Relation b) Entity c) Instance d) Attribute     

 

Explanation: An entity set is a logical container for instances of an entity type and instances of any type derived from that entity type.

 

10.  What term is used to refer to a specific record in your music database; for instance; information stored about a specific album?

 

a) Relation b) Instance

c)   Table

c)   Column

   

 

Explanation: The environment of database is said to be instance. A database instance or an ‘instance’ is made up of the background processes needed by the database.

 

Entity-Relationship Design Issues

1.  Let us consider phone_number ,which can take single or several values . Treating phone_numberas an

 

_________ permits instructors to have several phone numbers (including zero) associated with them. a) Entity

 

b) Attribute c) Relation d) Value         

 

Explanation: Treating a phone as an attribute phone_number implies that instructors have precisely one phone number each.

 

2.  The total participation by entities is represented in E-R diagram as

a)   Dashed line

b)  Double line

c)   Double rectangle

d)  Circle

   

Explanation: It is used to represent the relation between several attributes.

 

3.  Given the basic ER and relational models, which of the following is INCORRECT? a) An attribute of an entity can have more than one value

 

b) An attribute of an entity can be composite

c) In a row of a relational table, an attribute can have more than one value

 

d) In a row of a relational table, an attribute can have exactly one value or a NULL value         

 

Explanation: It is possible to have several values for a single attribute provide it is a multi-valued attribute.

 

4.  Which of the following indicates the maximum number of entities that can be involved in a relationship? a) Minimum cardinality

 

b) Maximum cardinality c) ERD

 

d) Greater Entity Count     

 

Explanation: In SQL (Structured Query Language), the term cardinality refers to the uniqueness of data values contained in a particular column (attribute) of a database table.

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]     P.( 4 )

5.  In E-R diagram generalization is represented by a) Ellipse

 

b) Dashed ellipse c) Rectangle

 

d) Triangle      

 

Explanation: Ellipse represents attributes,rectangle represents entity.

 

6.  What is a relationship called when it is maintained between two entities? a) Unary

 

b) Binary c) Ternary d) Quaternary     

 

Explanation: Binary word usually represents two attributes.

 

7.  Which of the following is a low level operator?

a)   Insert

b)  Update

c)   Delete

 

d)  Directory      

 

Explanation: Directory is a low level to word on in file system .

 

8.  Key to represent relationship between tables is called a) Primary key

 

b) Secondary Key c) Foreign Key

 

d) None of the mentioned         

 

Explanation: Primary key of one relation used as an attribute in another relation is called foreign key.

 

9.  A window into a portion of a database is

a)   Schema

b)  View

c)   Query

 

d)  Data dictionary     

 

Explanation: View is a logical portion of a database which is needed by some users.

 

10. A primary key is combined with a foreign key creates

a)   Parent-Child relation ship between the tables that connect them

b)  Many to many relationship between the tables that connect them

c)   Network model between the tables that connect them

d)  None of the mentioned

       

 

Explanation: Using the two relationships mother and father provides us a record of a child’s mother, even if we are not aware of the father’s identity; a null value would be required if the ternary relationship parent is used.

Using binary relationship sets is preferable in this case.

 

 

 

 

 

 

 

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]     P.( 5 )

Database Design Process

 

1.  _____________ can help us detect poor E-R design. a) Database Design Process

 

b) E-R Design Process c) Relational scheme

 

d) Functional dependencies      

 

Explanation: For eg.,Suppose an instructor entity set had attributes dept name and dept address, and there is a functional dependency dept name - dept address.

 

2.  If a multivalued dependency holds and is not implied by the corresponding functional dependency, it usually arises from one of the following sources.

 

a) A many-to-many relationship set

 

b) A multivalued attribute of an entity set c) A one-to-many relationship set

 

d) Both a and b      

 

Explanation: For a many-to-many relationship set each related entity set has its own schema and there is an additional schema for the relationship set. For a multivalued attribute, a separate schema is created consisting of that attribute and the primary key of the entity set.

 

3.  Which of the following has each related entity set has its own schema and there is an additional schema for the relationship set.

 

a) A many-to-many relationship set

 

b) A multivalued attribute of an entity set c) A one-to-many relationship set

 

d) Both a and b         

 

Explanation: If a multivalued dependency holds and is not implied by the corresponding functional dependency, it usually arises from this source.

 

4.  In which of the following , a separate schema is created consisting of that attribute and the primary key of the entity set.

 

a) A many-to-many relationship set

 

b) A multivalued attribute of an entity set c) A one-to-many relationship set

 

d) Both a and b     

 

Explanation: If a multivalued dependency holds and is not implied by the corresponding functional dependency, it usually arises from this source.

 

5.  Suppose the user finds the usage of room number and phone number in a relational schema there is confusion.This is reduced by

 

a) Unique-role assumption b) Unique-key assignment c) Role intergral assignment d) None of the mentioned         

 

Explanation: A desirable feature of a database design is the unique-role assumption, which means that each attribute name has a unique meaning in the database.

 

 

 

 

 

 

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]     P.( 6 )

6.  What is the best way to represent the attributes in a large database? a) Relational-and

 

b) Concatenation

 

c) Dot representation d) All of the above     

Explanation:  Example inst sec and student sec.

 

7.  Designers use which of the following to tune performance of systems to support time-critical operations? a) Denormalization

 

b) Redundant optimization c) Optimization

 

d) Realization         

 

Explanation: The process of taking a normalized schema and making it nonnormalized is called denormalization.

 

8.  In the schema (dept name, size) we have relations total inst 2007, total inst 2008 . Which dependency have lead to this relation ?

 

a) Dept name, year-size b) Year-size

 

c) Dept name-size d) Size-year         

 

Explanation: The process of taking a normalized schema and making it nonnormalized is called denormalization.

 

9.  Relation dept year(dept name, total inst 2007, total inst 2008, total inst 2009) .Here the only functional dependencies are from dept name to the other attributes .This relation is in

 

a) Fourth NF b) BCNF

 

c) Third NF d) Second NF     

Explanation: BCNF has only one normal form.

 

10.  Thus a _______ of course data gives the values of all attributes, such as title and department, of all courses at a particular point in time.

 

a) Instance b) Snapshot c) Both a and b

 

d) All of the mentioned     

 

Explanation: We use the term snapshot of data to mean the value of the data at a particular point in time.

 

11.  Representations such as the in the dept year relation, with one column for each value of an attribute, are called _______; they are widely used in spreadsheets and reports and in data analysis tools.

 

a) Cross-tabs b) Snapshot c) Both a and b

 

d) All of the mentioned         

 

Explanation: SQL includes features to convert data from a normal relational representation to a crosstab.

 

 

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]     P.( 7 )

After Midterm               Chapter 6 , 3 , 4 & 9

 

Relational Query Operations and Relational Operators

 

1.  Using which language can a user request information from a database ? a) Query

 

b) Relational c) Structural d) Compiler         

 

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

 

2.  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      

 

Explanation: The attributes name ,dept and tot_cred can have same values unlike ID .

 

3.  Which one of the following is a procedural language ? a) Domain relational calculus

 

b) Tuple relational calculus c) Relational algebra

 

d) Query language         

 

Explanation: Domain and Tuple relational calculus are non-procedural language.Query language is a method through which the database entries can be accessed.

 

4.  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     

 

Explanation: Join finds the common tuple in the relations and combines it.

 

5.  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     

 

Explanation: Cartesian product is the multiplication of all the values in the attributes.

 

6.  The _______operation performs a set union of two “similarly structured” tables

 

a)   Union

b)  Join

c)   Product

 

d)  Intersect         

Explanation: Union just combines all the values of relations of same attributes.

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]     P.( 8 )

7.  The most commonly used operation in relational algebra for projecting a set of tuple from a relation is a) Join

 

b) Projection c) Select

 

d) Union         

Explanation: Select is used to view the tuples of the relation with or without some constraints.

 

8.  The _______ operator takes the results of two queries and returns only rows that appear in both result sets. a) Union

 

b) Intersect c) Difference d) Projection     

 

Explanation: 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 .

 

9.  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         

 

10.  The _________ provides a set of operations that take one or more relations as input and return a relation as an output.

 

a) Schematic representation b) Relational algebra

 

c) Scheme diagram d) Relation flow     

 

SQL Basics and SQL Data Definition

 

1.  Which one of the following is used to define the structure of the relation ,deleting relations and relating schemas ?

 

a) DML(Data Manipulation Langauge) b) DDL(Data Definition Langauge) c) Query

 

d) Relational Schema     

 

Explanation: Data Definition language is the language which performs all the operation in defining structure of relation.

 

2.  Which one of the following provides the ability to query information from the database and to insert tuples into, delete tuples from, and modify tuples in the database ?

 

a) DML(Data Manipulation Langauge) b) DDL(Data Definition Langauge) c) Query

 

d) Relational Schema         

 

Explanation:  DML performs change in the values of the relation .

 

 

 

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]     P.( 9 )

3.  Create table employee (name varchar ,id integer) What type of statement is this ?

 

a) DML b) DDL c) View

 

d) Integrity constraint     

 

Explanation: Data Definition language is the language which performs all the operation in defining structure of relation.

 

4.  Select * from employee

What type of statement is this?

a)   DML

b)  DDL

c)   View

 

d)  Integrity constraint         

 

Explanation:  Select operation just shows the required fields of the relation. So it forms a DML

 

5.  The basic data type char(n) is a _____ length character string and varchar(n) is _____ length character. a) Fixed, equal

 

b) Equal, variable c) Fixed, variable d) Variable, equal         

 

Explanation: Varchar changes its length accordingly whereas char has a specific length which has to be filled by either letters or spaces .

 

6.  An attribute A of datatype varchar(20) has the value “Avi” . The attribute B of datatype char(20) has value ”Reed” .Here attribute A has ____ spaces and attribute B has ____ spaces .

a) 3, 20 b) 20, 4 c) 20 , 20 d) 3, 4         

 

Explanation: Varchar changes its length accordingly whereas char has a specific length which has to be filled by either letters or spaces.

 

7.  To remove a relation from an SQL database, we use the ______ command.

a)   Delete

b)  Purge

c)   Remove

 

d)  Drop table      

 

Explanation: Drop table deletes the whole structure of the relation .purge removes the table which cannot be obtained again.

 

8. Delete from r; r – relation

 

This command performs which of the following action ?

a)   Remove relation

b)  Clear relation entries

c)   Delete fields

 

d)  Delete rows     

 

Explanation:  Delete command removes the entries in the table.

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]     P.( 10 )

9.  Insert into instructor values (10211, ’Smith’, ’Biology’, 66000);

 

What type of statement is this ? a) Query

b) DML

 

c) Relational d) DDL     

Explanation:  The values are manipulated .So it is a DML .

 

10.  Updates that violate __________ are disallowed .

a)   Integrity constraints

b)  Transaction control

c)   Authorization

 

d)  DDL constraints         

 

Explanation: Integrity constraint has to be maintained in the entries of the relation .

 

SQL Queries

1.

 

Name

 

Annie

 

Bob

 

Callie

 

Derek

 

Which of these query will display the the table given above ?

a)   Select employee from name

b)  Select name

 

c)   Select name from employee

d)  Select employee

       

Explanation: The field to be displayed is included in select and the table is included in the from clause.

 

2.  Select ________ dept_name from instructor;

 

Here which of the following displays the unique values of the column ? a) All

 

b) From c) Distinct d) Name         

 

Explanation: Distinct keyword selects only the entries that are unique.

 

3.  The ______ clause allows us to select only those rows in the result relation of the ____ clause that satisfy a specified predicate.

 

a) Where, from b) From, select c) Select, from d) From, where         

 

Explanation: Where selects the rows on a particular condition.From gives the relation which involves the operation.

 

 

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]      P.( 11 )

4.  Select ID, name, dept name, salary * 1.1 where instructor;

 

The query given below will not give an error. Which one of the following has to be replaced to get the desired output?

 

a) Salary*1.1 b) ID

c) Where

 

d) Instructor         

 

Explanation: Where selects the rows on a particular condition.From gives the relation which involves the operation. Since Instructor is a relation it has to have from clause.

 

5.  The ________ clause is used to list the attributes desired in the result of a query.

a)   Where

b)  Select

c)   From

 

d)  Distinct     

 

6.  Select name, course_id from instructor, teaches

where instructor_ID= teaches_ID;

This Query can be replaced by which one of the following ?

 

a) Select name,course_id from teaches,instructor where instructor_id=course_id; b) Select name, course_id from instructor natural join teaches;

c) Select name ,course_id from instructor;

 

d) Select course_id from instructor join teaches;     

 

Explanation: Join clause joins two tables by matching the common column .

 

7.  Select * from employee where salary10000 and dept_id=101;

Which of the following fields are displayed as output?

a)   Salary, dept_id

b)  Employee

c)   Salary

 

d)  All the field of employee relation      

 

Explanation: Here * is used to select all the fields of the relation .

 

8.

 
 
 
 
 
 
Employee_id
Name
Salary
 
 
 
 
 
 
 
1001
Annie
6000
 
 
 
 
 
 
 
 
 
 
 
 
1009
Ross
4500
 
 
 
 
 
 
 
1018
Zeith
7000
 
 
 
 
 
 
 
 
 
 
 
This is Employee table.

Select * from employee where employee_id1009;

Which of the following employee_id will be displayed?

a)   1009, 1001, 1018

b)  1009, 1018

c)   1001

d)  1018

    

Explanation: Greater than symbol does not include the given value unlike =.

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]     P.( 12 )

9.  Which of the following statements contains an error? A) Select * from emp where empid = 10003;

 

B) Select empid from emp where empid = 10006;

C)  Select empid from emp;

D)  Select empid where empid = 1009 and lastname = ‘GELLER’;

 

    

 

Explanation: This query do not have from clause which specifies the relation from which the values has to be selected .

 

10. Insert into employee _____ (1002,Joey,2000);

In the given query which of the keyword has to be inserted ?

a)   Table

b)  Values

c)   Relation

 

d)  Field     

 

Explanation: Value keyword has to be used to insert the values into the table.

 

Basic SQL Operations

 

1.  Select name ____ instructor name, course id from instructor, teaches

 

where instructor.ID= teaches.ID;

 

Which keyword must be used here to rename the field name ? a) From

 

b) Rename c) As

 

d) Join         

Explanation: As keyword is used to rename.

 

2.  Select * from employee where dept_name=”Comp Sci”;

 

In the SQL given above there is an error . Identify the error . a) Dept_name

b)  Employee

c)   “Comp Sci”

 

d)  From

       

Explanation: For any string operations single quoted(‘) must be used to enclose.

 

3. Select emp_name

from department

 

where dept_name like ’ _____ Computer Science’;

 

Which one of the following has to be added into the blank to select the dept_name which has Computer Science as its ending string ?

 

a)   %

b)  _

c)   ||

d)  $

       

Explanation: The % character matches any substring.

 

 

 

 

 

 

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]     P.( 13 )

4.  ’_ _ _ ’ matches any string of ______ three characters. ’_ _ _ %’ matches any string of at ______ three characters.

a) Atleast, Exactly b) Exactly, Atleast c) Atleast, All

 

d) All , Exactly     

 

5.  Select name

from instructor

 

where dept name = ’Physics’

 

order by name;

By default, the order by clause lists items in ______ order.

a)   Descending

b)  Any

c)   Same

 

d)  Ascending      

 

Explanation: Specification of descending order is essential but it not for ascending.

 

6.  Select * from instructor

 

order by salary ____, name ___;

 

To display the salary from greater to smaller and name in ascending order which of the following options should be used ?

 

a) Ascending, Descending b) Asc, Desc

 

c) Desc, Asc

 

d) Descending, Ascending         

 

7.  Select name

from instructor

where salary <= 100000 and salary = 90000;

This query can be replaced by which of the following ?

 

a)  Select name from instructor

 

where salary between 90000 and 100000;

b)  Select name

from employee

where salary <= 90000 and salary=100000;

 

c)  Select name from employee

where salary between 90000 and 100000;

d)  Select name

from instructor

where salary between 100000 and 90000;

       

 

Explanation: SQL includes a between comparison operator to simplify where clauses that specify that a value be less than or equal to some value and greater than or equal to some other value.

 

 

 

 

 

 

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]      P.( 14 )

8.  Select instructor.* from instructor, teaches

 

where instructor.ID= teaches.ID;

 

This query does which of the following operation? a) All attributes of instructor and teaches are selected

 

b) All attributes of instructor are selected on the given condition c) All attributes of teaches are selected on given condition

 

d) Only the some attributes from instructed and teaches are selected

   

 

Explanation: The asterisk symbol “ * ” can be usedin the select clause to denote “all attributes.”

 

9.  In SQL the spaces at the end of the string are removed by _______ function . a) Upper

 

b) String c) Trim d) Lower         

Explanation:  The syntax of trim is Trim(s); where s-string .

 

10.  _____ operator is used for appending two strings.

a)   &

b)  %

c)   ||

d)  _

       

Explanation:  || is the concatenation operator.

 

SQL Data Types and Schemas

 

1.  Dates must be specified in the format a) mm/dd/yy

 

b) yyyy/mm/dd c) dd/mm/yy d) yy/dd/mm     

 

Explanation: yyyy/mm/dd is the default format in sql .

 

2.  An ________ on an attribute of a relation is a data structure that allows the database system to find those tuples in the relation that have a specified value for that attribute efficiently, without scanning through all the tuples of the relation.

a) Index

 

b) Reference c) Assertion d) Timestamp         

Explanation: Index is the reference to the tuples in a relation.

 

3.  Create index studentID_index on student(ID);

Here which one denotes the relation for which index is created ?

a)   StudentID_index

b)  ID

c)   StudentID

 

d)  Student      

 

Explanation: The statement creates an index named studentID index on the attribute ID of the relation student.

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]      P.( 15 )

4.  Which of the following is used to store movie and image files ? a) Clob

 

b) Blob c) Binary d) Image     

Explanation: SQL therefore provides large-object data types for character data (clob) and binary data (blob).

 

The letters “lob” in these data types stand for “Large OBject.” .

 

5.  The user defined data type can be created using a) Create datatype

 

b) Create data

 

c) Create definetype d) Create type      

 

Explanation: The create type clause can be used to define new types.Syntax : create type Dollars as numeric(12,2) final; .

 

6.  Values of one type can be converted to another domain using which of the following ?

a)   Cast

b)  Drop type

c)   Alter type

 

d)  Convert         

 

Explanation: Example of cast :cast (department.budget to numeric(12,2)). SQL provides drop type and alter type clauses to drop or modify types that have been created earlier.

 

7. Create domain YearlySalary numeric(8,2)

constraint salary value test __________;

 

In order to ensure that an instructor’s salary domain allows only values greater than a specified value use:

 

a)   Value=30000.00

b)  Not null;

c)   Check(value = 29000.00);

d)  Check(value)

       

 

Explanation: Check(value ‘condition’) is the syntax.

 

8.  Which of the following closely resembles Create view ? a) Create table . . .like

 

b) Create table . . . as c) With data

 

d) Create view as

   

 

Explanation: The ‘create table . . . as’ statement closely resembles the create view statement and both are defined by using queries. The main difference is that the contents of the table are set when the table is created, whereas the contents of a view always reflect the current query result.

 

9.  In contemporary databases the top level of the hierarchy consists of ______, each of which can contain

_____.

 

a) Catalogs, schemas b) Schemas, catalogs

 

c) Environment, schemas d) Schemas, Environment         

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]      P.( 16 )

10.  Which of the following statements creates a new table temp instructor that has the same schema as instructor.

 

a) create table temp_instructor;

 

b) Create table temp_instructor like instructor; c) Create Table as temp_instructor;

 

d) Create table like temp_instructor;     

 

Application Architectures

 

2.  Which of the unit operation is used in Model view controller? a) Is a Decomposition

 

b) Part Whole Decomposition c) All of the mentioned

 

d) None of the operation     

 

Explanation:  Part whole decomposition is applied to MVC.

 

3.  Memory address refers to the successive memory words and the machine is called as _______________

 

a) word addressable b) byte addressable c) bit addressable

 

d) Terra byte addressable         

 

Explanation:  Part whole decomposition is applied to MVC.

 

4.  Which layer deals which deals with user interaction is called _____________ layer

a)   Business logic

b)  Presentation

c)   User interaction

 

d)  Data access Answer:  b and c

 

Explanation: The single application may have several different versions of this layer, corresponding to distinct kinds of interfaces such as Web browsers, and user interfaces of mobile phones, which have much smaller screens.

 

5.  The _____________ layer, which provides a high-level view of data and actions on data. a) Business logic

 

b) Presentation

 

c) User interaction d) Data access         

 

Explanation: The single application may have several different versions of this layer, corresponding to distinct kinds of interfaces such as Web browsers, and user interfaces of mobile phones, which have much smaller screens.

 

6.  The ______________ layer, which provides the interface between the business-logic layer and the underlying database.

 

a) Business logic b) Presentation c) User interaction d) Data access      

 

Explanation: Many applications use an object-oriented language to code the business-logic layer, and use an object-oriented model of data, while the underlying database is a relational database.

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]     P.( 17 )

7.  The _____________ system is widely used for mapping from Java objects to relations. a) Hibernate

 

b) Object oriented c) Objective

 

d) None of the mentioned         

 

Explanation: In Hibernate, the mapping from each Java class to one or more relations is specified in a mapping file.

 

8.  Which among the following are the functions that any system with a user interface must provide?

a)   Presentation

b)  Dialogue

c)   All of the mentioned

 

d)  None of the mentioned         

 

Explanation:  Presentation and Application are the functions that any system with a user interface must provide.

 

9.  Which of the following is the main task accomplished by the user? a) Compose a document

 

b) Create a spread sheet c) Send mail

 

d) All of the mentioned      

 

Explanation:  All of the mentioned are the main task accomplished by the user.

 

10.  What are the portability concerns founded in Seeheim model?

a)   Replacing the presentation toolkit

b)  Replacing the application toolkit

c)   Replacing the dialogue toolkit

d)  a, b

Answer:  d

 

Explanation: The portability concerns founded in Seeheim model are- Replacing the presentation toolkit and Replacing the application toolkit.

 

Application Security

 

1.  In _________________ attacks, the attacker manages to get an application to execute an SQL query created by the attacker.

 

a) SQL injection b) SQL

c) Direct

 

d) Application         

 

Explanation: Application security has to deal with several security threats and issues beyond those handled by SQL authorization .

 

2.  A Web site that allows users to enter text, such as a comment or a name, and then stores it and later displays it to other users, is potentially vulnerable to a kind of attack called a ___________________ attack.

 

a) Two-factor authentication b) Cross-site request forgery c) Cross-site scripting

 

d) Cross-site scoring scripting         

 

Explanation: In such an attack, a malicious user enters code written in a client-side scripting language such as JavaScript or Flash instead of entering a valid name or comment.

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]     P.( 18 )

3.  _________ is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated.

 

a) Two-factor authentication b) Cross-site request forgery c) Cross-site scripting

 

d) Cross-site scoring scripting     

 

Explanation: Cross-site request forgery, also known as a one-click attack or session riding and abbreviated as CSRF or XSRF.

 

4.  Many applications use _________________, where two independent factors are used to identify a user.

a)   Two-factor authentication

b)  Cross-site request forgery

c)   Cross-site scripting

 

d)  Cross-site scoring scripting         

 

Explanation:  The two factors should not share a common vulnerability.

 

5.  Even with two-factor authentication, users may still be vulnerable to_____________attacks. a) Radiant

 

b) Cross attack c) scripting

 

d) Man-in-the-middle      

 

Explanation: In such attacks, a user attempting to connect to the application is diverted to a fake Web site, which accepts the password from the user, and uses it immediately to authenticate to the original application.

 

6.  A single ______________ further allows the user to be authenticated once, and multiple applications can then verify the user’s identity through an authentication service without requiring reauthentication.

a) OpenID

b) Sign-on system

 

c) Security Assertion Markup Language (SAML) d) Virtual Private Database (VPD)

 

Answer:  b

 

Explanation: Once the user logged in at one site, he does not have to enter his user name and password at other sites that use the same single sign-on service.

 

7.  The ___________________ is a standard for exchanging authentication and authorization information between different security domains, to provide cross-organization single sign-on.

 

a) OpenID

b) Sign-on system

 

c) Security Assertion Markup Language (SAML) d) Virtual Private Database (VPD)

Answer:  c

 

Explanation: The user’s password and other authentication factors are never revealed to the application, and the user need not register explicitly with the application.

 

8.  The __________ standard is an alternative for single sign-on across organizations, and has seen increasing acceptance in recent years.

 

a) OpenID

b) Single-site system

 

c) Security Assertion Markup Language (SAML) d) Virtual Private Database (VPD)

Answer:  a

 

Explanation: The user’s password and other authentication factors are never revealed to the application, and the user need not register explicitly with the application.

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]     P.( 19 )

9.  _______________ allows a system administrator to associate a function with a relation; the function returns a predicate that must be added to any query that uses the relation.

 

a) OpenID

b) Single-site system

 

c) Security Assertion Markup Language (SAML) d) Virtual Private Database (VPD)

 

Answer:  d

Explanation:  Some database systems provide mechanisms for fine-grained authorization.

 

10.  VPD provides authorization at the level of specific tuples, or rows, of a relation, and is therefore said to be a

 

_____________ mechanism. a) Row-level authorization

 

b) Column-level authentication c) Row-type authentication

 

d) Authorization security         

 

Explanation: Oracle Virtual Private Database (VPD) allows a system administrator to associate a function with a relation.

 

Encryption and Its Applications

 

1.  ___________ is widely used today for protecting data in transit in a variety of applications such as data transfer on the Internet, and on cellular phone networks.

 

a) Encryption b) Data mining

 

c) Internet Security

 

d) Architectural security         

 

Explanation: Encryption is also used to carry out other tasks, such as authentication.

 

2.  In a database where the encryption is applied the data is cannot be handled by the unauthorised user without a) Encryption key

 

b) Decryption key c) Primary key d) Authorised key     

 

Explanation: Even if the message is intercepted by an enemy, the enemy, not knowing the key, will not be able to decrypt and understand the message.

 

3.  Which of the following is not a property of good encryption technique ?

a)   Relatively simple for authorized users to encrypt and decrypt data

b)  Decryption key is extremely difficult for an intruder to determine

c)   Encryption depends on a parameter of the algorithm called the encryption key

d)  None of the mentioned

    

Explanation: Here a,b and c are the properties have to be present in a good design of a encryption technique.

 

4.  In which of the following encryption key is used to encrypt and decrypt the data ? a) Public key

 

b) Private key

 

c) Symmetric key d) Asymmetric key         

 

Explanation: In public-key (also known as asymmetric-key) encryption techniques, there are two different keys, the public key and the private key, used to encrypt and decrypt the data.

 

 

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]     P.( 20 )

5.  Encryption of small values, such as identifiers or names, is made complicated by the possibility of

__________

 

a) Dictionary attacks b) Database attacks c) Minor attacks

 

d) Random attacks         

 

Explanation: This happens when particularly if the encryption key is publicly available.

 

6.  Which one of the following uses a 128bit round key to encrypt the data using XOR and use it in reverse to decrypt it ?

 

a) Round key algorithm b) Public key algorithm

 

c) Advanced Encryption Standard d) Asymmetric key algorithm         

Explanation: The standard is based on the Rijndael algorithm.

 

7.  Which of the following requires no password travel across the internet ?

a)   Readable system

b)  Manipulation system

c)   Challenge–response system

 

d)  Responce system

 

       

 

Explanation: The database system sends a challenge string to the user. The user encrypts the challenge string using a secret password as encryption key and then returns the result. The database system can verify the authenticity of the user by decrypting the string with the same secret password and checking the result with the original challenge string.

 

8.  Assymmetric Encryption: Why can a message encrypted with the Public Key only be decrypted with the receiver’s appropriate Private Key?

a)   Not true, the message can also be decrypted with the Public Key

 

b)  A so called “one way function with back door” is applyed for the encryption

 

c)  The Public Key contains a special function which is used to encrypt the message and which can only be reversed by the appropriate Private Key

d)  The encrypted message contains the function for decryption which identifies the Private Key

   

 

Explanation: An one-way function is a function which a computer can calculate quickly, but whose reversal would last months or years. An one-way function with back door can be reversed with the help of a couple of additional information (the back door), but scarcely without this information. The information for the back door is contained in the private Key.

 

9.  Which is the largest disadvantage of the symmetric Encryption? a) More complex and therefore more time-consuming calculations b) Problem of the secure transmission of the Secret Key

c)   Less secure encryption function

 

d)  Isn’t used any more

 

   

 

Explanation: As there is only one key in the symmetrical encryption, this must be known by both sender and recipient and this key is sufficent to decrypt the secret message. Therefore it must be exchanged between sender and receiver in such a manner that an unauthorized person can in no case take possesion of it.

 

 

 

 

 

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]     P.( 21 )

10. Which is the principle of the encryption using a key?

 

a)  The key indicates which funcion is used for encryption. Thereby it is more difficult to decrypt a intercepted message as the function is unknown

 

b)  The key contains the secret function for encryption including parameters. Only a password can activate the key

 

c)  All functions are public, only the key is secret. It contains the parameters used for the encryption resp. decryption

 

d)  The key prevents the user of having to reinstall the software at each change in technology or in the functions for encryption

 

   

 

Explanation: The encoding of a message is calculated by an algorithm. If always the same algorithm would be used, it would be easy to crack intercepted messages. However, it isn’t possible to invent a new algorithm

 

whenever the old one was cracked, therefor the possibility to parameterize algorithms is needed and this is the assignment of the key.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]     P.( 22 )

Extra Questions (Random MCQ)

 

A database may be used to help people:

1.      A) track which student is assigned to a particular advisor.

2.      B) know the current inventory levels of products their company sells.

3.      C) check on the estimated arrival time of an incoming flight at an airport.

4.      D) look up their checking account balance over the Internet.

5.      E) All of the above

 

Which of the following problems associated with storing data in a list is avoided by storing data in a relational database?

1.      A) Maintaining the data may require changing the same data value in many locations.

2.      B) Inconsistency when a data item is used multiple times

3.      C) Inability to store partial data

4.      D) Duplication of data items

5.      E) All of the above

 

Today almost every commercial database is based on:

1.      A) lists.

2.      B) the hierarchical model.

3.      C) the linked-list model.

4.      D) the relational model.

5.      E) the object-oriented model.

 

A relational database stores data in the form of:

1.      A) lists.

2.      B) forms.

3.      C) columns.

4.      D) tables.

5.      E) spreadsheets.

 

SQL stands for:

1.      A) Standard Query Language.

2.      B) Structural Question Language.

3.      C) Structured Query Language.

4.      D) Standard Question Language.

5.      E) Structured Question Language.

 

The statement SELECT STUDENT.StudentNumber, STUDENT.StudentName, FROM STUDENT WHERE STUDENT.StudentNumber = S12345678; is an example of:

1.      A) QBE.

2.      B) SQL.

3.      C) QLE.

4.      D) C++.

5.      E) Java.

 

Which of the following is not a basic component of a database system?

1.      A) Database

2.      B) User

3.      C) ERD

4.      D) DBMS

5.      E) Data applications

 

 

 

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]      P.( 23 )

A relational database is:

1.      A) a self-describing collection of related tables.

2.      B) a collection of forms and reports that support a given purpose.

3.      C) a library of queries and data files for querying.

4.      D) a set of applications and the data sets for those applications.

5.      E) a set of metadata.

 

The component of a database that makes it self-describing is the:

1.      A) related tables.

2.      B) applications.

3.      C) library.

4.      D) data set.

5.      E) metadata.

 

Which of the following would not be an example of database metadata?

1.      A) Names of tables in a database

2.      B) Properties of tables in a database

3.      C) Names of columns in a database and their associated tables

4.      D) Properties of columns

5.      E) Queries against records in the database tables

 

The creation of a database and its tables is a function of which component of the database system?

1.      A) Users

2.      B) Application

3.      C) DBMS

4.      D) Database

5.      E) Web server

 

Which of the following is a function of the DBMS in a database system?

1.      A) Create and transmit queries

2.      B) Control applications

3.      C) Create and process forms

4.      D) Perform backup and recover

5.      E) Process Web page requests

 

Which of the following is a function of the database application in a database system?

1.      A) Create and transmit queries

2.      B) Update database data

3.      C) Maintain database structures

4.      D) Create tables

5.      E) Backup and restore data

 

Which of the following is not a function of the database application in a database system?

1.      A) Execute application logic

2.      B) Control concurrency

3.      C) Create and process forms

4.      D) Create and transmit queries

5.      E) Create and process reports

 

Microsoft SQL Server is an example of a:

1.      A) database.

2.      B) database management system.

3.      C) data manipulation system.

4.      D) table.

5.      E) list manager.

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]      P.( 24 )

Microsoft Access is a personal database system, and a personal database system is characterized by:

1.      A) the DBMS removing the metadata from the database.

2.      B) the DBMS product taking the role of the DBMS and the database application generator.

3.      C) the database being stored inside the DBMS.

4.      D) the DBMS product being limited to a maximum of ten tables in any given database.

5.      E) the DBMS not supporting indexes.

 

The Microsoft Access application generator is not responsible for:

1.      A) creating forms.

2.      B) creating reports.

3.      C) creating queries.

4.      D) creating tables.

5.      E) storing queries.

 

Microsoft Access 2010 database files are stored using the file extension:

1.      A) .adb.

2.      B) .asp.

3.      C) .accdb.

4.      D) .mdb.

5.      E) .sql.

 

The default file format for Microsoft Access 2010 database files is the:

1.      A) Access 2007 format.

2.      B) Access 2003 format.

3.      C) Access XP format.

4.      D) SQL Server format .

5.      E) XBD format.

 

The Microsoft Access 2010 data type of AutoNumber is used when there is a specific need for a:

1.      A) foreign key.

2.      B) primary key.

3.      C) surrogate key.

4.      D) spare key.

5.      E) secondary key.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]      P.( 25 )

Extra Questions (True / False)

 

The purpose of a database is to help people keep track of things.

1.      True

2.      False

 

A possible problem with keeping data in lists is that if you delete a row of data from a list, you may also delete some data items that you want to keep.

 

1.      True

2.      False

 

An advantage of keeping data in lists is that if you update a data value in one row of data in a list, other occurrences of the same data item in other rows will be automatically updated as well.

1.      True

 

2.      False

An advantage of keeping data in lists is that if you add a new row of data to the list, you will never have null values occurring for any data item in the row.

1.      True

 

2.      False

One problem with storing duplicated data is the potential for inconsistent values.

1.      True

2.      False

 

A relational database stores data in the form of lists.

1.      True

 

2.      False

Usually, a database table containing both rows and columns is designed to store data for exactly two themes.

1.      True

 

2.      False

By separating data into tables containing data on only one theme each, making changes to the data is simplified.

 

1.      True

2.      False

 

SQL stands for Structural Question Language.

1.      True

2.      False

 

Relational database tables are commonly combined, queried, and processed using Structured Query Language (SQL).

 

1.      True

2.      False

 

Although users use database systems, they are not considered part of a database system.

1.      True

 

2.      False

A database is a set of one or more computer programs that serves as an intermediary between the users and the database management system (DBMS).

1.      True

 

2.      False

A relational database can be defined as a self-describing collection of related tables.

1.      True

2.      False

 

A database is self-describing because the user maintains a record of the database structure outside the database itself.

1.      True

 

2.      False

Metadata is the user data stored in the database.

1.      True

 

2.      False

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]      P.( 26 )

Most organizations create and use their own database management system (DBMS) products.

1.      True

 

2.      False

The DBMS is used to create the database itself.

1.      True

2.      False

 

Referential integrity constraints must be enforced by the application program.

1.      True

 

2.      False

Application programs are responsible for creating, maintaining, and supporting database backup and recovery systems.

1.      True

 

2.      False

The DBMS receives data update requests from the application program.

1.      True

2.      False

 

In the general division of labor between database applications and the DBMS, the processing of forms is considered a DBMS task.

1.      True

 

2.      False

In the general division of labor between database applications and the DBMS, the application program determines which tables need to be modified.

1.      True

2.      False

 

In the general division of labor between database applications and the DBMS, the application program formats the results of a query into a report.

 

1.      True

2.      False

 

Personal DBMS products, such as Microsoft Access, create a clear distinction between the DBMS and the database application.

1.      True

 

2.      False

There is no reason for serious database developers to learn many aspects of database processing technology because DBMS products like Microsoft Access hide these aspects.

1.      True

 

2.      False

Microsoft Access 2010 is a personal database that combines a DBMS with an application generator.

1.      True

2.      False

 

The Microsoft Access 2010 application generator provides the ability to create and store forms, reports, and queries.

 

1.      True

2.      False

 

Microsoft Access 2010 databases are stored using the file extension .accdb.

1.      True

 

2.      False

Microsoft Access 2010 uses the Access 2003 .mdb file format as the default file format for database files.

1.      True

 

2.      False

Microsoft Access 2010 uses the AutoNumber data type to create surrogate keys.

1.      True

2.      False

 

 

 

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]     P.( 27 )

Extra Questions (Fill the Blank)

 

The purpose of a database is to help people ________.

 

A relational database stores data in the form of ________.

 

It is almost always best to design a table in a database so that it contains data on ________ theme.

 

In relational databases, query requests use a language called ________.

 

Data that the database keeps about its own structure is called ________.

 

The purpose of the ________ in a database system is to receive requests from applications and to translate those requests into reads and writes on the database files.

 

 

________ constraints are rules that the DBMS enforces to ensure that data values in one table have corresponding values in another related table.

 

 

 

The DBMS controls ________ by ensuring that one user's work does not inappropriately interfere with another user's work.

 

 

A(n) ________ is a set of one or more computer programs that serves as an intermediary between the user and the DBMS.

 

 

In a database system, the ________ creates and processes forms.

Microsoft Access is a ________, which combines a DBMS and an application generator.

The Microsoft Access application generator adds the ability to create and store _____, _____, and ____.

Microsoft Access 2010 database files are stored using the ________ file extension.

.

 

By default, Microsoft Access 2010 saves data files in the ________ file format.

 

Microsoft Access 2010 generates surrogate key values when the ________ data type is used.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

IT-244 _ Introduction to Database (Test Bank) Collected By:   [email protected]      P.( 28 )
Powered by