Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 51

In relational data model, an attribute is a column | False *

A data model is a notation for describing data or information. And the description
generally consist of: | 3 parts *
DBMS stands for what? | Database Management System *
Look at this line: MOVIES (Id, Name, Description) What the above represent? | A
schema *
Look at the following data for table R: .............. | R is a relation *
Choose all correct statements: | set of rows ,,Data Mode
Choose 3 important data models that we will study in database course |
Network ,Hierachical,Relational
In relational data model, a tuple is a record or a row | true
When the Relational Data Model first proposed? | 1970
What is the oldest data model? | Network Data Model
How many data models mentioned in our database course? | 6
XML files are semi-structured data | true
A relation is a list of tuples | false
A relation is a set of tuples | true
What is the father of relational data model? | Adgar Codd
In relational data model, an attribute is a column | false
A data model is a notation for describing data or information. And the description
generally consist of: | 3 parts
A weak entity: | both (a) and (b)
Give the relation R(XYZT) with the following FD's: XY -> Z ; XYT -> Z ; XYZ -> T ;
XZ -> T | R is not in BCNF
Given the relation schema R(XYZT) and functional dependencies F = {X->Z, T->Y}. |
both X->Z and T->Y
The highest normal form for relation schema R(XYZ) with functional dependencies: F
= {XY-> Z; Y->X; Z->Y } is: | 3NF
Give the relation R(EFGH) with the following FD's: E -> F ; F -> E ; E -> H ; H ->
F | R is in 3NF
Give the relation R(ABCDE) with the following FD's: D -> C, CE-> A, D ->A, and AE -
>D | ABE
Which of the following relations is in Third normal form (3NF)? | ACD -> B ; AC ->
D ; D -> C ; AC -> B
Let R(ABCDEFGH) satisfies the following functional dependencies: A -> B, CH -> A, B
-> E, BD -> C, EG -> H, DE -> F. | ADG -> CH
Which of the following statements are correct? (choose 2) | bo? in 3NF are also in
BCNF
Which of the following relations is in Boyce-Codd Normal Form (BCNF)? | BD -> C ;
AB -> D ; AC -> B ; BD -> A
How many design principles are there in our course when drawing an ERD? | 5
Which of the following are guidelines for designing the relational schema ? | All
of the above
Choose the correct statements: When draw an ERD (choose 2): | We ,,when an entity
Given relation scheme R = (XYZTV) and functional dependencies:{XY -> ZTV and X ->
V}. So, we can say that: | XY is a key for R
Consider a relation R(A,B,C,D,E) with functional dependencies: AB->C, B->D, and C-
>E. | AB
The ER model means that: | be close to a users perception of the data
Consider the following statement: "When drawing ERD, you should avoid saying
something in many different ways' | Avoid Redundancy Principle
Consider the following statement: "Entity Sets and their attributes should reflect
the reality" That above statement describes which principle? | Faithfulness
principle
Choose the correct statements: When draw an ERD (choose 3): | bo? Redundancy is not
important, so we can ignore it
Given the relation schema R(MNPQ) with FDs:{MN->P; MN->Q; PQ->M; PQ->N}. | 3NF
The functional dependency A -> B for relation schema R(A,B.C,D) implies that |
value for A must have the same value for B
How many primitive relational algebra operators are there in our course? | 6
Suppose relation R(A.B) has the tuples: | None of the above
Suppose relation R(A.B) has the tuples: | (3.4.6.8),(12.4.6)
Consider the following statement "When drawing ERD. you should avoid introducing
more elements into your design than necessary" | Simplicity Count Principle
Suppose relation R(A.B) has the tuples: | (1.2.4.6.8),(1.2.2.4.6)
Suppose relation R(A.B) has the tuples: | (5.6),(7.8)
Consider the following statement "When drawing ERD. if an entity has no non-key
attribute and it is the "one" in many-one relationship, then we should set r! to
the attribute of other entities" | Picking the right kind of element principle
Consider the following statement "When drawing ERD. you should avoid drawing
entities that can not be uniquely identified by their own attributes" | Avoid
Redundancy Principle
The LEN function in SQL Server is: | A scalar function
What is the meaning of the LEN function in SQL Server? | number of characters of a
string
How to remove all trailing blanks? | We can use the RTRIM function
The following is the syntax for the DATEDIFF function: DATEDIFF ( datepart,
startdate , enddate ) | true
How to remove all leading blanks? | We can use the LTRIM function
What is the meaning of the ISNULL function? | NULL with the BLANK value
Which of the following is in-correct? | SELECT datepart(�1-jan-09�, day)
Which of the following is in-correct? | SELECT datepart('1-jan-09', year)
Which of the following is in-correct? | SELECT datepart(�1-jan-09', month)
How to convert a number to a string? (choose all possible) | CONVERT,,CAST
What is the meaning of the DATEADD function? | adds an interval to a date you
specify
The CASE function is used to Evaluates a list of conditions and returns one of
multiple possible result expressions | true
In SQL Server, an index is an on-disk structure associated with a table or view
that speeds up retrieval of rows from the table or view | true
Clustered index is not a good choice for the columns that undergo frequent changes
| true
A table or view must have a clustered indexe and some non-clustered indexes | false
SQL Server typically selects the most efficient method when executing queries.
However, if no indexes are available. SQL Server must use a full table scan | true
How many clustered index we can create in a table? | 1
Indexes can be helpful for a variety of queries that contain SELECT, UPDATE, or
DELETE statements | true
In SQL Server, indexes are automatically created when PRIMARY KEY and UNIQUE
constraints are defined on table columns | true
In reality, an incorrect index choice can cause less than optimal performance |
true
You should define the clustered index key with as few columns as possible | true
Choose the incorrect statement | Non-Clustered indexes sort and store the data rows
in the table based on their key values
An index contains keys built from one or more columns in the table or view. These
keys are stored in a structure (B-tree) that enables SQL Server to find the row or
rows associated with the key values quickly and efficiently | true
When performing a table scan, the query optimizer reads all the rows in the table,
and extracts the rows that meet the criteria of the query. A table scan generates
any disk I/O operations and can be resource -intensive | false
Choose the correct statement | Clustered indexes son and store the data rows in the
table based on their key values
Well-designed indexes can reduce disk I/O operations and consume fewer system
resources, therefore it improves query performance | true
Choose all the correct statements about indexes | all
How to build a good performance database? | None of the above
We should use which function to get the number of rows affected by the last
statement | @@IDENTITY
How to write a good performance SQL query? | Always try to avoid using "SELECT *�
Choose the correct answer | Normalize the database to 3NF
Choose all the thing that we should do with SQL Server | Use the tools,,SELECT
We should use which function to get the last-inserted identity value. | @@IDENTITY
A Database is called having good performance if | None of the above
To improve the DB performance: | set-based queries and
Regardless of what any other transaction is doing, a transaction must be able to
continue with the exact same data� sets it started with. The above describes which
property of a transaction? | Isolation
Every row and value must agree with all constraints once the transaction is
complete. The above describes which property of a transaction? | Consistency
The DB product must be constructed so that even if the data drive melts, the DB can
be restored up to the last transaction that was committed a split second before the
hard drive died The above describes which property of a transaction? | Durability
Which is the most dangerous fault that can potentially affect the integrity of a
transaction? | Dirty Read
How many properties we must use to measured the quality of a transaction? | 4
Once a transaction is committed, it stays committed The above describes which
property of a transaction? | Durability
Choose all correct statements | COMMITTING,,ROLLING,,In SQL
Please choose 3 properties of a lock in DBMS | Duration ,Granularity,mode-the type
Which is the least dangerous fault that can potentially affect the integrity of a
transaction? | Phantom rows
Each transaction must be isolated or separated from the effects of other
transaction The above describes which property of a transaction? | Isolation
At the end of the transaction, either all statements of the transaction is
successful or all statements of the transaction fail. The above describes which
property of a transaction? | Atomic
When sorting. Null values are treated as the lowest possible values | true
Except for COUNT, aggregate functions ignore null values | true
How to returns a part of a character, binary, text or image? (For example: how to
get the �bcd� in �abcdef� string) | Use the SUBSTRING function
The ORDER BY clause can not include items not appearing in the select list | true
RANK() and ROW_NUMBER() are 2 ranking functions | true
We can use the Aggregation in WHERE clause | false
How to get the information about the number of attempted connections, either
successful or unsuccessful since SQL Server was last started | Use the
@@CONNECTIONS
A trigger is a special kind of stored procedure that automatically executes when an
event occurs in the database server | TRUE
The RANK() function returns the rank of each row within the partition of a result
set | true
How to get the information about the version, processor architecture, build date,
and operating system for the current installation of SQL Server | Usethe @@VERSION
When create stored procedures, the "WITH ENCRYPTION" option indicates that SQL
Serverwill convert the original text of the CREATE PROCEDURE statement to an
obfuscated format | true
The maximum nested level of a Transact-SQL stored procedure is 64MB | false
In SQL Server, we can use the ORDER BY clauses in sub-queries | FALSE
The maximum size of a Transact-SQL stored procedure is 256MB | true
Choose the correct statement | All of the above
Choose a right answer. | All of the others
Schema-altering commands are known as��commands. | Data Definition Language
Referential integrity Constraints control relationships between | tables in a
database
Given the relation Employee(SSN. FNAME. LNAME. SALARY). Select the right query
below to find the employee(s) who has the lowest salary in the company | WHERE
SALARY IN (SELECT MIN(SALARY) FROM Employee)
Given a relation R(A.B.C.D). Which of the followings is trivial? | A->->BCD
Which of the following is NOT a standard aggregation operator? | GROUP
Select the well-formed XML | <Movie title="StarWar*><Year>1997</Year></Movie
Which of the fallowings is true? | The Entity Relationship (ER) model represents
the structure of data graphically
In the three-tier architecture, the database tier's function is to | Execute
queries that are requested from the application tier.
Choose a right answer | An authorization ID may be granted privileges from others
or may grve its privileges to others
Which of the fallowings is part of data model? | All of the others |
Exception handler in PSM is defined as follows: DECLARE <where to go next> HANDLER
FOR condition list> <statement> The <where to go next> clause can be: | All of the
others
In SQL language, the command/statement that let you add an attribute to a relation
is_ | Alter
Choose the right statement | All of the others.
Consider the Dalalog rule H(xy) <- Sfx. y) AND x > 2 AND y < 6. Relation S(x y) has
3 tuples (2.3). (3.5). and (4.6). What is about H? | H has a tuple (3.5)
Select the valid query to declare the foreign key presC# of the relation
Studiolname. address. presC#) that references the cert of the relation
MovieExeclname. address. cert#. netWorth): | INT REFERENCES Movie Exec (cert#));
Choose the right statement | All of the others
The relational operator that yields all possible pairs of rows from two tables is
known as a _ | Product
Consider a relation with schema R(A, B, CD) and FD's BC-> D, D-> A, A-> B. Which of
the following is the key of R? | BC
The ER Diagram uses three principle element types: | Entity sets. Attributes, and
Relationships
In PSM. the difference between 3 stored procedure and a function is that | All of
the others
Selecl Ihe right syntax for HAVING clause in SOL | <list of attributes>
Select the right answer. | All of the others
Given relations R(A.B) and S(B.C.D). The result of natural join of the relations R
and S has | Attributes A B. C. D
Given relation U(A, B, C) that has 2 tuples (1,2,3) and (4,5,6), and relation
V(B(C, D) that has 2 tuples (2,3,10) and (2,3,11). Choose the right answer below; |
that has 3 tuples (1.2.3.10) .(1.2.3.11) and (4.5.6. NULL).
Data Definition language (DDL) is used to _ | declare database schemas
The result of (UNKNOWN OR TRUE) is | true
In Java Database Connectivity (JDBC). before we can execute SQL statements), we
need to | Establish a connection to the database and create statement(s).
Choose the right answer | All of the others
Choose a right answer | All of the others
Which of following is never used as a data model' | None of the others
Select the right answer | All of other
Select the right statement to declare MovieStar to be a relation whose tuples are
of type StarType. Note; StarType is a user-defined type that has its definition as
follows; CREATE TYPE StarType AS ( nameCHAR(30). address CHAR(IOO) }; | CREATE
TABLE MovieStar OF StarType Q;
Suppose an updatable view ParamountMovies is associated with Movies relation.
Choose a right answer | Drop Movies relation also delete the view ParamountMovies
Which of the following statements is true? | 4NF implies BCNF and BCNF implies 3NF
The binary relationship between classes in UML is called - | Association
Which of the following statements is true? | All of the others |
Given the relation Movies(title, year, length, genre. studioName). Select the right
query to create a View with the titles and studio names of all movies that were
produced in 1980 | AS SELECT title. studioName
Given the relation Employee(SSN. FNAME. LNAME. SALARY. DepartmentNo). Select the
right query below to count the number of employees in each department | (*) FROM
Employee GROUP BY DepartmentNo
Consider a relation with schema R(A, B. C. D) and FD's A-> B. A-> C. C -> D. Which
ofthe following is the {A}+ ? | {A B C D}
To create a constraint (for example, referential integrity constraint) on a
relation, the owner ofthe schema must have | REFERENCES privilege
Choose a wrong answer. | Relational algebra can express recursion
In DTD. the main difference between PCDATA and CDATA is | PCDATA is text that will
be parsed by
_______authorizes access to database, coordinate, monitor its use, acquiring
software, and hardware resources. | Database administrator
The key for a weak entity set E is_ | Zero or more attributes of and key attributes
from supporting entity sets
Choose right answer(s). | All of orther
Choose the right statement | When the trigger is awakened, it tests a condition. If
the condition is satisfied, the action associated with the trigger is executed
Four characteristics of transactions are | Atomicity. Isolation. Consistency.
Durability
Select the right answer | All of orther
Choose the right statement to grant the INSERT and SELECT privileges on table
Movies to users torn' and jerry' | jerry WITH GRANT OPTION
When declaring foreign key constraint for relation A thai references relation B.
the referenced attribute(s) of the relation B must be declare as_______ | UNIQUE or
PRIMARY KEY
Choose an incorrect statement | None of the others
Select the right statement | All of the others
A class in UML is similar to___ | An entity set in E/R model

A ____ is a logically coherent collection of data with some inherent meaning,


representing some aspect of real world and being designed, built and populated with
data for a specific purpose | Database
Choose the most correct statement | All of the others
Which of following is never used as a data model | None of the others
A ____ is a relation name, together with the attributes of that relation | schema
A ___ is a notation for describing the structure of the data in a database, along
with the constraints on that data | data model
A _____ is a language for defining data structures | DDL
Which statement is used to remove a relation named R? | DROP TABLE R
What is another term for a row in a relational table | Tuple
Given a relation R(A,B,C,D). Which of the followings is trivial | A->->BCD
Let R(ABCD) be a relation with functional dependencies {A -> B | AC
Suppose R is a relation with attributes A1, A2, A3, A4. The only key of R is {A1,
A2}. So, how many super-keys do R have? | 4
Consider the following functional dependencies | R is in First Normal Form
The relation R(ABCD) has following FDs: { A -> B ; B -> A ; A -> D ; D -> B } | R
is in 3NF
Given a R(A,B,C,D) with the following FDs: AB->D, BC->A, AD->B , CD->B ,AD->C | The
FD set of R is not canonical and R is in BCNF
What is the difference between the 2NF and the 3NF? | 2NF deals with partial
functional dependency, while 3NF deals with transitive functional dependency
What is "de-normalization"? | De-normalization means allowing duplicate columns
appeared in a table
What is the benefit of "de-normalization"? | The main benefit of de-normalization
is improved performance with simplified data retrieval (this is done by reduction
in the number of joins needed for data processing)
The key for a weak entity set E is | Zero or more attributes of E and key
attributes from supporting entity sets
A class in UML is similar to | An entity set in E/R model
A(n) _____ provides a means to analyze business requirements so as to standardize
organizational vocabulary, enforce business rules, and ensure adequate data quality
| All of the others
An association class in UML is similar to ______ in the ER model | attributes on a
relationship
In UML, what is the difference between an aggregation and a composition? | In
composition, when the owning object is destroyed, so are the contained objects. In
aggregation, this is not necessarily true
Consider the law, that holds for set relations: T intersect(R union S) = (T
intersect R) union (T intersect S) | False
Choose the correct statement | Aggregate functions perform a calculation on a set
of values and return a single value
Compute the result of the following query: SELECT SUM(D) | 6
Compute the result of the following query: SELECT D, SUM(C) | (9,16)
Column A of a relation has the following list of values in the six rows of the
table: NULL, NULL, 10, 10, 20, 30 | 20
The table Arc(x,y) currently has the following tuples (note that there are
duplicates): (1,2), (1,2), (2,3), (3,4), (3,4), (4,1), (4,1), (4,1), (4,2). Compute
the result of the query: | (3,1,2)
How we can understand about this statement: "All aggregate functions are
deterministic"? | This means aggregate functions return the same value any time
they are called by using a specific set of input values
When we apply set operators (UNION, INTERSECT, EXCEPT) to two relations R and S,
which conditions on R and S must be satisfied | All of the others
How many JOIN conditions are necessary to combine five tables based on common
attributes? | 4
Suppose relation R(A,B) has the tuples and the relation S(B,C,D) has tuples Compute
the right outer join of R and S, where the condition is: R.B = S.B Then identify 2
tuples of R that do not appear in the computed result | (30,y) , (70,t)
For what values of x, y, and z, including NULL, does the Boolean expression x <= 4
OR NOT(y >= 2 AND z = 10) | x = 5, y = 3, z = 10
What operator tests column for the absence of data? | IS NULL operator
What does NULL mean? | The value NULL means UNKNOWN
What is the value of the query: SELECT 'Nancy' + NULL + 'Smith' when evaluated on
Microsoft SQL Server? | NULL
Which SQL keyword is used to sort the result-set? | ORDER BY
Three properties of a lock in DBMS are : Granularity: a)Granularity: the size of
the lock, b) Granularity: the type of the lock, c) Mode: the type of the lock, d)
Duration: the time in seconds that the DBMS waits for a lock to be | (a) and (c)
and (d) are true
A database transaction, by definition, must be ACID (atomic, consistent, isolated
and durable). What does "Durable" mean? | "Durable" means that: Transactions that
have committed will survive permanently
Suppose relation R(A,B). Choose the SQL statement that is equivalent to the
following RA expression | SELECT (A+B) AS C, FROM R, WHERE (A+B) > 10
What is the difference between the WHERE and HAVING SQL clauses? | The WHERE SQL
clause condition(s) is applied to all rows in the result set
Choose the correct statement : " You can remove a trigger by dropping it or by
dropping the trigger table " | All of the others
Suppose R and S are 2 relations. R is the parent of S. And the relationship between
R and S is set to "ON DELETE CASCADE" | We can delete a row from R although that
row has children in S (and in this case, all the children will be deleted too)
To create a DEFAULT constraint on the "City" column of the table PERSON which is
already created, use the following SQL: | ALTER TABLE Person ALTER COLUMN City SET
DEFAULT 'SANDNES'
Three basic types of database integrity constraints are: a)Entity integrity, (b)
Domain integrity, (c) Referential integrity, d) Primary key integrity | (a) and (b)
and (c) are true
A(an) _____ asserts that a value appearing in one relation must also appear in the
primary-key component(s) of another relation | Foreign key constraint
What is difference between PRIMARY KEY and UNIQUE KEY | A table can have more than
one UNIQUE KEY constraint but only one PRIMARY KEY
A/An _____ is a data structure that makes it efficient to find those tuples that
have a fixed value for an attribute | Index
Select the most correct answer An index is a data structure used to speed access to
tuples of a relation, given values of one or more attributes | All of the
others.___ allow the database application to find data fast, without reading the
whole table | Indexes
What are the drawbacks of indexes? | (a)Indexes require more disk space, (b)
Indexes make UPDATE, INSERT, DELETE statement slower
Well-designed ____ can reduce disk I/O operations and consume fewer system
resources therefore improving query performance | Indexes
Which of the following statements is the most correct Using Stored procedures
reduces network traffic | All of the others
The benefits of stored procedures are: | a)They improve the security by letting the
admin to LIMIT the access rights of users, c) They can be reused many times
Select the right statement to declare MovieStar to be a relation whose tuples are
of type StarType. Note: StarType is a user-defined type that has its definition as
| CREATE TABLE MovieStar OF StarType ();
A ____ table is a table that is embedded within another table | Nested
A database of _____ data model is a collection of nodes, each node is either a leaf
or interior | semi-structured
Select the well-formed XML | <? xml version = "1.0" ?> , <MovieData>
A _____ specifies which characters are "less than" which other characters |
Collation
A ____ is a powerful tool for creating and managing large amounts of data
efficiently and allowing it to persist over long periods of time, safely | DBMS
Choose the most correct statement: Database is created and maintained by a DMBS |
All of the others
What is the hierarchical data model | A hierarchical data model is a data model in
which the data is organized into a tree-like structure
In _____ Data Model, the data and relations between them are organized in tables |
Relational
Why the intersection operator is not called a primitive relational algebra
operator? | Because the intersection operator can be expressed through the union
operator and the difference operator
In SQL , the command/statement that let you add an attribute to a relation schema
is | Alter
To update a relation's schema, which one of the following statements can be used? |
ALTER TABLE
Schema-altering commands are known as _________ commands | Data Definition Language
Which one of the following is NOT a DML command? | ALTER TABLE
What is a functional dependency | A functional dependency (A->B) occurs when the
attribute A uniquely determines B
Suppose R is a relation with attributes A1, A2, A3, A4 The only key of R is {A1,
A2}. So, how many super-keys do R have? | 4
What is a key attribute in a relation? | A key attribute is an attribute that
belongs to one of the keys of the relation
Which of the following relations is in Boyce-Codd Normal Form (BCNF)? | R(ABCD)
with FD's: BD -> C ; AB -> D ; AC -> B ; BD -> A
3NFconcept is related to (choose 1 answer only): | All of the others
The relation R(ABCD) has following FDs {ACD -> B ; AC -> D ;D -> C ; AC -> B} | R
is in 3NF
Let R(A,B,C,D) with the following FDs: {AB->C, AC->B, AD->C} | R is in 2NF
Which of the following statements is correct | For any relation schema, there is a
dependency-preserving decomposition into 3NF
Which of the following statements is true BCNF condition guarantees the non
existence of the anomalies | In BCNF condition, the left side of every non trivial
FD must be a super key
How to eliminate anomalies when we design a database | We should decompose relation
to eliminate anomalies
What is the goal of decomposition when designing a database | The goal of
decomposition is to replace a relation by several relations that do not exhibit
anomalies
In UML, what is the difference between an aggregation and a composition | In
composition, when the owning object is destroyed, so are the contained objects. In
aggregation, this is not necessarily true.
Consider the following statement:"Entity Sets and their attributes should reflect
the reality" | Faithfulness principle
Look at the following statements:a)We should pick the right kind of elements (b)
When an entity has no non-primary key attribute, we should convert that (c) Use
weak entities when-ever possible (d) Always make redundancies | (a) and (b) are
correct
The ER Diagram uses three principle element types | Entity sets, Attributes, and
Relationships
The binary relationship between classes in UML is called | Association
Consider the Datalog rule H(x,y) <- S(x, y) AND x > 2 AND y < 6. Relation S(x, y)
has 3 tuples (2, 3), (3, 5), and (4, 6). What is about H | H has a tuple (3, 5)
Consider the law, that holds for set relations (S intersect T) - R = S intersect (T
- R). | False
Suppose that tuple t appears, respectively, x, y, and z times in the relations X,
Y, and Z. Let t appear w times in the relation X union (Y intersect Z) | w <= x+y
The table Arc(x,y) currently has the following tuples (note there are duplicates):
SELECT x, COUNT(y) | (4,4)
Given the relation Employee(SSN, FNAME, LNAME, SALARY DepartmentNo). Select the
right query below to count the number of employees in each department | SELECT
DepartmentNo, COUNT(*) FROM Employee GROUP BY DepartmentNo
When we apply set operators (UNION, INTERSECT, EXCEPT) to two relations R and S,
which conditions on R and S must be satisfied? | All of the others
Here are two relations, R(A,B), S(C,D). Their current values are: FROM R RIGHT
OUTER JOIN S ON R.A = S.C | (null, null, 0, 1), (null, null, 5, 8)
FROM R LEFT OUTER JOIN S | (4, 7, null, null)
A tuple which fails to participate in a join is called: | dangling tuple
(TRUE OR NULL) return | TRUE
Choose one correct statement: Two null values are equal | Comparisons between two
null values, or between a NULL and any other value, return unknown
For what values of x, y, and z, including NULL, does the Boolean expression x <=
100 AND NOT(y >= 15 OR z = 35)have the truth value UNKNOWN? Identify one of those
values from the list | x = NULL, y = 0, z = 4.
Choose one correct statement No two null values are equal | No two null values are
equal
A database transaction, by definition, must be ACID (atomic, consistent, isolated
and durable). What does "Isolated" mean? | "Isolated" means that: how/when the
changes made by one operation in one transaction become visible to other concurrent
operations in other transactions
What one is a wildcard used for pattern matching? | "%" (for multi-character
substitution)
Choose the most correct statement about PRIMARY KEY : The PRIMARY KEY constraint
uniquely identifies each record in a database | All of the others
Foreign key constraints are created by using "_____" keyword to refer to the
primary key of another table | REFERENCES
A database ____ is a data structure that improves the speed of data retrieval
operations on a database table at the cost of slower writing and increased storage
space | Index
The most useful index on a relation is an index on its key. This is because | The
search operation based on the primary key is commonly used
The SQL operations that are performed while a connection is active form a | Session
In PSM, the difference between a stored procedure and a function is that | A
function has the return statement
The aim for the Object-relational database is to bridge the gap between conceptual
data modelling techniques such as Entity-relationship diagram | True
Choose the correct statement: A User-Defined Type (UDT) in SQL can be the type of a
table | All of the others
______ is a set of markup declarations that define a document type for SGML- family
markup languages (SGML, XML, HTML) | Document Type Definition
A ____ document defines the XML document structure with a list of legal elements
and attributes | DTD
A ____ is the framework under which data may exist and SQL operations on data may
be executed | SQL Environment
is a powerful tool for creating and managing large amounts of data efficiently and
allowing it to persist over long periods of time, safely | DBMS
Database is a collection of information that exists over a long period of time |
All of the others
What is the hierarchical data model | organized into a tree-like structure
Data Model, the data and relations between them are organized in tables |
Relational
Why the intersection operator is not called a primitive relational algebra
operator? | through the union operator and the difference operator
the command/statement that let you add an attribute to a relation | Alter
Schema-altering commands are known as | Definition Language
is a notation for describing the structure of the data in a database, along with
the constraints on that data | data model
Which one of the following is NOT a DML command | ALTER TABLE
What is a functional dependency | attribute A uniquely determines B
Suppose R is a relation with attributes A1, A2, A3, A4 | 4
What is a key attribute in a relation | A key attribute is an attribute that
belongs to one of the keys of the relation
Which of the following relations is in Boyce-Codd Normal Form (BCNF) | FD's: BD
3NFconcept is related to (choose 1 answer only) | All of the others
The relation R(ABCD) has following FDs | R is in 3NF
Which of the following statements is correct | dap an
In BCNF condition, the left side of every non trivial FD must be a super key | All
of the
How to eliminate anomalies when we design a database | We should decompose
What is the goal of decomposition when designing a database | decomposition is to
replace
In UML, what is the difference between an aggregation and a composition | In
composition
Entity Sets and their attributes should reflect the reality | Faithfulness
When an entity has no non-primary key attribute, we should convert that entity to
an attribute | 1.we should 2. when an
The ER Diagram uses three principle element types | Constraints
has 3 tuples (2, 3), (3, 5), and (4, 6). What is about H | H has a tuple (3, 5)
S intersect T) - R = S intersect (T - R | False
respectively, x, y, and z times in the relations X, Y, and Z | w <= x+y
T intersect(R union S) = (T intersect R) union (T intersect S) | False
Suppose the relation S(B,C,D) has tuples | 6
The table Arc(x,y) currently has the following tuples | (4,4)
Which one of the followings will appear in the result of the following querys |
(c,18)
SSN, FNAME, LNAME, SALARY, DepartmentNo | DepartmentNo, COUNT(*) FROM Employee
GROUP BY
What row that appears in the result of the following query | (10,14)
When we apply set operators (UNION, INTERSECT, EXCEPT) to two relations R and S |
All of the others
FROM R RIGHT OUTER JOIN S | (null, null, 0, 1) (null, null, 5, 8)
A tuple which fails to participate in a join is called | dangling tuple
Comparisons between two null values, or between a NULL and any other value, return
unknown | dap an
x <= 100 AND NOT(y >= 15 OR z = 35) | x = NULL, y = 0, z = 4.
Comparisons between two null values, or between a NULL and any other value, return
FALSE | No two null values are equal
What does "Isolated" mean | how/when
What one is a wildcard used for pattern matching | % for multi-character
substitution
SELECT SUM(B) FROM R WHERE C > 10 | NULL
Choose the most correct statement about PRIMARY KEY | All of the others
Foreign key constraints are created by using | REFERENCES
is a data structure that improves the speed of data retrieval operations on a
database table at the cost of slower writing and increased storage space | Index
The most useful index on a relation is an index on its key. This is because | The
search operation
The aim for the Object-relational database is to bridge the gap between conceptual
data modelling techniques such as Entity-relationship | True
The form of UDT definition is: CREATE TYPE T AS (<primitive type | attribute
declarations>) | All of the others
is a set of markup declarations that define a document type for SGML-family markup
languages (SGML, XML, HTML) | Type Definition
document defines the XML document structure with a list of legal elements and
attributes | DTD
specifies which characters are "less than" which other characters | Collation
is the framework under which data may exist and SQL operations on data may be
executed | Environment
is a logically coherent collection of data with some inherent meaning, representing
some aspect of real world and being designed, built and populated with data for a
specific purpose | Database
Which of following is never used as a data model | none
is a relation name, together with the attributes of that relation | scheme
Which statement is used to remove a relation named R | DROP TABLE R;
Let R(ABCD) be a relation with functional dependencies | AC
Which of the following best describes the relation R(e,f,g,h,i,j) | R is in First
Normal Form
Given a R(A,B,C,D) with the following FDs | The FD set of R is not canonical and R
is in BCNF
What is the difference between the 2NF and the 3NF | 2NF deals with partial
What is "de-normalization" | "de-normalization" has no benefit
The key for a weak entity set E is | dai nhat
provides a means to analyze business requirements so as to standardize
organizational vocabulary, enforce business rules, and ensure adequate data quality
| Entity Relationship Diagram
An association class in UML is similar to | attributes on a relationship
Which of the following is NOT a standard aggregation operator | GROUP
Aggregate functions perform a calculation on a set of values and return a single
value | dap an
Choose the row that appears in the computed result | 6
Choose rows that are appear in the computed result | (9,16)
NULL, NULL, 10, 10, 20, 30 | 20
(1,2), (1,2), (2,3), (3,4), (3,4), (4,1), (4,1), (4,1), (4,2) | (3,1,2)
All aggregate functions are deterministic | same value any time they are called by
using a specific set of input values
(UNION, INTERSECT, EXCEPT) | All of the others
How many JOIN conditions are necessary to combine five tables based on common
attributes | 4
Compute the right outer join of R and S, where the condition is: R.B = S.B | (30,y)
va (70,t)
x <= 4 OR NOT(y >= 2 AND z = 10) | x = 5, y = 3, z = 10
What operator tests column for the absence of data | IS NULL operator
SELECT 'Nancy' + NULL + 'Smith' | NULL
Which SQL keyword is used to sort the result-set | ORDER BY
Three properties of a lock in DBMS are | ----- mode fail
A database transaction, by definition, must be ACID (atomic, consistent, isolated
and durable). | : Transactions that have committed will survive permanently
Choose the SQL statement that is equivalent to the following RA expression | SELECT
(A+B) AS C FROM R
What is the difference between the WHERE and HAVING SQL clauses? | The WHERE SQL
You can remove a trigger by dropping it or by dropping the trigger table. | all
ON DELETE CASCADE | from R although that row
To create a DEFAULT constraint on the "City" column of the table PERSON | ALTER
ALTER
Three basic types of database integrity constraints are | ----- primary
asserts that a value appearing in one relation must also appear in the primary-key
component(s) of another relation | Foreign key constraint
What is difference between PRIMARY KEY and UNIQUE KEY ? | A table can have more
than one UNIQUE KEY
is a data structure that makes it efficient to find those tuples that have a fixed
value for an attribute | Index
An index is a data structure used to speed access to tuples of a relation, given
values of one or more attributes | all
allow the database application to find data fast, without reading the whole table |
Indexes
What are the drawbacks of indexes | 1.riquere 2. make update
can reduce disk I/O operations and consume fewer system resources therefore
improving query performance | Indexes
Using Stored procedures reduces network traffic | All of the others
The benefits of stored procedures are | 1.improve 2.can be reused
Select the right statement to declare MovieStar to be a relation whose tuples are |
CREATE TABLE MovieStar OF StarType ();
table is a table that is embedded within another table | Nested
data model is a collection of nodes, each node is either a leaf or interior | semi-
structured
Select the well-formed XML | yeah-movie-moviedata
DBMS is a collection of .............. that enables user to create and maintain a
database. | Program
In a relational schema, each tuple is divided into fields called | Domains
In an ER model, ................ is described in the database by storing its data.
| Entity
DFD stands for | Data Flow Diagram
A top-to-bottom relationship among the items in a database is established by a |
Hierarchical schema
.................. table store information about database or about the system. |
System
..............defines the structure of a relation which consists of a fixed set of
attribute-domain pairs. | Schema
.................. clause is an additional filter that is applied to the result. |
Having
A logical schema | is a standard .. accessible parts.
..................... is a full form of SQL. | Structured query language
A relational database developer refers to a record as | a tuple
.......... keyword is used to find the number of values in a column. | COUNT
An advantage of the database management approach is | data is integrated and can be
accessed by multiple programs
The collection of information stored in a database at a particular moment is called
as ... | instance of the database
Data independence means | (2ans) programs are not dependent on the physical
(logical) attributes of data
A ......... is used to define overall design of the database | schema
Key to represent relationship between tables is called | foreign key
Grant and revoke are ....... statements. | DCL
DBMS helps achieve | Data independence, Centralized control of data
.......... command can be used to modify a column in a table | alter
The candidate key is that you choose to identify each row uniquely is
called ................. | Primary Key
................. is used to determine whether of a table contains duplicate rows.
| Unique predicate
To eliminate duplicate rows .................. is used | DISTINCT
State true or false | i-true, ii-true
DCL stands for | Data Control Language
........................ is the process of organizing data into related tables. |
Normalization
A ................... Does not have a distinguishing attribute if its own and
mostly are dependent entities, which are part of some another entity. | Weak entity
................. is the complex search criteria in the where clause. | Predicate
..................... is preferred method for enforcing data integrity |
Constraints
The number of tuples in a relation is called its ............. While the number of
attributes in a relation is called it's .................... | Cardinality, Degree
The language that requires a user to specify the data to be retrieved without
specifying exactly how to get it is | Non-Procedural DML
Which two files are used during operation of the DBMS? | Data dictionary and
transaction log
The database schema is written in | DDL
The way a particular application views the data from the database that the
application uses is a | sub schema
The relational model feature is that there | is much more data independence than
some other database models
Which one of the following statements is false? | Data elements in the database can
be modified by changing the data dictionary.
Which of the following are the properties of entities? | Attributes
Which database level is closest to the users? | External
Which are the two ways in which entities can participate in a relationship? | Total
and partial
........ data type can store unstructured data | RAW
1. State true or false. i) Select operator is not a unary operator. ii) Project
operator chooses subset of attributes or columns of a relation. | i-False, ii-True
2. ............... database is used as template for all databases created. | Model
3. One aspect that has to be dealt with by the integrity subsystem is to ensure
that only valid values can be assigned to each data items. This is referred to as |
Domain Integrity
4. ....................... operator is basically a join followed by a project on
the attributes of first relation. | Semi-Join
5. Which of the following is not a binary operator in relational algebra? | Project
6. Centralizing the integrity checking directly under the DBMS ..............
Duplication and ensures the consistency and validity of the database. | Reduces
7. Which of the following is/are the DDL statements? | All of the above
8. In snapshot, ...................... clause tells oracle how long to wait between
refreshes. | Refresh
9. .................. defines rules regarding the values allowed in columns and is
the standard mechanism for enforcing database integrity. | Constraint
10. i) % matches zero of more characters. ii) _ matches exactly one character. |
Both
1. In SQL, which command is used to issue multiple CREATE TABLE, CREATE VIEW and
GRANT statements in a single transaction? | CREATE SCHEMA
2. In SQL, the CREATE TABLESPACE is used | to create a place in the database for
storage of scheme objects, rollback segments, and naming the data files to comprise
the table-space.
3. Which character function can be used to return a specified portion of a
character string? | SUBSTR
4. Which of the following is TRUE for the System Variable $date$? | Can be assigned
to any field only during design time.
5. What are the different events in Triggers? | Insert, Update, Delete
6. Which is the subset of SQL commands used to manipulate Oracle Database
Structures, including tables? | Data Definition Language
7. The SQL statement SELECT SUBSTR('123456789', INSTR('abcabcabc','b'), 4) FROM
EMP; prints | 2345
8. Which of the following SQL command can be used to modify existing data in a
database table? | UPDATE
9. When SQL statements are embedded inside 3GL, we call such a program
as .......... | embedded SQL
10. ................ provides option for entering SQL queries as execution time,
rather than at the development stage. | Dynamic SQL
11) The RDBMS terminology for a row is | tuple
12) To change column value in a table the ......... command can be used. | update
13) The full form of DDL is | Data Definition Language
14) To pass on granted privileges to other user the ...... clause is used | grant
option
15) A set of possible data values is called | domain
16) ......... is critical in formulating database design | functional dependency
17) A primary key if combined with a foreign key creates | Parent-Child
relationship between the tables that connect them
18) A ............. represents the number of entities to which another entity can
be associated | mapping cardinality
19) Which two files are used during operation of the DBMS | Data dictionary and
transaction log
20) A ........... is a set of column that identifies every row in a table | super
key
1. The relational model is based on the concept that data is organized and stored
in two-dimensional tables called ............................ | Relations
2. .................... contains information that defines valid values that are
stored in a column or data type. | Index
3. Which of the syntax is correct for insert statement? | Both of them
4. ................... First proposed the process of normalization. | Edgar F. Codd
5. For using a specific database ............... command is used. | use database
6. Which of the following is not comparison operator? | =<
7. An outstanding functionality of SQL is its support for automatic ............ to
the target data. | navigation
8. ..................... is a special type of integrity constraint that relates two
relations & maintains consistency across the relations. |
Referential.....Constraints
9. .................specifies a search condition for a group or an aggregate. |
HAVING Clause
10. Drop Table cannot be used to drop a table referenced by a ...............
constraint. | Foreign Key
1. ............... joins are SQL server default | Inner
2. The ..................... is essentially used to search for patterns in target
string. | Like Predicate
3. Which of the following is/are the Database server functions? 1.Data
2.Transaction 3.Compile queries 4.Query optimization | i, ii, and iv only
4. To delete a database ................... command is used |
drop ....database_name
5. .............. is a combination of two of more attributes used as a primary key
| Composite Key
6. Which of the following is not the function of client? | Query optimization
7. ............. is a special type of stored procedure that is automatically
invoked whenever the data in the table is modified. | Trigger
8. ................. requires that data should be made available to only authorized
users. | Security
9. Some of the utilities of DBMS are ............. |
Loading,Backup,FileOrganization
10. ................. allows individual row operation to be performed on a given
result set or on the generated by a selected by a selected statement. | Curser
1. Processed data is called .................... | Information
2. ................. is a utility to capture a continuous record of server activity
and provide auditing capability. | SQL server service manager
3. Data items grouped together for storage purposes are called a | record
4. ............. contains data assisting day to day activities of the organization.
| Operational database
5. ..................... approach reduces time and effort required for design and
lesser risk in database management. | Multiple databases
6. HSAM stands for .......... | Hierarchic Sequential Access Method
7. SQL server stores index information in the ............ system table | sys
indexes
8. The one guideline to be followed while designing the database is | It should
avoid/reduce the redundancy.
9. Which of the following is not a logical database structure? | Chain
10. ................ is a preferred method for enforcing data integrity |
Constraints
1. Reflexivity property says that X - Y is true if Y is ...................... |
Subset of X
2. Anything that affects the database schema is a part of | DDL
3. An instance of a relation is a time varying set of ...................... | Both
of them
4. In the ..................... mode any record in the file can be accessed at
random | Random access
5. Which can be used to delete all the rows if a table? | Delete * from table_name
6. Which if the following is not the type of data integrity. | Key integrity
7. 4NF stands for .. | Fourth Normal Form
8. A .................. allows to make copies of the database periodically to help
in the cases of crashes & disasters. | Backup Utility
9. ................... Allows definitions and query language statements to be
entered; query results are formatted and displayed. | Terminal Interface
10. The main task carried out in the ............... is to remove repeating
attributes to separate tables | Fourth Normal Form
1. ............................ is the powerful language for working with RDBMS. |
Query Language
2. The file in DBMS is called as .................. in RDBMS. | table
3. In ..................... , we have a strict parent-child relationship only. |
hierarchical databases.
4. Which normal form is considered adequate for relational database design? | 3 NF
5. What operator tests column for the absence of data? | IS NULL operator
6. Which is proper subset designed to support views belonging to different classes
of users in order to hide or protect information. | Sub-schema
7. Which contain information about a file needed by system programs for accessing
file records? | File headers
8. A .................... DBMS distributes data processing tasks between the
workstation and network server. | Client Server
9. The .................... refers to the way data is organized in and accessible
from DBMS | Data model
10. ................. is a statement that is executed automatically by the system.
| trigger
1) Which of the following is not a characteristic of a relational database model? |
Tree like structure
2) Field is otherwise called as ......... of the record | data item
3) A table can have only one | Primary key
4) A field can be called as ........... in relation context. | attribute
5) In the relational modes, cardinality is termed as | Number of tuples
6) The ........ is used for creating and destroying table, indexes and other forms
of structures. | data definition language
7) The view of total database content is | Conceptual view
8) The ............ refers to the way data is organized in and accessible from
DBMS. | data model
9) Architecture of the database can be viewed as | three levels
10) ........ introduced the relational database rules. | EF Codd
11) In a relational model, relations are termed as | Tables
12) When the values in one or more attributes being used as a foreign key must
exist in another set of one or more attributes in another table, we have created
a(n) ........ | referential integrity constraint
13) In the architecture of a database system external level is the | view level
14) A functional dependency is a relationship between or among ....... | attributes
15) Related fields in a database are grouped to form a | dada record
16) .......... is, a table have more than one set of attributes that could be
chosen as the key | candidate key
17) The database environment has all of the following components except. | users
18) The operation of eliminating columns in a table done by ........ operation. |
Project
19) The way a particular application views the data from the database that the
application uses is a | sub schema
20) ....... is a condition specified on a database schema and restricts the data
that can be stored in an instance of the database. | Check Constraint
1. Which one of the following is used to define the structure of the
relation ,deleting relations and relating schemas ? | b) DDL(Data Definition
Langauge)
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)
3. Create table employee (name varchar ,id integer)What type of statement is this ?
| b) DDL
4. Select * from employeeWhat type of statement is this? | a) DML
5. The basic data type char(n) is a _____ length character string and varchar(n) is
_____ length character. | c) Fixed, variable
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
8. Delete from r; r - relationThis command performs which of the following action ?
| b) Clear relation entries
9. Insert into instructor values (10211, 'Smith', 'Biology', 66000);What type of
statement is this ? | b) DML
10. Updates that violate __________ are disallowed . | a) Integrity constraints
1. Which one of the following is a set of one or more attributes taken collectively
to uniquely identify a record? | c) Super key
2. Consider attributes ID , CITY and NAME . Which one of this can be considered as
a super key ? | b) ID
3. The subset of super key is a candidate key under what condition ? | a) No proper
subset is a super key
4. A _____ is a property of the entire relation, rather than of the individual
tuples in which each tuple is unique. | b) Key
5. Which one of the following attribute can be taken as a primary key ? | c) Id
7. A attribute in a relation is a foreign key if the _______ key from one relation
is used as an attribute in that relation . | b) Primary
8. 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 |
b) Referencing relation
9. The ______ is the one in which the primary key of one relation is used as a
normal attribute in another relation . | c) Referenced relation
10. 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
1. Using which language can a user request information from a database ? | a) Query
3. Which one of the following is a procedural language ? | c) Relational algebra
4. The_____ operation allows the combining of two relations by merging pairs of
tuples, one from each relation, into a single tuple. | b) Join
5. The result which operation contains all pairs of tuples from the two relations,
regardless of whether their attribute values match. | b) Cartesian product
6. The _______operation performs a set union of two "similarly structured" tables |
a) Union
7. The most commonly used operation in relational algebra for projecting a set of
tuple from a relation is | c) Select
8. The _______ operator takes the results of two queries and returns only rows that
appear in both result sets. | b) Intersect
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
10. The _________ provides a set of operations that take one or more relations as
input and return a relation as an output. | b) Relational algebra
1.NameAnnieBobCallieDerekWhich of these query will display the the table given
above ? | c) Select name from employee
2. Select ________ dept_namefrom instructor;Here which of the following displays
the unique values of the column ? | c) Distinct
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
4. Select ID, name, dept name, salary * 1.1where instructor;The query given below
will not give an error. Which one of the following has to be replaced to get the
desired output? | c) Where
5. The ________ clause is used to list the attributes desired in the result of a
query. | b) Select
6. Select name, course_idfrom instructor, teacheswhere instructor_ID=
teaches_ID;This Query can be replaced by which one of the following ? | b) Select
name, course_id from instructor natural join teaches;
10. Insert into employee _____ (1002,Joey,2000);In the given query which of the
keyword has to be inserted ? | b) Values
1. Select name ____ instructor name, course idfrom instructor, teacheswhere
instructor.ID= teaches.ID;Which keyword must be used here to rename the field
name ? | c) As
2. Select * from employee where dept_name="Comp Sci";In the SQL given above there
is an error . Identify the error . | c) "Comp Sci"
3. Select emp_namefrom departmentwhere 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) %
4. '_ _ _ ' matches any string of ______ three characters. '_ _ _ %' matches any
string of at ______ three characters. | b) Exactly, Atleast
6. Select *from instructororder by salary ____, name ___;To display the salary from
greater to smaller and name in ascending order which of the following options
should be used ? | c) Desc, Asc
7. Select namefrom instructorwhere salary <= 100000 and salary >= 90000;This query
can be replaced by which of the following ? where salary between 100000 and
90000;Answer:a8. Select instructor.*from instructor, teacheswhere instructor.ID=
teaches.ID;This query does which of the following operation? | b) All attributes of
instructor are selected on the given condition
9. In SQL the spaces at the end of the string are removed by _______ function . |
c) Trim
10. _____ operator is used for appending two strings. | c) | |
1. The union operation is represented by | b) U
2. The intersection operator is used to get the _____ tuples. | b) Common
4. If we want to retain all duplicates, we must write ________ in place of union. |
a) Union all
6. For like predicate which of the following is true.i) % matches zero of more
characters.ii) _ matches exactly one character. | a) i-only
7. The number of attributes in relation is called as its | b) Degree
8. _____ clause is an additional filter that is applied to the result. | c) Having
9. _________ joins are SQL server default | b) Inner
10. The _____________ is essentially used to search for patterns in target string.
| a) Like Predicate
1. A _____ indicates an absent value that may exist but be unknown or that may not
exist at all. | c) Null value
2. If the attribute phone number is included in the relation all the values need
not be entered into the phone number column . This type of entry is given as | c)
Null
4. Select namefrom instructorwhere salary is not null;Selects | b) Tuples with no
null values
5. In a employee table to include the attributes whose value always have some value
which of the following constraint must be used ? | b) Not null
7. Create table employee (id integer,name varchar(20),salary not null);Insert into
employee values (1005,Rach,0);Insert into employee values (1007,Ross, );Insert into
employee values (1002,Joey,335);Some of these insert statements will produce an
error. Identify the statement. | c) Insert into employee values (1007,Ross, );
8. The primary key must be | c) Both a and b
9. You attempt to query the database with this command: (25)select nvl (100 /
quantity, none)from inventory;Why does this statement cause an error when QUANTITY
values are null? | a. The expression attempts to divide by a null value.
1. Aggregate functions are functions that take a ___________ as input and return a
single value. | a) Collection of values
2. Select __________from instructorwhere dept name= 'Comp. Sci.';Which of the
following should be used to find the mean of the salary ? | b) Avg(salary)
3. Select count (____ ID)from teacheswhere semester = 'Spring' and year = 2010;If
we do want to eliminate duplicates, we use the keyword ______in the aggregate
expression. | a) Distinct
4. All aggregate functions except _____ ignore null values in their input
collection. | b) Count(*)
6. The ____ connective tests for set membership, where the set is a collection of
values produced by a select clause. The ____ connective tests for the absence of
set membership. | c) In, not in
9. Which of the following is used to find all courses taught in both the Fall 2009
semester and in the Spring 2010 semester . where semester = 'Spring' and year=
2010)Answer:a10. We can test for the nonexistence of tuples in a subquery by using
the _____ construct. | b) Not exists
1. Select dept_name, ID, avg (salary)from instructorgroup by dept_name;This
statement is erroneous because | b) Dept_id should not be used in group by clause
2. SQL applies predicates in the _______ clause after groups have been formed, so
aggregate functions may be used. | b) With
3. Aggregate functions can be used in the select list or the_______clause of a
select statement or subquery. They cannot be used in a ______ clause. | b) Having,
where
4. The ________ keyword is used to access attributes of preceding tables or
subqueries in the from clause. | b) Lateral
from instructor I1, lateral (select avg(salary) as avg salaryfrom instructor
I2where I2.dept name= I1.dept name);Without the lateral clause, the subquery cannot
access the correlation variableI1 from the outer query.5. Which of the following
creates temporary relation for the query on which it is defined ? | a) With
7. Subqueries cannot: | c) Join tables
8. Which of the following is not a aggregate function ? | c) With
9. The EXISTS keyword will be true if: | a) Any row in the subquery meets the
condition only.
10. How can you find rows that do not match some specified condition? | b) Double
use of NOT EXISTS
1. A Delete command operates on ______ relation. | a) One
2. Delete from r where P;The above command | a) Deletes a particular tuple from the
relation
4. Which of the following is used to insert a tuple from another relation . | b)
Insert into instructorselect ID, name, dept name, 18000from studentwhere dept name
= 'Music' and tot cred > 144;
5. Which of the following deletes all tuples in the instructor relation for those
instructors associated with a department located in the Watson building which is in
department relation. | c) Delete from instructorwhere dept_name in (select dept
namefrom departmentwhere building = 'Watson');
6. Update instructor_____ salary= salary * 1.05;Fill in with correct keyword to
update the instructor relation. | b) Set
8. The problem of ordering the update in multiple update is avoided using | c) Case
1. The____condition allows a general predicate over the relations being joined. |
a) On
2. Which of the join operations do not preserve non matched tuples. | c) Inner join
3. Select *from student join takes using (ID);The above query is equivalent to | a)
Select *from student inner join takes using (ID);
4. What type of join is needed when you wish to include rows that do not have
matching values? | c) Outer join
8. Which join refers to join records from the right table that have no matching key
in the left table are include in the result set: | b) Right outer join
9. The operation which is not considered a basic operation of relational algebra is
| a) Join
10. In SQL the statement select * from R, S is equivalent to | b) Select * from R
cross join S
1. Which of the following creates a virtual relation for storing the query ? | b)
View
2. Which of the following is the syntax for views where v is view name ? | c)
Create view v as "query expression";
3. Select course_idfrom physics_fall_2009where building= 'Watson';Here the tuples
are selected from the view.Which one denotes the view. | c) Building
4. Materialised views make sure that | b) View definition is kept up-to-date
5. Updating the value of the view | a) Will affect the relation from which it is
defined
7. Which of the following is used at the end of the view to reject the tuples which
do not satisfy the condition in where clause ? | c) With check
9. For the view Create view instructor_info asselect ID, name, buildingfrom
instructor, departmentwhere instructor.dept name= department.dept name;If we insert
tuple into the view as insert into instructor info values ('69987', 'White',
'Taylor');What will be the values of the other attributes in instructor and
department relations? | b) Null
1. A _________ consists of a sequence of query and/or update statements. | a)
Transaction
2. Which of the following makes the transaction permanent in the database ? | b)
Commit
3. In order to undo the work of transaction after last commit which one should be
used ? | c) Rollback
5. In case of any shut down during transaction before commit which of the following
statement is done automatically ? | c) Rollback
6. In order to maintain the consistency during transactions database provides | b)
Atomic
7. Transaction processing is associated with everything below except | a)
Conforming a action or triggering a response
8. A transaction completes its execution is said to be | a) Committed
9. Which of the following is used to get back all the transactions back after
rollback ? | c) Flashback
10. ______ will undo all statements up to commit? | c) Rollback
1. To include integrity constraint in a existing relation use : | c) Alter table
2. Which of the following is not a integrity constraint ? | b) Positive
5. Foreign key is the one in which the ________ of one relation is referenced in
another relation. | b) Primary key
6. Create table course( . . .foreign key (dept name) references
department. . . );Which of the following is used to delete the entries in the
referenced table when the tuple is deleted in course table? | b) Delete cascade
7. Domain constraints, functional dependency and referential integrity are special
forms of _________. | c) Assertion
8. Which of the following is the right syntax for assertion? | a) Create assertion
'assertion-name' check 'predicate';
9. Data integrity constraints are used to: | c) Improve the quality of data entered
for a specific property (i.e., table column)
10. Which of the following can be addressed by enforcing a referential integrity
constraint? | c) Information on the customer must be known before anything can be
sold to that customer
1. Dates must be specified in the format | b) yyyy/mm/dd
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
4. Which of the following is used to store movie and image files ? | b) Blob
6. Values of one type can be converted to another domain using which of the
following ? | a) Cast
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: | c) Check(value >= 29000.00);
8. Which of the following closely resembles Create view ? | b) Create table . . .
as
9. In contemporary databases the top level of the hierarchy consists of ______,
each of which can contain _____. | a) Catalogs, schemas
10. Which of the following statements creates a new table temp instructor that has
the same schema as instructor. | b) Create table temp_instructor like instructor;
2. Which of the following is a basic form of grant statement ? | a) Grant
'privilege list'on 'relation name or view name'to 'user/role list';
3. Which of the following is used to provide privilege to only a particular
attribute ? | b) Grant update(budget) on department to Raj
4. Which of the following statement is used to remove the privilege from the user
Amir ? | b) Revoke update on employee from Amir
5. Which of the following is used to provide delete authorization to instructor ? |
c) Create role instructor;grant delete on takesto instructor;
6. Which of the following is true regarding views ? | c) If a user creates a view
on which no authorization can be granted, the system will allow the view creation
request.
8. In authorization graph if DBA provides authorization to u1 which inturn gives to
u2 which of the following is correct ? | c) Both a and b
9. Which of the following is used to avoid cascading of authorizations from the
user ? | b) Revoke select on department from Amit, Satoshi restrict;
10. The granting and revoking of roles by the user may cause some confusions when
that user role is revoked .To overcome the above situation | a) The privilege must
be granted only by roles
1. Which of the following is used to access the database server at time of
executing the program and get the data from the server accordingly ? | b) Dynamic
SQL
2. Which of the following header must be included in java program to establish
database connectivity using JDBC ? | a) Import java.sql.*;
3. DriverManager.getConnection(_______ , ______ , ______)What are the two
parameters that are included ? | b) URL or machine name where server runs, User ID,
Password
4. Which of the following invokes functions in sql ? | c) Callable statements
5. Which of the following function is used to find the column count of the
particular resultset ? | a) getMetaData()
6. Which of the following is a following statement is a prepared statements ? | a)
Insert into department values(?,?,?)
7. Which of the following is used as the embedded SQL in COBOL ? | b) EXEC SQL END-
EXEC
8. Which of the following is used to distinguish the variables in SQL from the host
language variables ? | b) -
9. The update statement can be executed in host language using | c) EXEC SQL update
instructor set salary = salary + 100 where current of c;
1.Create function dept count(dept_name varchar(20))begindeclare d count
integer;select count(*) into d countfrom instructorwhere instructor.dept_name=
dept_namereturn d count;endFind the error in the the above statement . | a) Return
type missing
6. Repeatsequence of statements;__________________end repeatFill in the correct
option : | c) Until boolean expression
7. Which of the following is the correct format for if statement ? elsestatement or
compound statementelse statement or compound statementend ifAnswer:a8. A stored
procedure in SQL is a___________. | b) Group of Transact-SQL statements compiled
into a single execution plan.
10. Declare out of classroom seats conditiondeclare exit handler for out of
classroom seatsbeginsequence of statementsendThe above statements are used for | b)
Handling Exception
1. A __________ is a special kind of a store procedure that executes in response to
certain action on the table like insertion, deletion or updation of data. | b)
Triggers
2. Trigger are supported in | c) Views
3. The CREATE TRIGGER statement is used to create the trigger. THE _____ clause
specifies the table name on which the trigger is to be attached. The ______
specifies that this is an AFTER INSERT trigger. | b) On, for insert
4. What are the after triggers ? | b) These triggers run after an insert, update or
delete on a table
5. The variables in the triggers are declared using | b) @
7. Which of the following is NOT an Oracle-supported trigger? | b) DURING
8. What are the different in triggers ? | c) Insert, Update, Delete
9. Triggers ________ enabled or disabled | a) Can be
10. Which prefixes are available to Oracle triggers? | c) Both :new and : old
1. Any recursive view must be defined as the union of two subqueries: a _______
query that is nonrecursive and a __________ query. | a) Base, recursive
2. Ranking of queries is done by which of the following ? | b) Order by
3. In rank() function if one value is shared by two tuples then | b) The rank order
continues by leaving one rank in the middle
5. Select ID, GPAfrom student gradesorder by GPA____________;Inorder to give only
10 rank on the whole we should use | a) Limit 10
6. If there are n tuples in the partition and the rank of the tuple is r , then its
________ is defined as (r -1)/(n-1) . | c) Percent_rank
8. Suppose we are given a view tot credits (year, num credits) giving the total
number of credits taken by students in each year.The query that computes averages
over the 3 preceding tuples in the specified sort order is | a) Select year,
avg(num credits)over (order by year rows 3 preceding)as avg total creditsfrom tot
credits;
9. The functions which construct histograms and use buckets for ranking is | c)
Ntil()
10. The command ________________ such tables are available only within the
transaction executing the query, and are dropped when the transaction finishes. |
b) Create temporary table
1. OLAP stands for | a) Online analytical processing
2. Data that can be modeled as dimension attributes and measure attributes are
called _______ data. | a) Multidimensional
3. The generalization of cross-tab which is represented visually is ____________
which is also called as data cube. | a) Two dimensional cube
5. The operation of moving from finer-granularity data to a coarser granularity (by
means of aggregation) is called a ________. | a) Rollup
6. In SQL the cross-tabs are created using | a) Slice
8. What do data warehouses support? | a) OLAP
9. Select item name, color, clothes size, sum(quantity)from salesgroup by
rollup(item name, color, clothes size);How many grouping is possible in this
rollup? | b) 4
1. Relational Algebra is a __________ query language that takes two relation as
input and produces another relation as output of the query. | c) Procedural
3. Which of the following is used to denote the selection operation in relational
algebra ? | b) Sigma (Greek)
4. For select operation the ________ appear in the subscript and the ___________
argument appears in the paranthesis after the sigma. | a) Predicates, relation
5. The ___________ operation, denoted by -, allows us to find tuples that are in
one relation but are not in another. | b) Set-difference
7. Which is a join condition contains an equality operator: | a) Equijoins
8. In precedence of set operators the expression is evaluated from | b) Left to
right
10. The assignment operator is denoted by | b) <-
1. Find the ID, name, dept name, salary for instructors whose salary is greater
than $80,000 . | a) {t | t e instructor ? t[salary] > 80000}
2. A query in the tuple relational calculus is expressed as: | c) {t | P(t)}
3. {t | ? s e instructor (t[name] = s[name]? ? u e department (u[dept name] =
s[dept name]? u[building] = "Watson"))}Which of the following best describes the
query ? | a) Finds the names of all instructors whose department is in the Watson
building.
4. Which of the following symbol is used in the place of except ? | c) �
5. "Find all students who have taken all courses offered in the Biology
department." The expressions that matches this sentence is : | b) ? t e r (Q(t))
6. Which of the following is the comparison operator in tuple relational calculus |
b) =
8. Find the names of all instructors in the Physics department together with the
course id of all courses they teach: | b) {< n, c > | ? i, a (< i, c, a, s, y > e
teaches? ? d, s (< i, n, d, s > e instructor ? d = "Physics"))}
1. An ________ is a set of entities of the same type that share the same
properties, or attributes . | a) Entity set
2. Entity is a | c) Thing in real world
3. The descriptive property possessed by each entity set is _________ . | b)
Attribute
4. The function that an entity plays in a relationship is called that entity's
_____________. | c) Role
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 | b) Composite
attribute
7. Not applicable condition can be represented in relation entry as | c) NULL
8. Which of the following can be a multivalued attribute ? | a) Phone_number
9. Which of the following is a single valued attribute | a) Register_number
10. In a relation between the entities the type and condition of the relation
should be specified . That is called as______attribute | a) Desciptive
1. _____________, express the number of entities to which another entity can be
associated via a relationship set. | a) Mapping Cardinality
2. An entity in A is associated with at most one entity in B, and an entity in B is
associated with at most one entity in A.This is called as | b) One-to-one
4. Data integrity constraints are used to: | c) Improve the quality of data entered
for a specific property
5. Establishing limits on allowable property values, and specifying a set of
acceptable, predefined options that can be assigned to a property are examples of:
| b) Data integrity constraints
6. Which of the following can be addressed by enforcing a referential integrity
constraint? | c) Information on the customer must be known before anything can be
sold to that customer
7. ______ is a special type of integrity constraint that relates two relations &
maintains consistency across the relations. | b) Referential Integrity Constraints
8. Which one of the following uniquely identifies the elements in the relation? |
b) Primary key
10. ____________ is preferred method for enforcing data integrity | a) Constraints
1. Which of the following gives a logical structure of the database graphically ? |
a) Entity-relationship diagram
3. The Rectangles divided into two parts represents | a) Entity set
4. Consider a directed line(->) from the relationship set advisor to both entity
sets instructor and student. This indicates _________ cardinality | b) One to one
6. An entity set that does not have sufficient attributes to form a primary key is
termed a __________ . | c) Weak entity set
7. For a weak entity set to be meaningful, it must be associated with another
entity set, called the | a) Identifying set
8. Weak entity set is represented as | c) Double diamond
9. If you were collecting and storing information about your music collection, an
album would be considered a(n) _____. | b) Entity
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
2. The primary key in the section relation is | c) Both a and b
4. Select Id,Course_id,Building from section s and teaches t where
t.year=2009 ;Which of the following Id are displayed ? | c) Both a and b
5. The query which selects the Course_id 'CS-101' from the section relation is | b)
Select Course_id from section where Year = '2009';
7. The relation with primary key can be created using | c) Create table instructor
( Id , Name , primary key (Id))
8. How can the values in the relation teaches be deleted ? | b) Delete from
teaches;
9. In the above teaches relation " Select * from teaches where Year = '2010'"
displays how many rows ? | a) 2
10. The relation changes can be got back using ________ command | a) Flashback
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
2. The total participation by entities is represented in E-R diagram as | b) Double
line
3. Given the basic ER and relational models, which of the following is INCORRECT? |
c) In a row of a relational table, an attribute can have more than one value
4. Which of the following indicates the maximum number of entities that can be
involved in a relationship? | b) Maximum cardinality
6. What is a relationship called when it is maintained between two entities? | b)
Binary
8. Key to represent relationship between tables is called | c) Foreign Key
9. A window into a portion of a database is | b) View
10. A primary key is combined with a foreign key creates | a) Parent-Child relation
ship between the tables that connect them
1. The entity set person is classified as student and employee .This process is
called | b) Specialization
2. Which relationship is used to represent a specialization entity ? | a) ISA
3. The refinement from an initial entity set into successive levels of entity
subgroupings represents a ________ design process in which distinctions are made
explicit. | c) Top-down
4. 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 | c) Generalization
6. A _____________ constraint requires that an entity belong to no more than one
lower-level entity set. | a) Disjointness
7. Consider the employee work-team example, and assume that certain employees
participate in more than one work team . A given employee may therefore appear in
more than one of the team entity sets that are lower level entity sets of employee.
Thus, the generalization is _____________. | a) Overlapping
8. The completeness constraint may be one of the following: Total generalization or
specialization , Partial generalization or specialization . Which is the default ?
| b) Partial
9. Functional dependencies are a generalization of | a) Key dependencies
10. Which of the following is another name for weak entity? | a) Child
1. Which is the main relation which is used in the university database which is
referenced by all other relation of the university . | c) Department
2. The department relation has the an entry budget whose type has to be replaced by
| c) Numeric (12,2)
3. In the course relation the title field should throw an error in case of any
missing title . The command to be added in title is | b) Not null
4. In the above DDL command the foreign key entries are got by using the keyword |
a) References
5. Identify the error in the section relation | a) No error
6. The following entry is given in to the instructor relation .
(100202,Drake,Biology,30000)Identify the output of the query given | b) Error in ID
of insert
7. Which of the following can be used as a primary key entry of the instructor
relation. | c) ID
8. In the section relation which of the following is used as a foreign key ? | a)
Course_id
| b) Drop section;
1. Which of the following command is used to display the departments of the
instructor relation ? | c) Select dept_name from instructor;
2. How can we select the elements which have common Dept_name in both the
relation ? | a) Select * from instructor i , course c where
i.Dept_name=c.Dept_name;
3. Select distinct Dept_name from instructor ;How many row(s) are displayed ? | a)
4
4. Suppose the Authority want to include a new instructor for the title
Neuroscience what command should be inserted ? | c) Insert into instructor
values(12111,Emma,Biology,200000);Insert into course values(BIO-112,Introduction to
Neuro Science,NeuroScience,2);
5. If a person all the people in Music department gets fired which of the following
has to be performed on the instructor relation ? | b) Delete from instructor where
Dept_name=Music;
8. How will you select the Names whose first letter is E ? where Dept_name like 'A
%;Answer:a9. Which function is used to find the count of distinct departments? | a)
Dist
10. Which function is used to identify the title with Least scope ? | a)
Min(Credits)
1. A domain is ______ if elements of the domain are considered to be indivisible
units. | a) Atomic
6. If every non-key attribute is functionally depedent primary key, then the
relation will be in | b) Second normal form
7. If an attribute of a composite key is dependent on an attribute of the other
composite key, a normalization called _____ is needed. | b) BCNF
9. A data type that creates unique numbers for key columns in Microsoft Access is:
| a) Autonumber
10. A dependency exist between two columns when | a) Together they constitute a
composite key for the table
3. Tables in second normal form (2NF): | a) Eliminate all hidden dependencies
4. Which-one ofthe following statements about normal forms is FALSE? | c) Loss
less, dependency - preserving decomposition into BCNF is always possible
5. Functional Dependencies are the types of constraints that are based on______ |
a) Key
6. Which is a bottom-up approach to database design that design by examining the
relationship between attributes: | c) Normalization
7. Which forms simplifies and ensures that there is minimal data aggregates and
repetitive groups: | c) 3NF
8. Which forms has a relation that possesses data about an individual entity: | c)
4NF
9. Which forms are based on the concept of functional dependency: | c) 3NF
10. Empdt1(empcode, name, street, city, state,pincode).For any pincode, there is
only one city and state. Also, for given street, city and state, there is just one
pincode. In normalization terms, empdt1 is a relation in | b) 2 NF and hence also
in 1 NF
1. We can use the following three rules to find logically implied functional
dependencies. This collection of rules is called | b) Armstrong's axioms
2. Which of the following is not a Armstrong's Axiom ? | c) Pseudotransitivity rule
5. There are two functional dependencies with the same set of attributes on the
left side of the arrow:A->BCA->BThis can be combined as | a) A->BC
6. Consider a relation R(A,B,C,D,E) with the following functional dependencies:ABC
-> DE andD -> ABThe number of superkeys of R is: | c) 10
7. Suppose we wish to find the ID's of the employees that are managed by people who
are managed by the employee with ID 123. Here are two possible queries:I.SELECT
ee.empIDFROM Emps ee, Emps ffWHERE ee.mgrID = ff.empID AND ff.mgrID = 123;II.SELECT
empIDFROM EmpsWHERE mgrID IN(SELECT empID FROM Emps WHERE mgrID = 123);Which, if
any, of the two queries above will correctly (in SQL2) get the desired set of
employee ID's? | a) Both I and II
8. Suppose relation R(A,B) currently has tuples {(1,2), (1,3), (3,4)} and relation
S(B,C) currently has {(2,5), (4,6), (7,8)}. Then the number of tuples in the result
of the SQL query:Select *From R Natural Outer Join S; is: | a) 2
9. Suppose now that R(A,B) and S(A,B) are two relations with r and s tuples,
respectively (again, not necessarily distinct). If m is the number of (not
necessarily distinct) tuples in the result of the SQL query:R intersect S;Then
which of the following is the most restrictive, correct condition on the value of
m?(a) m = min(r,s)(b) 0 <= m <= r + s(c) min(r,s) <= m <= max(r,s)(d) 0 <= m <=
min(r,s)Answer:d10. Suppose relation R(A,B,C,D,E) has the following functional
dependencies:A -> BB -> CBC -> AA -> DE -> AD -> EWhich of the following is not a
key? | c) B,C
1. A relation is in ____________ if an attribute of a composite key is dependent on
an attribute of other composite key. | b) 3NF
2. What are the desirable properties of a decomposition | b) Dependency
preservation
Class (course id, title, dept name, credits, sec id, semester, year, building, room
number, capacity, time slot id)The set of functional dependencies that we require
to hold on class are:course id->title, dept name, creditsbuilding, room number-
>capacitycourse id, sec id, semester, year->building, room number, time slot idA
candidate key for this schema is {course id, sec id, semester, year}4. Consider the
above conditions. Which of the following relation holds ? | a) Course id-> title,
dept name, credits
5. The algorithm that takes a set of dependencies and adds one schema at a time,
instead of decomposing the initial schema repeatedly is | c) 3NF synthesis
algorithm
8. Relation R with an associated set of functional dependencies, F, is decomposed
into BCNF. The redundancy (arising out of functional dependencies) in the resulting
set of relations is | b) More than zero but less than that of an equivalent 3NF
decomposition
9. A table has fields F1, F2, F3, F4, and F5, with the following functional
dependencies:F1->F3F2->F4(F1,F2)->F5in terms of normalization, this table is in |
a) 1NF
1. The normal form which satisfies multivalued dependencies and which is in BCNF is
| a) 4 NF
2. Which of the following is a tuple-generating dependencies ? | c) Multivalued
dependencies
3. The main task carried out in the __________ is to remove repeating attributes to
separate tables. | a) First Normal Form
5. Which forms has a relation that possesses data about an individual entity? | c)
4NF
7. 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
8. In which of the following , a separate schema is created consisting of that
attribute and the primary key of the entity set. | b) A multivalued attribute of an
entity set
9. Fifth Normal form is concerned with | c) Join dependency
10. In 2NF | c) No partial FDs exist.
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
4. In which of the following , a separate schema is created consisting of that
attribute and the primary key of the entity set. | b) A multivalued attribute of an
entity set
4. 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
5. What is the best way to represent the attributes in a large database? | b)
Concatenation
6. Designers use which of the following to tune performance of systems to support
time-critical operations? | a) Denormalization
7. 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
8. 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 | b) BCNF
9. 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. | b) Snapshot
10. 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
1. An approach to website design with the emphasis on converting visitors to
outcomes required by the owner is referred to as: | b) Persuasion.
2. A method of modelling and describing user tasks for an interactive application
is referred to as: | c) Use case.
3. Information architecture influences: | b) Site structure.
4. Also known as schematics, a way of illustrating the layout of an individual
webpage is a: | a) Wireframe.
5. A graphical or text depiction of the relationship between different groups of
content on a website is referred to as a: | c) Sitemap.
6. Blueprints are intended to: | c) Indicate the structure of a site during site
design and as a user feature.
8. Which of the following occupies boot record of hard and floppy disks and
activated during computer startup? | b) Boot sector virus
9. A graphical or text depiction of the relationship between different groups of
content on a website is a: | c) Site map.
10. Which of the following is a description of information organization schemes? |
c) The menu options chosen to group and categorize information.
1. Which of the following is a valid uniform resource locator ? | a)
http://www.acm.org/sigmod
3. HTTP defines two ways in which values entered by a user at the browser can be
sent to the Web server. The _____ method encodes the values as part of the URL. |
b) Get
named q with the get method, and the user typed in the string "silberschatz" and
submitted the form, the browser would request the following URL from the Web
server: http://www.google.com/search?q=silberschatz.4. A __________ is a program
running on the server machine,which accepts requests from a Web browser and sends
back results in the form of HTML documents. | c) Web Server
5. The application program typically communicates with a database server, through
___________, or other protocols, in order to get or store data. | c) All of the
mentioned
6. This extra information is usually maintained in the form of a _________ at the
client. | a) Cookie
7. Which of the following is not true about HTML ? | b) <meta..../>
10. How many levels of headings are in html: | c) 6
1. The Java __________ specification defines an application programming interface
for communication between the Web server and the application program. | a) Servlet
2. The doGet() method in the example extracts values of the parameter's type and
number by using __________ | a) request.getParameter()
4. Which JDBC driver Type(s) can be used in either applet or servlet code? | c)
Both Type 3 and Type 4
5. What MySQL property is used to create a surrogate key in MySQL? | c)
AUTO_INCREMENT
6. A JSP is transformed into a(n): | b) Java servlet
7. Which JDBC driver Type(s) is(are) the JDBC-ODBC bridge? | a) Type 1
8. What programming language(s) or scripting language(s) does Java Server Pages
(JSP) support? | c) Java only
9. What is bytecode? | c) Machine-independent code
10. Where is metadata stored in MySQL? | c) In the MySQL database mysql
1. Which of the following is true for Seeheim model? | a) Presentation is
abstracted from dialogue and Application
2. Which of the unit operation is used in Model view controller? | b) Part Whole
Decomposition
3. Memory address refers to the successive memory words and the machine is called
as _______________ | a) word addressable
4. Which layer deals which deals with user interaction is called _____________
layer | c) User interaction
5. The _____________ layer, which provides a high-level view of data and actions on
data. | a) Business logic
7. The _____________ system is widely used for mapping from Java objects to
relations. | a) Hibernate
8. Which among the following are the functions that any system with a user
interface must provide? | a) Presentation
4. How to force a log switch? | b) By using ALTER SYSTEM SWITCH LOGFILE
5. In the following query, which expression is evaluated first?SELECT id_number,
(quantity - 100 / 0.15 - 35 * 20) FROM inventory | a) 100 / 0.15
6. The ORDER BY clause can only be used in | a) SELECT queries
FROM table_nameORDER BY column_name,column_name ASC | DESC;.7. Which of the
following rule below are categories of index? | a) Column and Functional
8. What is the purpose of SMON background process? | a) Performs crash recovery
when a failed instance starts up again
10. Which of the following queries displays the sum of all employee salaries for
those employees not making commission, for each job, including only those sums
greater than 2500? | b) select job, sum(sal) from emp where comm is null group by
job having sum(sal) > 2500;
1. The indirect change of the values of a variable in one module by another module
is called | c) Side effect
3. Which of the following data structure is linear data structure? | c) Arrays
4. Which of the following criterion is NOT written using the proper syntax? | c) NO
VALUE
6. Finding the location of the element with a given value is: | b) Search
7. Arrays are best data structures | a) For relatively permanent collections of
data
8. Linked lists are best suited | b) For the size of the structure and the data in
the structure are constantly changing
9. Each array declaration need not give, implicitly or explicitly, the information
about | c) The first data from the set to be stored
10. The elements of an array are stored successively in memory cells because | a)
By this way computer can keep track only the address of the first element and the
addresses of other elements can be calculated
1. In _________________ attacks, the attacker manages to get an application to
execute an SQL query created by the attacker. | a) SQL injection
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. | c) Cross-site scripting
3. _________ is an attack which forces an end user to execute unwanted actions on a
web application in which he/she is currently authenticated. | b) Cross-site request
forgery
4. Many applications use _________________, where two independent factors are used
to identify a user. | a) Two-factor authentication
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. | b) Sign-on system
7. The ___________________ is a standard for exchanging authentication and
authorization information between different security domains, to provide cross-
organization single sign-on. | c) Security Assertion Markup Language (SAML)
8. The __________ standard is an alternative for single sign-on across
organizations, and has seen increasing acceptance in recent years. | a) OpenID
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
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
2. In a database where the encryption is applied the data is cannot be handled by
the unauthorised user without | b) Decryption key
4. In which of the following encryption key is used to encrypt and decrypt the data
? | c) Symmetric key
5. Encryption of small values, such as identifiers or names, is made complicated by
the possibility of __________ | a) Dictionary attacks
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 ? | c) Advanced Encryption Standard
7. Which of the following requires no password travel across the internet ? | c)
Challenge-response system
8. Assymmetric Encryption: Why can a message encrypted with the Public Key only be
decrypted with the receiver's appropriate Private Key? | b) A so called "one way
function with back door" is applyed for the encryption
9. Which is the largest disadvantage of the symmetric Encryption? | b) Problem of
the secure transmission of the Secret Key
10. Which is the principle of the encryption using a key? | b) The key contains the
secret function for encryption including parameters. Only a password can activate
the key
2. The _________ is the fastest and most costly form of storage, which is
relatively small; its use is managed by the computer system hardware. | a) Cache
3. Which of the following stores several gigabytes of data but usually lost when
power failure? | c) Main memory
4. The flash memory storage used are | a) NOR Flash
5. __________ is increasingly being used in server systems to improve performance
by caching frequently used data, since it provides faster access than disk, with
larger storage capacity than main memory. | a) Flash memory
6. Which is the cheapest memory device in terms of costs/bit ? | c) Compact disks
7. The primary medium for the long-term online storage of data is the __________
where the entire database is stored on magnetic disk. | b) Magnetic disks
8. Optical disk _______ systems contain a few drives and numerous disks that can be
loaded into one of the drives automatically (by a robot arm) on demand. | b)
Jukebox
9. There are "record-once" versions of compact disk and digital video disk, which
can be written only once; such disks are also called __________ disks. | a) Write-
once, read-many (WORM)
10. Tape storage is referred to as __________ storage. | c) Sequential-access
2. A __________ is the smallest unit of information that can be read from or
written to the disk. | c) Sector
3. The disk platters mounted on a spindle and the heads mounted on a disk arm are
together known as ___________. | b) Head-disk assemblies
4. The disk controller uses ________ at each sector to ensure that the data is not
corrupted on data retrieval. | a) Checksum
5. _________ is the time from when a read or write request is issued to when data
transfer begins. | a) Access time
6. The time for repositioning the arm is called the ________, and it increases with
the distance that the arm must move. | c) Seek time
7. _________ is around one-half of the maximum seek time. | b) Average seek time
9. In Flash memory, the erase operation can be performed on a number of pages,
called an _______, at once, and takes about 1 to 2 milliseconds. | b) Erase block
10. Hybrid disk drives are hard-disk systems that combine magnetic storage with a
smaller amount of flash memory, which is used as a cache for frequently accessed
data. | b) Disk drivers
1. Which level of RAID refers to disk mirroring with block striping? | a) RAID
level 1
3. With multiple disks, we can improve the transfer rate as well by ___________
data across multiple disks. | a) Striping
7. ______________ partitiones data and parity among all N+1 disks, instead of
storing data in N-disks and parity in one disk. | b) Block interleaved distributed
parity
8. Hardware RAID implementations permit _________; that is, faulty disks can be
removed and replaced by new ones without turning power off. | c) Hot swapping
swapping reduces the mean time to repair, since replacement of a disk does not have
to wait until a time when the system can be shut down.9. ___________ is popular for
applications such as storage of log files in a database system, since it offers the
best write performance. | a) RAID level 1
10. ______________ which increases the number of I/O operations needed to write a
single logical block, pays a significant time penalty in terms of write
performance. | c) removable media
3. A typical tape drive is ________ a typical disk drive. | a) more expensive than
4. During recovery from a failure | a) each pair of physical block is examined
6. Which of the following is the process of selecting the data storage and data
access characteristics of the database? | b) Physical database design
7. The replacement of a bad block generally is not totally automatic because | b)
data in bad block is usually lost
9. The surface area of a tape is ________ the surface area of a disk. | b) much
larger than
10. Which one of the following is not a secondary storage? | c) RAM
2. A unit of storage that can store one or more records in a hash file organization
is denoted as | a) Buckets
3. The file organization which allows us to read records that would satisfy the
join condition by using one block read is | c) Clustering file organization
4. What are the correct features of a distributed database? | c) Users see the data
in one global schema.
5. Each tablespace in an Oracle database consists of one or more files called | c)
datafiles
6. The management information system (MIS) structure with one main computersystem
is called a | c) Centralized MIS structure
7. A top-to-bottom relationship among the items in a database is established by a |
a) Hierarchical schema
8. Choose the RDBMS which supports full fledged client server application
development | b) Oracle 7.1
9. One approach to standardization storing of data? | c) CODASYL specification
10. The highest level in the hierarchy of data organization is called | b) Data
base
2. An audit trail ___________ . | b) Is the recorded history of operations
performed on a file
3. Large collection of files are called ____________ . | c) Database
4. Which of the following hardware component is the most important to theoperation
of database management system? | c) High speed, large capacity disk
5. Which of the following is not true of the traditional approach to information
processing | a) There is common sharing of data among the various applications
7. Which of these data models is an extension of relational data model? | b)
Object-relational data model
8. The information about data in a database is called _______. | a) Metadata
10. The DBMS acts as an interface between what two components of an enterprise-
class database system? | a) Database application and the database
1. A relational database system needs to maintain data about the relations, such as
the schema of the relations. This is called | a) Metadata
3. ___________ is the collection of memory structures and Oracle background
processes that operates against an Oracle database. | b) Instance
4. A ________ is a logical grouping of database objects, usually to facilitate
security, performance, or the availability of database objects such as tables and
indexes. | a) Tablespace
5. A tablespace is further broken down into ________ | b) Segments
6. __________ is a contiguous group of blocks allocated for use as part of a table,
index, and so forth. | c) Extent
8. An Oracle __________ is a set of tables and views that are used as a read-only
reference about the database. | c) Data dictionary
9. A data dictionary is created when a __________ created. | c) Database
10. An Oracle object type has two parts the _________ and__________ | c)
Specification and body
1. The _______ is that part of main memory available for storage of copies of disk
blocks. | a) Buffer
2. A major goal of the database system is to minimize the number of block transfers
between the disk and memory. This is achieved by | a) Buffer
3. The subsystem responsible for the allocation of buffer space is called the
___________. | b) Buffer manager
4. In the buffer where there is no space for another block, the bllock can be
inserted using | c) Buffer replacement strategy
5. A block that is not allowed to be written back to disk is said to be
______________. | a) Pinned
6. There are situations in which it is necessary to write back the block to disk,
even though the buffer space that it occupies is not needed. This write is called
the | b) Forced output block
7. The frequently used buffer replacement strategy is | b) Least recently used
8. In case the buffer manager do not write the blocks properly then the buffer
manager uses | c) Crash recovery system
10. ___________________ frees the space occupied by a block as soon as the final
tuple of that block has been processed. | c) Toss immediate strategy
1. In ordered indices the file containing the records is sequentially ordered, a
___________ is an index whose search key also defines the sequential order of the
file. | a) Clustered index
2. Indices whose search key specifies an order different from the sequential order
of the file are called ___________ indices. | c) All of the mentioned
3. An ____________, consists of a search-key value and pointers to one or more
records with that value as their search-key value. | a) Index entry
4. In a _______ clustering index, the index record contains the search-key value
and a pointer to the first data record with that search-key value and the rest of
the records will be in the sequential pointers. | a) Dense
5. In a __________ index, an index entry appears for only some of the search-key
values. | a) Dense
6. Incase the indices values are larger, index is created for these values of
index. This is called | c) Multilevel index
7. A search key containing more than one attribute is referred to as a _________
search key. | b) Composite
9. Insertion of a large number of entries at a time into an index is referred to as
__________ of the index. | c) Bulk loading
10. While inserting the record into the index, if the search-key value does not
appear in the index, | c) The system inserts an index entry with the search-key
value in the index at the appropriate position.
1. If h is any hashing function and is used to hash n keys in to a table of size m,
where n<=m, theexpected number of collisions involving a particular key x is : | a)
Less than 1
3. The searching technique that takes O (1) time to find a data is | c) Hashing
4. The goal of hashing is to produce a search that takes | a) O(1) time
5. Consider a hash table of size seven, with starting index zero, and a hash
function (3x + 4)mod7. Assuming the hash table is initially empty, which of the
following is the contents of the table when the sequence 1, 3, 8, 10 is inserted
into the table using closed hashing? Note that '_' denotes an empty location in the
table. | b 1, 8, 10, _, _, _, 3
6. A hash table can store a maximum of 10 records, currently there are records in
location 1, 3,4,7,8,9,10. The probability of a new record going into location 2,
with hash functions resolving collisions by linear probing is | b) 0.6
7. Key value pairs is usually seen in | a) Hash tables
8. What is the best definition of a collision in a hash table? | a) Two entries are
identical except for their keys.
9. Which of the following scenarios leads to linear running time for a random
search hit in a linear-probing hash table? | c) Graphs
1. A(n) _________ can be used to preserve the integrity of a document or a message.
| c) Encrypted message
2. A hash function must meet ________ criteria. | b) Three
3. What is the main limitation of Hierarchical Databases? | b) Limited flexibility
in accessing data
4. The property (or set of properties) that uniquely defines each row in a table is
called the: | c) Primary key
5. The separation of the data definition from the program is known as: | b) Data
independence
7. The traditional storage of data that is organized by customer, stored in
separate folders in filing cabinets is an example of what type of 'database'
system? | a) Hierarchical
8. The database design that consists of multiple tables that are linked together
through matching data stored in each table is called a) Hierarchical databaseb)
Network databasec) Object oriented databased) Relational databaseAnswer: d9. The
association role defines: | a) How tables are related in the database
10. The purpose of an N-Ary association is: | c) To deal with relationships that
involve more than two tables
1. Bitmap indices are a specialized type of index designed for easy querying on
___________. | c) Multiple keys
2. A _______ on the attribute A of relation r consists of one bitmap for each value
that A can take. | a) Bitmap index
4. To identify the deleted records we use the ______________. | a) Existence bitmap
5. Bitmaps can be used as a compressed storage mechanism at the leaf nodes of
________ for those values that occur very frequently. | b) B+-trees
6. Bitmaps can be combined with regular B+-tree indices for relations where a few
attribute values are extremely common, and other values also occur, but much less
frequently. | b) Bitmap, B+tree
7. In a B+-tree index ______, for each value we would normally maintain a list of
all records with that value for the indexed attribute. | a) Leaf
8. A tablespace is further broken down into ________ | b) Segments
9. In ordered indices the file containing the records is sequentially ordered, a
___________ is an index whose search key also defines the sequential order of the
file. | a) Clustered index
10. Indices whose search key specifies an order different from the sequential order
of the file are called ___________ indices. | c) All of the mentioned
2. How many types of indexes are there in sql server? | b) 2
3. How non clustered index point to the data? | c) It is used for pointing data
rows containing key values
4. Which one is true about clustered index? | b) Clustered index is built by
default on unique key columns
5. What is true about indexes? | b) It makes harder for sql server engines to work
to work on index which have large keys
6. Does index take space in the disk ? | b) Yes, Indexes are stored on disk
7. What are composite indexes ? | b) A composite index is a combination of index on
2 or more columns
8. If an index is _________________ the metadata and statistics continue to exists
| a) Disabling
9. In _______________ index instead of storing all the columns for a record
together, each column is stored separately with all other rows in an index. | b)
Column store
10. A _________________ index is the one which satisfies all the columns requested
in the query without performing further lookup into the clustered index. | c)
Covering
1. A collection of data designed to be used by different people is called a/an | b)
Database
4. Which of the following is an attribute that can uniquely identify a row in a
table? | b) Candidate key
5. Which of the following is the process of selecting the data storage and data
access characteristics of the database? | b) Physical database design
7. The relationship between DEPARTMENT and EMPLOYEE is a | b) One-to-many
relationship
8. A table can be logically connected to another table by defining a | c) Primary
key
10. Ensuring isolation property is the responsibility of the | b) Concurrency-
control component of the DBMS
1. In query processing, the ___________ is the lowest-level operator to access
data. | c) File scan
2. In a _______________, the system scans each file block and tests all records to
see whether they satisfy the selection condition. | b) Linear search
4. Search algorithms that use an index are referred to as | a) Index Search
5. Which algorithm uses equality comparison on a key attribute with a primary index
to retrieve a single record that satisfies the corresponding equality condition. |
a) A2
6. The strategy can retrieve a single record if the equality condition is on a
key;multiple records may be retrieved if the indexing field is not a key is | b) A4
8. The ___ algorithm scans each index for pointers to tuples that satisfy an
individual condition. | c) A9
9. If access paths are available on all the conditions of a disjunctive selection,
each index is scanned for pointers to tuples that satisfy the individual condition.
This is satisfied by | a) A10
10. Conjunctive selection using one index . This is | b) A7
1. Two main measures for the efficiency of an algorithm are | c) Time and space
2. The time factor when determining the efficiency of algorithm is measured by | b)
Counting the number of key operations
3. The space factor when determining the efficiency of algorithm is measured by |
a) Counting the maximum memory needed by the algorithm
6. The Average case occur in linear search algorithm | a) When Item is somewhere in
the middle of the array
7. The complexity of the average case of an algorithm is | a) Much more complicated
to analyze than that of worst case
8. The complexity of linear search algorithm is | a) O(n)
9. The complexity of Binary search algorithm is | b) O(log )
10. The complexity of Bubble sort algorithm is | c) O(n2)
1. A_____ is a query that retrieves rows from more than one table or view: | c)
Join
2. A condition is referred to as _____: | b) Join condition
3. Which oracle is the join condition is specified using the WHERE clause: | c)
Pre-oracle 9i
6. Which product is returned in a join query have no join condition: | b) Cartesian
8. Which join refers to join records from the write table that have no matching key
in the left table are include in the result set: | b) Right outer join
10. Which view that contains more than one table in the top-level FROM clause of
the SELECT statement: | c) Updatable join view
1. Pictorial representation of an expression is called | b) Operator tree
2. The results of each intermediate operation are created and then are used for
evaluation of the next-level operations. This is called | a) Materialized
evaluation
3. ______________ allows the algorithm to execute more quickly by performing CPU
activity in parallel with I/O activity. | a) Buffering
4. Pipelines can be executed in | c) 2
5. In a __________, the system makes repeated requests for tuples from the
operation at the top of the pipeline. | a) Demand-driven pipeline
6. In a __________________, operations do not wait for requests to produce tuples,
but instead generate the tuples eagerly. | b) Producer-driven pipeline
7. Each operation in a demand-driven pipeline can be implemented as an ____ that
provides the following functions: open(), next(), and close(). | c) Iterator
8. The iterator maintains the __________ of its execution in between calls, so that
successive next() requests receive successive result tuples. | a) State
9. Tuples are generated ___________ in producer-driven pipelining, they are
generated ________, on demand, in demand-driven pipelining. | b) Eagerly, Lazily
1. Consider the following relational schemes for a library database:Book (Title,
Author, Catalog_no, Publisher, Year, Price)Collection (Title, Author,
Catalog_no)With the following functional dependencies:I. Title Author ->
Catalog_noII. Catalog_no -> Title Author Publisher YearIII. Publisher Title Year ->
PriceAssume {Author, Title} is the key for both schemes. Which of the following
statements is true? | c) Book is in 2NF and Collection is in 3NF
6. You have a column that will only contain values from 0 to 256. What is the most
economical data type to use for the column? | b) SMALLINT
7. Problems occurs if we don't implement proper locking strategy | b) Phantom reads
8. Which of the following fixed database roles can add or remove user IDs? | a)
db_accessadmin
9. By default sql server has ___________ isolation level | a) READ COMMITTED
10. Which of the following pair of regular expression are not equivalent? | c)
(ab)* and a*b*
1. Which feature converts row data to column for better analytical view? | c) Pivot
2. Which of the following statements is/are not true for SQL profiler? | c) Check
the performance of a stored procedure
3. Which global variables can be used to determine if a transaction is still open?
| c) @@TRANCOUNT
4. Which statement is used to define a cursor? | c) DECLARE CURSOR
5. What is the default "SORT" order for a SQL? | a) Ascending
7. How inserting data through stored procedure do reduces network traffic and
increase database performance? | a) Stored procedure can accept parameter
10. Cursor that reflects the changes made to the database table even after the
result set is returned | b) Dynamic
3. Relation R with an associated set of functional dependencies, F, is decomposed
into BCNF. The redundancy (arising out of functional dependencies) in the resulting
set of relations is | b) More than zero but less than that of an equivalent 3NF
decomposition
4. Which one of the following statements about normal forms is FALSE? | c)
Lossless, dependency-preserving decomposition into BCNF is always possible
5. A table has fields F1, F2, F3, F4, and F5, with the following functional
dependencies:F1->F3F2->F4(F1,F2)->F5in terms of normalization, this table is in |
a) 1NF
6. Which of the following is TRUE? | c) Every relation in BCNF is also in 3NF
8. The relation schema Student_Performance (name, courseNo, rollNo, grade) has the
following FDs:name,courseNo->graderollNo,courseNo->gradename->rollNorollNo->nameThe
highest normal form of this relation scheme is | b) 3NF
9. The relation EMPDT1 is defined with attributes empcode(unique), name, street,
city, state, and pincode. For any pincode,there is only one city and state. Also,
for any given street, city and state, there is just one pincode. In normalization
terms EMPDT1 is a relation in | b) 2NF and hence also in 1NF
10. Which one of the following statements if FALSE? | d) A prime attribute can be
transitively dependent on a key in a BCNF relation.
1. _______________ is a procedural extension of Oracle - SQL that offers language
constructs similar to those in imperative programming languages. | b) PL/SQL
2. ___________ combines the data manipulating power of SQL with the data processing
power of Procedural languages. | a) PL/SQL
3. _______________ has made PL/SQL code run faster without requiring any additional
work on the part of the programmer. | c) Oracle
4. A line of PL/SQL text contains groups of characters known as | a) Lexical Units
6. A ___________________ is an explicit numeric, character, string or Boolean value
not represented by an identifier. | b) Literals
8. _________________ is a sequence of zero or more characters enclosed by single
quotes. | b) String literal
9. In __________________, the management of the password for the account can be
handled outside of oracle such as operating system. | b) Operating System
Authentication
10. In ________________ of Oracle, the database administrator creates a user
account in the database for each user who needs access. | a) Database
Authentication
1. Consider money is transferred from (1)account-A to account-B and (2) account-B
to account-A. Which of the following form a transaction ? | c) Both 1 and 2
individually
2. A transaction is delimited by statements (or function calls) of the form
__________. | a) Begin transaction and end transaction
4. Which of the following has "all-or-none" property ? | a) Atomicity
5. The database system must take special actions to ensure that transactions
operate properly without interference from concurrently executing database
statements. This property is referred to as | c) Isolation
6. The property of transaction that persists all the crashes is | b) Durability
7. __________ states that only valid data will be written to the database. | a)
Consistency
8. Transaction processing is associated with everything below except | c)
Confirming a action or triggering a response
9. The Oracle RDBMS uses the ____ statement to declare a new transaction start and
its properties. | b) SET TRANSACTION
1. In SQL, which command is used to issue multiple CREATE TABLE, CREATE VIEW and
GRANT statements in a single transaction? | b) CREATE SCHEMA
2. In SQL, the CREATE TABLESPACE is used | a) To create a place in the database for
storage of scheme objects, rollback segments, and naming the data files to comprise
the tablespace.
3. Which character function can be used to return a specified portion of a
character string? | c) SUBSTR
4. Which of the following is TRUE for the System Variable $date$? | b) Can be
assigned to any field only during design time.
5. What are the different events in Triggers? | c) Insert, Update, Delete
6. Which is the subset of SQL commands used to manipulate Oracle Database
Structures, including tables? | a) Data Definition Language
7. The SQL statement SELECT SUBSTR('123456789', INSTR('abcabcabc','b'), 4) FROM
EMP; prints | b) 2345
8. Which of the following SQL command can be used to modify existing data in a
database table? | b) UPDATE
1. The storage structure which do not survive system crashes are ______ | a)
Volatile storage
2. Storage devices like tertiary storage , magnetic disk comes under | b) Non-
volatile storage
3. For a transaction to be durable, its changes need to be written to ________
storage. | c) Stable storage
4. The unit of storage that can store one are more records in a hash file
organization are | a) Buckets
6. A file produced by a spreadsheet | a. is generally stored on disk in an ASCII
text format
7. SDL means _____________ | b) Storage Definition Language
8. Which of the following is the process of selecting the data storage and data
access characteristics of the database? | b) Physical database design
10. The process of saving information onto secondary storage devices is referred to
as | c) Writing
1. A transaction may not always complete its execution successfully. Such a
transaction is termed | a) Aborted
3. Each modification done in database transaction are first recorded into the | b)
Log
4. When the transaction finishes the final statement the transaction enters into |
c) Partially committed state
5. The name of the transaction file shall be provided by the operator and the file
that contains the edited transactions ready for execution shall be called | c) Opt.
Exe
6. Which of the following is an atomic sequence of database actions? | a)
Transaction
8. _______ means that data used during the execution of a transaction cannot be
used by a second transaction until the first one is completed. | c) Isolation
9. DBMS periodically suspends all processing and synchronizes its files and
journals through the use of | a) Checkpoint facility
10. Which of the following is not a state in transaction ? | b) Terminated
1. _______________ joins are SQL server default | b) Inner
2. The ________________ is essentially used to search for patterns in target
string. | a) Like Predicate
3. Which of the following is/are the Database server functions?i) Data management
ii) Transaction managementiii) Compile queries iv) Query optimization | a) i, ii,
and iv only
4. To delete a database ___________ command is used | c) drop database
database_name
5. ____________ is a combination of two of more attributes used as a primary key |
a) Composite Key
6. Which of the following is not the function of client? | b) Query optimization
7. ____________ is a special type of stored procedure that is automatically invoked
whenever the data in the table is modified. | b) Trigger
8. ______________ requires that data should be made available to only authorized
users. | c) Security
9. Some of the utilities of DBMS are _____________i) Loading ii) Backup iii) File
organization iv) Process Organization | b) i, ii and iii only
10. ____________ allows individual row operation to be performed on a given result
set or on the generated by a selected by a selected statement. | c) Curser
1. Which s essential a business problem not a data problem: | c) Database design
3. McFadden has defined normalization in his which book___________: | c) Modern
database management
4. The database design prevents some data from being represented due to _______ |
b) Insertion anomalies
5. How many types of insertion anomalies: | b) 2
6. Who developed the normalization process: | a) E.F. codd
7. E.F.Codd developed the normalization process in the which early: | b) 1970
8. Which is a bottom-up approach to database design that design by examining the
relationship between attributes: | c) Normalization
10. Which formal method that locates and analyses relation schemas on the basis of
their primary, candidate keys, and the FD's that are present among the attributes
of these schemas: | c) Normalization
1. Which is refers to a stalemate situation due to which no further progress is
possible as computer await response of each other: | b) Deadlock
2. Which is a duplicate copy of a file program that is stored on a different
storage media than the original location: | c) Backup
4. Optimization that is basically related to the rewriter module is termed
as__________: | a) Semantic query optimization
5. Optimization basically related to the Rewrite module is termed as_______ | a)
Semantic query optimization
6. Database security helps organizations to protect data from_____ | b) External
users
7. Copying files to secondary or specific devices is known as______ | b) Backup
8. How many types of recovery control techniques: | a) 2
9. Which are types of recovery control techniques: | c) All of the Mentioned
10. Which server can joins the indexes when only multiple indexes combined can
cover the query: | a) SQL
1. In concurrency control policy the the lock is obtained on | a) Entire database
2. A concurrency-control policy such as this one leads to ______ performance, since
it forces transactions to wait for preceding transactions to finish before they can
start. | c) Poor
4. EMPDET is an external table containing the columns EMPNO and ENAME. Which
command would work in relation to the EMPDET table? ON empdet(empno);Answer: c5. In
which scenario would you use the ROLLUP operator for expression or columns within a
GROUP BY clause? Answer: c6.Name Null? TypeCust_id Not null Number(2)Cust_Name
Varchar2(15)Evaluate the following SQL statements executed in the given order:ALTER
TABLE custADD CONSTRAINT cust_id_pk PRIMARY KEY(cust_id) DEFERRABLE INITIALLY
DEFERRED; INSERTINTO cust VALUES (1,'RAJ'); --row 1INSERT INTO cust VALUES
(1,'SAM'); --row 2COMMIT;SET CONSTRAINT cust_id_pk IMMEDIATE;INSERT INTO cust
VALUES (1,'LATA'); --row 3INSERT INTO cust VALUES (2,'KING'); --row 4COMMIT;Which
rows would be made permanent in the CUST table? | c) rows 3 and 4
7. Which statement is true regarding external tables? Answer: d8. A non-correlated
subquery can be defined as ____. Answer: d9. Evaluate the following SQL statements
in the given order:DROP TABLE dept;CREATE TABLE dept(deptno NUMBER(3) PRIMARY
KEY,deptname VARCHAR2(10));DROP TABLE dept;FLASHBACK TABLE dept TO BEFORE
DROP;Which statement is true regarding the above FLASHBACK operation? | b) It
recovers only the second DEPT table.
10.CREATE TABLE digits(id NUMBER(2),description VARCHAR2(15));INSERT INTO digits
VALUES (1,'ONE');UPDATE digits SET description ='TWO' WHERE id=1;INSERT INTO digits
VALUES (2,'TWO');COMMIT;DELETE FROM digits;SELECT description FROM digitsVERSIONS
BETWEEN TIMESTAMP MINVALUE AND MAXVALUE;What would be the outcome of the above
query? | c) It would display the value TWO twice.
3. Isolation of the transactions is ensured by | c) Concurrency control
4. Constraint checking can be disabled in existing _______________ and
_____________ constraints so that any data you modify or add to the table is not
checked against the constraint. | a) CHECK, FOREIGN KEY
6. Which of the following fixed database roles can add or remove user IDs? | a)
db_accessadmin
7. By default sql server has ___________ isolation level | a) READ COMMITTED
8. Which of the following statements is/are not true for SQL profiler? | c) Check
the performance of a stored procedure
1. In order to maintain transactional integrity and database consistency, what
technology does a DBMS deploy? | c) Locks
4. Which of the following protocols ensures conflict serializability and safety
from deadlocks? | b) Time-stamp ordering protocol
5. Which of the following is the block that is not permitted to be written back to
the disk? | c) Pinned
7. Which refers to a property of computer to run several operation simultaneously
and possible as computers await response of each other | a) Concurrency
8. All lock information is managed by a ____, which is responsible for assigning
and policing the locks used by the transactions. | c) Lock manager
1. A system is in a ______ state if there exists a set of transactions such that
every transaction in the set is waiting for another transaction in the set. | c)
Deadlock
2. The deadlock state can be changed back to stable state by using _____________
statement. | b) Rollback
4. When transaction Ti requests a data item currently held by Tj , Ti is allowed to
wait only if it has a timestamp smaller than that of Tj (that is, Ti is older than
Tj ). Otherwise, Ti is rolled back (dies). This is | a) Wait-die
5. When transaction Ti requests a data item currently held by Tj , Ti is allowed to
wait only if it has a timestamp larger than that of Tj (that is, Ti is younger than
Tj ). Otherwise, Tj is rolled back (Tj is wounded by Ti ). This is | c) Wound-wait
6. The situation where the lock waits only for a specified amount of time for
another lock to be released is | a) Lock timeout
7. The deadlock in a set of transaction can be determined by | a) Read-only graph
8. A deadlock exists in the system if and only if the wait-for graph contains a
___________. | a) Cycle
10. __________ rollback requires the system to maintain additional information
about the state of all the running transactions. | b) Partial
1. In a granularity hierarchy the highest level represents the | a) Entire database
2. In a database the file is contained in ________ | c) One area
3. If a node is locked in an intention mode, explicit locking is done at a lower
level of the tree. This is called | a) Intention lock modes
4. If a node is locked in ___________ , explicit locking is being done at a lower
level of the tree, but with only shared-mode locks. | a) Intention lock modes
5. If a node is locked in _____________, then explicit locking is being done at a
lower level, with exclusive-mode or shared-mode locks. | c) Intention-exclusive
(IX) mode
6. If a node is locked in ________________, the subtree rooted by that node is
locked explicitly in shared mode, and that explicit locking is being done at a
lower level with exclusive-mode locks. | b) shared and intention-exclusive (SIX)
mode
7. ____________ denotes the largest timestamp of any transaction that executed
write(Q) successfully. | a) W-timestamp(Q)
8. The _____________ ensures that any conflicting read and write operations are
executed in timestamp order. | a) Timestamp-ordering protocol
9. The __________ requires that each transaction Ti executes in two or three
different phases in its lifetime, depending on whether it is a read-only or an
update transaction. | a) Validation protocol
10. This validation scheme is called the _________- scheme since transactions
execute optimistically, assuming they will be able to finish execution and validate
at the end. | a) Validation protocol
1. The most recent version of standard SQL prescribed by the American National
Standards Institute is | a) SQL 2011
2. ANSI-standard SQL allows the use of special operators in conjunction with the
WHERE clause. A special operator used to check whether an attribute value is null
is | b) IS NULL
3. A lock that prevents the use of any tables in the database from one transaction
while another transaction is being processed is called a | a) Database-level lock
4. A condition that occurs when two transactions wait for each other to unlock data
is known as a(n) | a) Shared lock
5. _______ means that data used during the execution of a transaction cannot be
used by a second transaction until the first one is completed. | c) Isolation
6. A unit of storage that can store one or more records in a hash file organization
is denoted as | a) Buckets
7. The file organization which allows us to read records that would satisfy the
join condition by using one block read is | c) Clustering file organization
8. Which of the following is not true about B+ trees? | b) Performance of B+ tree
degrades as the file grows
9. The extent of the database resource that is included with each lock is called
the level of | b) Granularity
10. DBMS periodically suspends all processing and synchronizes its files and
journals through the use of | a) Checkpoint facility
1. Snapshot isolation is a particular type of ______________ scheme. | a)
Concurrency-control
3. Lost update problem is | a) Second update overwrites the first
4. Under first updater wins the system uses a __________ mechanism that applies
only to updates. | c) Locking
5. When a transaction Ti attempts to update a data item, it requests a _________ on
that data item. | c) Write lock
7. An application developer can guard against certain snapshot anomalies by
appending a ______ clause to the SQL select query. | a) For update
8. Evaluate the CREATE TABLE statement:CREATE TABLE products(product_id NUMBER(6)
CONSTRAINT prod_id_pk PRIMARY KEY, product_name VARCHAR2(15));Which statement is
true regarding the PROD_ID_PK constraint? | b) It would be created and would use an
automatically created unique index.
9. Evaluate the following CREATE SEQUENCE statement:CREATE SEQUENCE seq1START WITH
100INCREMENT BY 10MAXVALUE 200CYCLENOCACHE;The sequence SEQ1 has generated numbers
up to the maximum limit of 200. You issue the following SQL statement:SELECT
seq1.nextval FROM dual;What is displayed by the SELECT statement? | a) 1
3. Evaluate the following statements:CREATE TABLE digits(id NUMBER(2),description
VARCHAR2(15));INSERT INTO digits VALUES (1,'ONE);UPDATE digits SET description
='TWO'WHERE id=1;INSERT INTO digits VALUES (2 ,'TWO');COMMIT;DELETE FROM
digits;SELECT description FROM digitsVERSIONS BETWEEN TIMESTAMP MINVALUE AND
MAXVALUE;What would be the outcome of the above query? | c) It would display the
value TWO twice.
5. Which statement is true regarding synonyms? | c) A public synonym and a private
synonym can exist with the same name for the same table.
7. OE and SCOTT are the users in the database. The ORDERS table is owned by OE.
Evaluate the statements issued by the DBA in the following sequence:CREATE ROLE
r1;GRANT SELECT, INSERT ON oe. orders TO r1;GRANT r1 TO scott;GRANT SELECT ON oe.
orders TO scott;REVOKE SELECT ON oe.orders FROM scott;What would be the outcome
after executing the statements? | a) SCOTT would be able to query the OE.ORDERS
table.
10. EMPDET is an external table containing the columns EMPNO and ENAME. Which
command would work in relation to the EMPDET table? Answer: c1. The method of
access that uses key transformation is called as | b) Hash
2. Why do we need concurrency control on B+ trees ? | c) To maintain accuracy of
index
4. In crabbing protocol locking | a) Goes down the tree and back up
5. The deadlock can be handled by | b) Restarting the search after releasing the
lock
6. In crabbing protocol the the lock obtained on the root node is in _________
mode. | a) Shared
7. If needed to split a node or coalesce it with its siblings, or redistribute key
values between siblings, the crabbing protocol locks the parent of the node in
____________ mode. | b) Exclusive
8. In crabbing protocol to inset or delete a key value the leaf node has to be
locked in ___________ mode. | b) Exclusive
9. B-link tree requires a pointer to its __________ sibling. | c) Right
10. Instead of locking index leaf nodes in a two-phase manner, some index
concurrency-control schemes use ___________ on individual key values, allowing
other key values to be inserted or deleted from the same leaf. | c) Key-value
locking
1. The recovery scheme must also provide | a) High availability
2. Which one of the following is a failure to system | c) Transaction failure
3. Which of the following belongs to transaction failure | c) Logical error
4. The system has entered an undesirable state (for example, deadlock), as a result
of which a transaction cannot continue with its normal execution. This is | c)
Logical error
5. The transaction can no longer continue with its normal execution because of some
internal condition, such as bad input, data not found, overflow, or resource limit
exceeded. This is | c) Logical error
7. Which kind of failure loses its data in head crash or failure during transfer
operation. | c) Disk failure
8. The failure occurred sufficiently early during the transfer that the destination
block remains intact. | a) Partial Failure
9. The database is partitioned into fixed-length storage units called | b) Blocks
1. The log is a sequence of ___________, recording all the update activities in the
database. | a) Log records
2. In the ___________ scheme, a transaction that wants to update the database first
creates a complete copy of the database. | a) Shadow copy
3. The ____________ scheme uses a page table containing pointers to all pages; the
page table itself and all updated pages are copied to a new location. | b) Shadow
Paging
4. The current copy of the database is identified by a pointer, called
_____________, which is stored on disk. | a) Db-pointer
5. If a transaction does not modify the database until it has committed, it is said
to use the ___________ technique. | a) Deferred-modification
6. If database modifications occur while the transaction is still active, the
transaction is said to use the ___________technique. | c) Immediate-modification
8. In the __________ phase, the system replays updates of all transactions by
scanning the log forward from the last checkpoint. | b) Redo
9. The actions which are played in the order while recording it is called
______________ history. | a) Repeating
10. A special redo-only log record is written to the log, where V1 is the value
being restored to data item Xj during the rollback. These log records are sometimes
called | c) Compensation log records
1. In order to reduce the overhead in retrieving the records from the storage space
we use | b) Log buffer
2. The order of log records in the stable storage ____________ as the order in
which they were written to the log buffer. | a) Must be exactly the same
3. Before a block of data in main memory can be output to the database, all log
records pertaining to data in that block must have been output to stable storage.
This is | c) Write-ahead logging
5. The _______________ policy, allows a transaction to commit even if it has
modified some blocks that have not yet been written back to disk. | b) No-force
6. ______________ policy allows multiple updates to accumulate on a block before it
is output to stable storage, which can reduce the number of output operations
greatly for frequently updated blocks. | b) No-force
7. the ___________ policy, allows the system to write modified blocks to disk even
if the transactions thatmade those modifications have not all committed. | c) Steal
8. Locks on buffer blocks are unrelated to locks used for concurrency-control of
transactions, and releasing them in a non-two-phase manner does not have any
implications on transaction serializability. This is | a) Latches
9. The __________________ contains a list of blocks that have been updated in the
database buffer. | c) Dirty Block
10. The operating system reserves space on disk for storing virtual-memory pages
that are not currently in main memory; this space is called | b) Swap Space
3. What was the name of the first commercially available microprocessor chip? | c.
Intel 4004
5. The ALU of a computer normally contains a number of high speed storage element
called | b. Registers
6. Which of the following is used only for data entry and storage, and never for
processing? | b. Dumb terminal
7. Non-volatile storage needs to have a _________ where the loses in future can be
recovered. | a) Dump
8. A dump of the database contents is also referred to as an _____________ dump. |
a) Archival
9. ________ dump, writes out SQL DDL statements and SQL insert statements to a
file, which can then be reexecuted to re-create the database. | c) SQL
10. _________ dump schemes have been developed that allow transactions to be active
while the dump is in progress. | b) Fuzzy
1. ARIES uses a ___________ to identify log records, and stores it in database
pages. | b) Log number
2. ARIES supports ___________ operations, which are physical in that the affected
page is physically identified, but can be logical within the page. | a)
Physiological redo
3. ______________ is used to minimize unnecessary redos during recovery. | a) Dirty
page table
4. __________ scheme that records only information about dirty pages and associated
information and does not even require of writing dirty pages to disk. | c) Fuzzy-
checkpoint
5. Whenever an update operation occurs on a page, the operation stores the LSN of
its log record in the _______ field of the page. | c) PageLSN
6. There are special redo-only log records generated during transaction rollback,
called _________ in ARIES. | a) Compensation log records
7. The __________________ contains a list of pages that have been updated in the
database buffer. | a) Dirty page table
8. ___________ determines which transactions to undo,which pages were dirty at the
time of the crash, and the LSN from which the redo pass should start. | a) Analysis
pass
9. __________ starts from a position determined during analysis, and performs a
redo, repeating history, to bring the database to a state it was in before the
crash. | b) Redo pass
10. ______________ rolls back all transactions that were incomplete at the time of
crash. | c) Undo pass
1. Which lock should be obtained to prevent a concurrent transaction from executing
a conflicting read, insert or delete operation on the same key value. | a) Higher-
level lock
2. Once the lower-level lock is released, the operation cannot be undone by using
the old values of updated data items, and must instead be undone by executing a
compensating operation; such an operation is called | a) Logical operation
3. Which of the following is used for undo operations alone ? | a) Logical logging
5. To perform logical redo or undo, the database state on disk must be operation
_____________, that is, it should not have partial effects of any operation. | c)
Consistent
6. An operation is said to be __________ if executing it several times in a row
gives the same result as executing it once. | a) Idempotent
7. Immediate database modification technique uses | a) Both undo and redo
8. Shadow paging has | a) no redo
9. For correct behaviour during recovery, undo and redo operation must be | c)
Idempotent
10. If ___________ are not obtained in undo operation it will cause problem in
undo-phase. | b) Lower-level lock
1. The remote backup site is sometimes also called the | b) Secondary Site
2. Remote backup system must be _________ with the primary site. | a) Synchronised
3. The backup is taken by | c) Sending all log records from primary site to the
remote backup site
4. When the ____________, the backup site takes over processing and becomes the
primary. | c) Primary fails
5. The simplest way of transferring control is for the old primary to receive
__________ from the old backup site. | c) Primary Logs
8. A transaction commits as soon as its commit log record is written to stable
storage at the primary site. This is | a) One Safe
9. A transaction commits as soon as its commit log record is written to stable
storage at the primary and the backup site.This is | c) Two-very Safe
10. If only the primary is active, the transaction is allowed to commit as soon as
its commit log record is written to stable storage at the primary site. This is |
b) Two Safe
A SOL environment is the framework under which data may exist and SQL operations on
data may be executed | All of the others
Referential integrity Constraints control relationships between _. | tables in a
database
Choose the right statement below to declare zero or one occurrence of an Element in
DTD. | <"ELEMENT element-name (child-name?)>
Given the relation Employee(SSN. FNAME. LNAME. SALARY). Select the right query
below to find the employee(s) who has the lowest salary in the company | SELECT
LNAME. FNAME. SALARY FROM Employee WHERE SALARY IN (SELECT MIN(SALARY) FROM
Employee)
Select the well-formed XML | <? xml version = "1.0" ?>_<MovieData>_<Movie
tiHe="StarWar*><Year>1997</Yearx/MovJe>_</MovieData>
Which of the followings is true? | The Entity Relationship (ER) model represents
the structure of data graphically
Which of the followings is part of data model? | All of the others
Structure of the dataException handler in PSM is defined as follows_DECLARE <where
to go next> HANDLER FOR condition list> <statement>_The <where to go next> clause
can be | All of the others
In SQL language, the command/statement that let you add an attribute to a relation
is | Alter
Select the valid query to declare the foreign key presC# of the relation
Studiolname. address. presC#) that references the cert of the relation
MovieExeclname. address. cert#. netWorth): | CREATE TABLE Studio (name CHAR(30)
PRIMARY KEY. address VARCHAR(256). presC# INT REFERENCES Movie Exec (cert#));
The relational operator that yields all possible pairs of rows from two tables is
known as | Product
Selecl Ihe right syntax for HAVING clause in SOL | SELECT <list of attributes>_FROM
<list of tables>_WHERE <conditions on tuples>_GROUP BY <list of attributes>_HAVING
<conditions on groups>
Given relation U(A, B, C) that has 2 tuples (1,2,3) and (4,5,6), and relation
V(B(C, D) that has 2 tuples (2,3,10) and (2,3,11). Choose the right answer below; |
The outer join of U and V is the relation R(A. B. C. D) that has 3 tuples
(1.2.3.10) .(1.2.3.11) and (4.5.6. NULL).
Definition language (DDL) is used to | declare database schemas
The result of (UNKNOWN OR TRUE) is | TRUE
Select the right statement to declare MovieStar to be a relation whose tuples are
of type StarType. Note; StarType is a user-defined type that has its definition as
follows;_CREATE TYPE StarType AS (_nameCHAR(30)._address CHAR(IOO) }; | CREATE
TABLE MovieStar OF StarType Q;
Suppose an updatable view ParamountMovies is associated with Movies relation.
Choose a nght answer | Drop Movies relation also delete the view ParamountMovies
The most useful index on a relation is an index on its key. This is because | The
search operation based on the primary key is commonly used.
Which of the following statements is true? | All of the others
Given the relation Movies(title, year, length, genre. studioName). Select the right
query to create a View with the titles and studio names of all movies that were
produced in 1980 | CREATE VIEW OldMovies AS SELECT title. studioName FROM Movies
WHERE year=1980
Given the relation Employee(SSN. FNAME. LNAME. SALARY. DepartmentNo). Select the
right query below to count the number of employees in each department | SELECT
DepartmentNo. COUNT(*) FROM Employee GROUP BY DepartmentNo
Choose a wrong answer | Relational algebra can express recursion.
In DTD. the main difference between PCDATA and CDATA is | PCDATA is text that will
be parsed by a parser and tags inside the text will be treated as markup and
entities will be expanded CDATA is text that will NOT be parsed by a parser and
tags inside
The key for a weak entity set E is_ | Zero or more attributes of E and key
attributes from supporting entity sets
Choose the right statement | When the trigger is awakened, it tests a condition. If
the condition is satisfied, the action associated with the trigger is executed.
Choose the right statement to grant the INSERT and SELECT privileges on table
Movies to users torn' and jerry' | GRANT SELECT. INSERT on Movies TO torn, jerry
WITH GRANT OPTION
Given relations Movies(title, year, length, genre. studioName. producer#).
MovieExec(name. address. cert#). and Studio(name. address. presC#). Suppose we have
the materialized view that finds the name - ofthe producer of a given movie as
follows | CREATE MATERIALIZED VIEW MovieProd ASSELECT title, year, nameFROM Movies.
MovieExecWHERE producer# � cert#
Which of the following modification will affect the MovieProd materialized view? |
Insert a new tuple into Movies or delete a tuple from Movies
The ER model means that | be close to a users perception of the data
To apply a selection to a bag: | We applv the selection condition to each tuple
independently
Choose a wrong answer. | Relational algebra can express recursion.
(FALSE AND NULL) return: | FALSE
So. in the above case, the wildcard % represents what? | % (percent sign)
represents zero. one. or more characters
(FALSE OR NULL) return: | NULL
Apply provides a means to analyze business requirements so as to standardize
organizational vocabulary, enforce business rules, and ensure adequate data quality
| Entity Relationship Diagram
Except for__aggregate functions ignore null values | COUNT
When an entity is called 'weak'? | When all of its attributes can not identify
itself
What is the difference between a "where" clause and a "having" clause? | WHERE
applies to rows. HAVING applies to summarized (or aggregate) rows
"When drawing ERD. if an entity has no non-key attribute and it is the one' in
many-one relationship, then we should set it to the attribute of other entities'
That above statement describes which principle? | Picking the right kind of element
principle
How many properties we must use to measure the quality of a transaction? | 4
Consider the following statement A "Entity Sets and their attributes should reflect
the reality" That above statement describes which principle? | Faithfulness
principle
Which tuple is contained in the result of the following query: SELECT a.
COUNT(DISTINCT B) FROM R GROUP BYa HAVING SUM(B) >3; | (2.3)
The relation R(A.B) may have duplicate tuples. Choose the query that create non-
duplicated results, regardless of what tuples R contains? | SELECT A. B FROM R
GROUP BY A. B
Consider the distributive law. that holds for set relations: (R U S) - T = (R-T) U
(S-T) | False
Choose the correct statement 0 A A. Except for MAX. aggregate functions ignore null
values | Except for COUNT, aggregate functions ignore null values
(See picture) | (2.3) appears twice in the result
A database transaction, by definition, must be ACID (atomic, consistent isolated
and durable). What does �Durable* mean? | �Durable* means that: Transactions that
have committed will survive permanently
When drawing an ERD: | Entity sets and their attributes should reflect reality ,
Avoid introducing more elements into the design than is absolutely necessary,
Choosing the right relationships
With SQL. how do you select all the records from a table named "Persons" where the
value of the column "FirstName" starts with an "a"? | SELECT * FROM Persons WHERE
FirstName LIKE 'a%'
Compute the result of the query: | SELECT A. B.C.D FROM R RIGHT OUTER JOIN S ON R.A
= S.C
Identify, in the list below. 2 rows that appears in the result | (null. null. 5. 8)
, (null. null. 0.1)
What SQL keyword can be used to return data from two non-related tables as a
combined set of rows? | UNION ALL
In database design processes, data requirements are expressed through | ERD, UML
Consider the law. that holds for set relations: (R natural join S) natural join T =
R natural join (S natural join T). Does the above law still hold for bag relations?
| True
Choose a wrong answer | Relational algebra can express recursion
Choose the right statement below to declare zero or one occurrence of an Element in
DTD. | <!ELEMENT element-name (child-name?)>
So. in the above case, the wildcard % represents what? | % (percent sign)
represents zero. one. or more charactersn
Which of the followings is trivial? | A->->BCD
Compute the full outer join on B. where R is the left operand and S is the right
operand. Find the correct statement in the list below. | Thefullouterjoinhas4rows.
Choose a right answer | An authorization ID may be granted privileges from others
or may give its privileges to others
DECLARE <where to go next> HANDLER FOR ccondition list> <statement> The <where to
go next> clause can be: | All ofthe others.
Consider the following statement | Faithfulness principle
SELECT a. COUNT(DISTINCT B) FROM R GROUP BYa HAVING SUM(B) >3 | (2.3)
Select the valid query to declare the foreign key presC# of the relation
Studio(name. address. presC#) that references the cert# of the relation
MovieExec(name. address, cert#. netWorth): | CREATE TABLE Studio (name CHAR(30)
PRIMARY KEY. address VARCHAR(256). presC# INT REFERENCES MovieExec(cert#));
The relational operator that yields all possible pairs of rows from two tables is
known as a | Product
Consider a relation with schema R(A. B. C. D) and FD's BC -> D. D -> A. A -> B.
Which of the following is the key of R? | BC
In PSM. the difference between a stored procedure and a function is that | All
ofthe others.
Given relations R(A.B) and S(B.C.D). The result of natural join of the relations R
and S has | Attributes A. B. C. D
SELECT A. B.C.D FROM R RIGHT OUTER JOIN S ON R.A = S.C Identify, in the list below.
2 rows that appears in the result | (null. null. 5. 8), (null. null. 0.1)
Given relation U(A. B. C) that has 2 tuples (1.2. 3) and (4. 5. 6). and relation
V(B.C. D) that has 2 tuples (2. 3.10) and (2. 3.11). Choose the right answer below:
| The outer join ofU and Vis the relation R(A. B. C. D) that has 3 tuples (1. 2.
3.10). (1. 2. 3.11) and (4. 5. 6. NULL).
Data Definition language (DDL) is used to | declare database schemas
In database design processes, data requirements are expressed through | ERD ?ML
In Java Database Connectivity (JDBC), before we can execute SQL statement(s). we
need to | Establish a connection to the database and create statement(s). |
Establish a connection to the database and create statement(s).
See picture: | S(ty.l.g.s.p) <- Movies(ty.l.g.s.p) AND lengthslOO AND
studioName=�Fox'
Given the relation Movies(title. year, length, genre. studioName). Select the right
query to create a View with the titles and studio names of all movies that were
produced in 1980 | CREATE VIEW OldMovies AS SELECT title. studioName FROM Movies
WHERE year=1980
Given the diagram below, using the nulls method we can create a single relation
whose schema is _ | Movies(title. year, length, genre, weapon)
Consider a relation with schema R(A. B. C. D) and FD's A -> B. A -> C. C -> D.
Which of the following is the {A}+ ? | {A.B.C.D}
To create a constraint (for example, referential integrity constraint) on a
relation, the owner of the schema must have | REFERENCES privilege
In DTD. the main difference between PCDATA and CDATA is: | PCDATA is text that will
be parsed by a parser and tags inside the text will be treated as markup and
entities will be expanded. CDATA is text that will NOT be parsed by a parser and
tags inside the text will NOT be treated as markup and entities will not be
expanded.
authorizes access to database, coordinate, monitor its use. acquiring software, and
hardware resources | Database administrator
Choose the right statement to grant the INSERT and SELECT privileges on table
Movies to users �tom' and �jerry' | GRANT SELECT. INSERT on Movies TO tom. jerry
WITH GRANT OPTION
When declaring foreign key constraint for relation A that references relation B.the
referenced attribute(s) of the relation B mustbg^gglared as | UNIQUE or PRIMARY KEY
In SQL , the command/statement that let you add an attribute to a relation schema
is �� | Alter
The following is an example of what data model:<Movies><Movie title="Gone with the
wind"><Year>1939</Year><Length>231</Length></Movie></Movies> | Semi-structured data
model (or Hierarchical data model)
What is the degree of a relation? | It is the number of attributes of its relation
schema
What is a functional dependency? | A functional dependency (A->B) occurs when the
attribute A uniquely determines B
Give a relation R(A,B,C,D) like this Choose the IN-CORRECT functional dependency: |
B ->D
When is a set of functional dependencies F said to be minimal? a)Every dependency
in F has a single attribute for its right hand sideb)We cannot replace any
dependency X -> A in F with other dependency Y->A where Y is a proper subset of X
and the changed set of dependencies is still equivalent to Fc)We cannot remove any
dependency from F and still have set of dependencies that is equivalent to Fd)Every
dependency in F has two attributes for its right hand side | (a),(b) and (c)
Suppose we have a relation R(A, B, C, D, E, F) with the following set of FDs:A->C
DE-> F B->D Which is the KEY of R? | ABE
A set of attributes forms a ____ for a relation if we do not allow 2-tuples in a
relation instance to have the same values in all that attributes | Key
Consider a relation with schema R(A, B, C, D) and FD�s A -> B, A -> C, C -> D.
Which of the followings is the {A}+ ? | { A, B, C, D }
The relation R(ABCD) has following FDs:{ACD -> B ; AC -> D ; D -> C ; AC -> B}
Choose the correct statement about R: | R is in 3NF
Given a R(A,B,C,D) with the following FDs:AB->D BC->A AD->B CD->B AD->C Choose a
correct statement about R: | The FD set of R is not canonical and R is in BCNF
Suppose we have a relation R(ABCD) with FD's: A -> C ; B -> A ; A -> D ; AD -> C |
R is not in BCNF
The highest normal form that a relation with nontrivial functional dependencies can
be in is | Boyce-Codd Normal Form (BCNF)
Normalization is a process of analyzing the given relation schema based on their
Functional Dependencies (FDs) and primary keys to achieve the following: | All of
the others
What is the goal of decomposition when designing a database? | The goal of
decomposition is to replace a relation by several relations that do not exhibit
anomalies
When drawing an ERD:(a)Entity sets and their attributes should reflect
reality(b)Redundancy is not important, so we can ignore it(c) Avoid introducing
more elements into the design than is absolutely necessary(d) Choosing the right
relationships | (a) and (c) and (d) are correct
Which of the followings is true? | All of the others
Choose the correct statement: | Aggregate functions perform a calculation on a set
of values and return a single value
Compute the union of the relation R(A,B,C): Which of the following tuples DOES NOT
appear in the result? | (1,5,4)
When join R and S, we want to display all the records in R we must use: | LEFT
OUTER JOIN
Choose one right answer | All of the others
A database transaction, by definition, must be ACID (atomic, consistent, isolated
and durable). What does �Consistent� mean? | �Consistent� means that: Transactions
must not violate any integrity constraints during its execution
What is the difference between the WHERE and HAVING SQL clauses? | The WHERE SQL
clause condition(s) is applied to all rows in the result set before the HAVING
clause is applied (if present). The HAVING clause is used only with SELECT SQL
statements and specifies a search condition for an aggregate or a group
Pay attention to the following query:SELECT * FROM R WHERE A LIKE �%_%�; So, in the
above case, the wildcard �_� represents what? | �_� represents exactly 1 character
A foreign key must | have either a matching value in the referring (primary) table
OR be NULL
Suppose we have 2 relations R(A,B,C,D) and S(B,C,D,E) and B is the foreign key
column in R and B is the primary key in S.This means that: when enter data into the
column B in R, only values that belong to ?B(S) are permitted | TRUE
In UML, a _____ between classes is called an association | binary relationship
Choose the correct statement | Except for COUNT, aggregate functions ignore null
values
Suppose the relation S(B,C,D) has tuples: Compute the result of the following
query: SELECT D, SUM(C)FROM S GROUP BY D | (9,16)
Column A of a relation has the following list of values in the six rows of the
table: NULL, NULL, 10, 10, 20, 30 In SQL Server, which of the following is the
correct value of AVG(DISTINCT A)? | 20
What is the difference between Where and Having Clause? | WHERE is for Rows and
HAVING is for Groups
Suppose relation R(a,b,c) has the following tuples: Which tuple is contained in the
result of the following query: | Selects all customers from table Sales that have
made more than 5 orders.
The relation R(A,B) may have duplicate tuples. Choose the query that create non-
duplicated results, regardless of what tuples R contains? | SELECT A, B FROM R
GROUP BY A, B
The table R(X,Y) currently has the following tuples (note there are duplicates).The
relation S(A,B,C) has the following tuples: Which is the result when we execute the
following query: | There is an error
What is a "join"? | �join� used to connect two or more tables logically with or
without common field(s)
Given relations R(A,B) and S(B,C,D). The result of natural join of the relations R
and S has | Attributes A, B, C, D
(TRUE OR NULL) return: | TRUE
Relation R(x,y) currently consists of only one tuple (NULL, NULL). Which of the
following queries will produce a nonempty output? That is, at least one tuple will
be produced, although the tuple(s) may have NULL's. | SELECT * FROM R WHERE x IS
NULL
(TRUE AND NULL) returns: | NULL
Choose one correct statement: | Comparisons between two null values, or between a
NULL and any other value, return unknown
A database transaction, by definition, must be ACID (atomic, consistent, isolated
and durable). What does �Durable� mean? | �Durable� means that: Transactions that
have committed will survive permanently
A database transaction, by definition, must be ACID (atomic, consistent, isolated
and durable). What does �Isolated� mean? | �Isolated� means that: how/when the
changes made by one operation in one transaction become visible to other concurrent
operations in other transactions
Choose the in-correct statement: | In SQL Server, every DML operation is a
transaction regardless of whether it has a BEGIN TRANSACTION or not
The above describes which property of a transaction? | Durability
Pay attention into the following query:SELECT * FROM R WHERE A LIKE �%a%�;So, in
the above case, the wildcard % represents what? | % (percent sign) represents zero,
one, or more characters
The IN SQL keyword | Determines if a value matches any of the values in a list or a
sub-query
With SQL, how do you select all the records from a table named "Persons" where the
value of the column "FirstName" starts with an "a"? | SELECT * FROM Persons WHERE
FirstName LIKE 'a%'
The SQL BETWEEN operator: | Specifies a range to test.
What is difference between PRIMARY KEY and UNIQUE KEY ? | A table can have more
than one UNIQUE KEY constraint but only one PRIMARY KEY
Which of the following statements is the most correct? a. Using Stored procedures
reduces network traffic b. Using Stored procedures improves security c. Using
Stored procedures improves performance | d. All of the others
The benefits of stored procedures are:(a)They improve the security by letting the
admin to LIMIT the access rights of users (b) They can save a lot of storage space
(c) They can be reused many times (d) They can store a part of the database in
order to retrieve the data more quickly | a. (a) and (c) are true
CREATE TYPE StarType AS (name CHAR(30), address CHAR(100) ); | CREATE TABLE
MovieStar OF StarType ();
Choose the most correct statement. Database is created and maintained by a DMBS
Database is a collection of data that is managed by a DBMS Database is a collection
of information that exists over a long period of time | All of the others
What is the hierarchical data model? | A hierarchical data model is a data model in
which the data is organized into a tree-like structure
Schema-altering commands are known as _________ commands. | Data Definition
Language
Given a relation R(A,B,C,D). Which of the followings is trivial? | A->->BCD
3NFconcept is related to (choose 1 answer only): a. Atomic definition b. Full
dependency definition c. Transitive dependency definition d. Super Key definition |
All of the others
The relation R(ABCD) has following FDs: {ACD -> B ; AC -> D ; D -> C ; AC -> B}
Choose the correct statement about R: | R is in 3NF
Let R(A,B,C,D) with the following FDs: {AB->C, AC->B, AD->C} Choose a correct
statement about R: | R is in 2NF
Which of the following statements is correct? | For any relation schema, there is a
dependency-preserving decomposition into 3NF
Which of the following statements is true? a. BCNF condition guarantees the non
existence of the anomalies. b. In BCNF condition, the left side of every non
trivial FD must be a super key. c. Any two-attribute relation is in BCNF. | All of
the others. d
How to eliminate anomalies when we design a database? | We should decompose
relation to eliminate anomalies
In UML, what is the difference between an aggregation and a composition? | In
composition, when the owning object is destroyed, so are the contained objects. In
aggregation, this is not necessarily true.
"Entity Sets and their attributes should reflect the reality" That above statement
describes which principle? | Faithfulness principle d
Look at the following statements:(a)We should pick the right kind of elements (b)
When an entity has no non-primary key attribute, we should convert that entity to
an attribute (c) Use weak entities when-ever possible (d) Always make redundancies
| (a) and (b) are correct
The ER Diagram uses three principle element types: | Entity sets, Attributes, and
Relationships
The binary relationship between classes in UML is called ... | Association
Consider the Datalog rule H(x,y) <- S(x, y) AND x > 2 AND y < 6. Relation S(x, y)
has 3 tuples (2, 3), (3, 5), and (4, 6). What is about H? | H has a tuple (3, 5)
Consider the law, that holds for set relations:(S intersect T) - R = S intersect (T
- R).The above law still hold for bag relations? | False b
Suppose that tuple t appears, respectively, x, y, and z times in the relations X,
Y, and Z. Let t appear w times in the relation: X union (Y intersect Z).Which of
the following inequalities is true ? | w <= x+y
Consider the law, that holds for set relations: T intersect(R union S) = (T
intersect R) union (T intersect S) The above law still hold for bag relations? |
False b
Suppose the relation S(B,C,D) has tuples:Compute the result of the following query:
SELECT SUM(D) FROM S WHERE D < 8 AND D > 5 | 6
The table Arc(x,y) currently has the following tuples (note there are duplicates):
SELECT x, COUNT(y)FROM Arc GROUP BY x; Which of the following tuples is in the
result? | (4,4)
Suppose the relation S(B,C,D) has tuples: SELECT B, SUM(C) FROM S GROUP BY B |
(c,18) d
Given the relation Employee(SSN, FNAME, LNAME, SALARY, DepartmentNo). Select the
right query below to count the number of employees in each department. | SELECT
DepartmentNo, COUNT(*) FROM Employee GROUP BY DepartmentNo
Suppose the relation S(B,C,D) has tuples: SELECT SUM(C), SUM(D) FROM S WHERE D < 9
AND D > 5 | (10,14) d
When we apply set operators (UNION, INTERSECT, EXCEPT) to two relations R and S,
which conditions on R and S must be satisfied? a. R and S must have schemas with
identical sets of attributes and the types (domains) for each attributes must be
the same in R and S b. Before we compute the set-theoretic union, intersection, or
difference of sets of tuples, the columns of R and S must be ordered so that the
order of attributes is the same for both relations | All of the others c
Here are two relations, R(A,B), S(C,D). Their current values are: Compute the
result of the query: SELECT A, B, C, DFROM R RIGHT OUTER JOIN S ON R.A = S.C
Identify, in the list below, 2 rows that appears in the result. | (null, null, 0,
1) (null, null, 5, 8)
Here are three relations, R(A,B), S(C,D). Their current values are: SELECT A, B, C,
D FROM R LEFT OUTER JOIN S ON R.A = S.C Identify, in the list below, the row that
appears in the result. | (4, 7, null, null)
Choose all correct statements: | Relation instance is current set of rows for a
relation schema Relational Data Model is a model that match the way we think about
our data
Choose 3 important data models that we will study in database course | Network Data
ModelHierachical Data ModelRelational Data Model
In relational data model, a tuple is a record or a row | True
XML files are semi-structured data | True
A relation is a list of tuples | False
A relation is a set of tuples | True
In relational data model, an attribute is a column | False
A data model is a notation for describing data or information. And the description
generally consist of | 3 parts
Determine the primary key for R and then choose the correct statement[A] | R is not
in BCNF
The highest normal form for relation schema R(XYZ) with functional dependencies: |
F = {XY-Z; Y->X; Z->Y } : | 3NF
Give the relation R(EFGH) with the following FD's:E -> F ; F -> E ; E -> H ; H -> F
E -> F ; F> E ; E -> H ; H -> | R is in 3NF
Give the relation R(ABCDE) with the following FD's:D -> C, CE-> A, D ->A, and AE -
>D_indicating which of the following attribute set is a key? | ABE
Which of the following relations is in Third normal form (3NF)? | R(ABCD) with
FD's: ACD -> B ; AC -> D ; D -> C ; AC -> B
Which of the following FD's is also guaranteed to be satisfied by R? | ADG -> CH
Which of the following statements are correct? (choose 2) | All relations with only
two attributes are in BCNFFor any relation schema, there is a dependency-preserving
decomposition into 3NF
When draw an ERD (choose 2): | We should picking the right kind of element_When an
entity has no non-primary key attribute, we should convert that entity to an
attribute
{XY -> ZTV and X -> V}. So, we can say that | XY is a key for R
What is/are the key(s) for R (maybe you must choose 1 or more) | AB
Consider the following statement:"When drawing ERD, you should avoid saying
something in many different ways'That above statement describes which principle? |
Avoid Redundancy Principle
Choose the correct statements:When draw an ERD (choose 3) | Choosing the right
relation-ships_Avoid introducing more elements into the design than is absolutely
necessary_Entity sets and their attributes should reflect reality
Given the relation schema R(MNPQ) with FDs:{MN->P; MN->Q; PQ->M; PQ->N}.Which is
the highest normal form for R | 3NF
The functional dependency A -> B for relation schema R(A,B.C,D) implies that | Any
two tuples in R that have the same value for A must have the same value for B
Suppose relation R(A.B) has the tuples:A B 1 23 45 67 8and the relation S(B.C.D)
has tuples:B C D2 4 64 6 85 5 54 7 9Compute the Left - outenom of R and S. where
the condition is: R.B = SB. Then identify all the tuples of R that are not appear
in the computed result | None of the above
Suppose relation R(A.B) has the tuples:A B1 23 45 6and the relation
S(B.C.D) has tuples:B C D2 4 64 6 84 7 9_Compute the
natural join of R and S.Then, identify which of the following tuples is/are in the
natural joinR | >< | S. You may assume each output tuple has schema (A.B.C.D) |
(3.4.6.8)_ (12.4.6)
Consider the following statement"When drawing ERD. you should avoid introducing
more elements into your design than necessary"That above statement describes which
principle? | Simplicity Count Principle
Consider the following statement"When drawing ERD. if an entity has no non-key
attribute and it is the "one" in many-one relationship, then we should set r! to
the attribute of other entities"That above statement describes which principle? |
Picking the right kind of element principle
The LEN function in SQL Server is | A scalar function
What is the meaning of the LEN function in SQL Server? | The LEN function returns
the total number of characters of a string
The datepart parameter specifies on which part (day, month, year) of the date to
calculate the difference | TRUE
What is the meaning of the ISNULL function? | The ISNULL function replaces NULL
with the BLANK value
How to convert a number to a string? (choose all possible) | We can use the CONVERT
function _We can use the CAST function
What is the meaning of the DATEADD function? | The DATEADD function adds an
interval to a date you specify
The CASE function is used to Evaluates a list of conditions and returns one of
multiple possible result expressions | TRUE
In SQL Server, an index is an on-disk structure associated with a table or view
that speeds up retrieval of rows from the table or view | TRUE
Clustered index is not a good choice for the columns that undergo frequent changes
| TRUE
A table or view must have a clustered indexe and some non-clustered indexes | FALSE
SQL Server typically selects the most efficient method when executing queries.
However, if no indexes are available. SQL Server must use a full table scan | TRUE
Indexes can be helpful for a variety of queries that contain SELECT, UPDATE, or
DELETE statements | TRUE
In SQL Server, indexes are automatically created when PRIMARY KEY and UNIQUE
constraints are defined on table columns | TRUE
In reality, an incorrect index choice can cause less than optimal performance |
TRUE
You should define the clustered index key with as few columns as possible | TRUE
An index contains keys built from one or more columns in the table or view. These
keys are stored in a structure (B-tree) that enables SQL Server to find the row or
rows associated with the key values quickly and efficiently | TRUE
When performing a table scan, the query optimizer reads all the rows in the table,
and extracts the rows that meet the criteria of the query. A table scan generates
any disk I/O operations and can be resource �intensive | FALSE
Well-designed indexes can reduce disk I/O operations and consume fewer system
resources, therefore it improves query performance | TRUE
Choose all the thing that we should do with SQL Server | Use the tools_Use "SELECT
for every SELECT statement
We should use which function to get the last-inserted identity value | @@IDENTITY
To improve the DB performance | We should you the set-based queries and avoids
procedural (row-by-row) queries
Regardless of what any other transaction is doing, a transaction must be able to
continue with the exact same data� sets it started with.The above describes which
property of a transaction? | Isolation
Every row and value must agree with all constraints once the transaction is
complete.The above describes which property of a transaction? | Consistency
The DB product must be constructed so that even if the data drive melts, the DB can
be restored up to the last transaction that was committed a split second before the
hard drive diedThe above describes which property of a transaction? | Durability
Once a transaction is committed, it stays committedThe above describes which
property of a transaction | Durability
Please choose 3 properties of a lock in DBMS | Duration - the isolation mode of the
lock_Mode - the type of the lock_Granularity-the size of the lock
The above describes which property of a transaction? | Isolation
At the end of the transaction, either all statements of the transaction is
successful or all statements of the transaction fail.The above describes which
property of a transaction? | Atomic
When sorting. Null values are treated as the lowest possible values | TRUE
Except for COUNT, aggregate functions ignore null values | TRUE
How to returns a part of a character, binary, text or image?(For example: how to
get the �bcd� in �abcdef� string) | Use the SUBSTRING function
The ORDER BY clause can not include items not appearing in the select list | TRUE
RANK() and ROW_NUMBER() are 2 ranking functions | TRUE
We can use the Aggregation in WHERE clause | FALSE
The RANK() function returns the rank of each row within the partition of a result
set | TRUE
| How to get the information about the version, processor architecture, build
date, and operating system for the current installation of SQL Server | Usethe
@@VERSION
When create stored procedures, the "WITH ENCRYPTION" option indicates that
SQLServerwill convert the original text of the CREATE PROCEDURE statement to an
obfuscated format | TRUE
The maximum nested level of a Transact-SQL stored procedure is 64MB | FALSE
The maximum size of a Transact-SQL stored procedure is 256MB | TRUE
Given the relation Employee(SSN. FNAME. LNAME. SALARY). Select the right query
below to find the employee(s) who has the lowest salary in the company | SELECT
LNAME. FNAME.SALARY FROM Employee WHERE SALARY IN (SELECT MIN(SALARY) FROM
Employee)
Select the well-formed XML | <? xml version = "1.0" ?><MovieData><Movie
title="StarWar*><Year>1997</Year></Movie></MovieData>
with the user. | Execute queries that are requested from the application tier.
Select the right statement to declare MovieStar to be a relation whose tuples are
of typeStarType. Note; StarType is a user-defined type that has its definition as
follows;CREATE TYPE StarType AS (nameCHAR(30).address CHAR(IOO) }; | CREATE TABLE
MovieStar OF StarType Q;
Given the relation Employee(SSN. FNAME. LNAME. SALARY. DepartmentNo). Select the
right query below to count the number of employees in each department | SELECT
DepartmentNo. COUNT(*) FROM Employee GROUP BY Department
In DTD. the main difference between PCDATA and CDATA is | PCDATA is text that will
be parsed by a parser and tags inside the text will be treated as markup and
entities will be expanded CDATA is text that will NOT be parsed by a parser and
tags inside the text wil
Choose the most correct statement. | All of the others
Which of following is never used as a data model? | None of the others
A ____ is a relation name, together with the attributes of that relation. | schema
Which statement is used to remove a relation named R? | DROP TABLE R;
What is another term for a row in a relational table? | Tuple
Let R(ABCD) be a relation with functional dependencies {A -> B, C -> B, B ->
D}What is the key for R (choose one) | AC
The only key of R is {A1, A2}. So, how many super-keys do R have? | 4
Consider the following functional dependencies a,b -> c,d e,g,h -> f,j,a,c -> b,d
p,q -> r,s, Which of the following best describes the relation R(e,f,g,h,i,j)? | R
is in First Normal Form
The relation R(ABCD) has following FDs:{ A -> B ; B -> A ; A -> D ; D -> B } | R is
in 3NF
What is "de-normalization"? | De-normalization means allowing redundancy in a table
The key for a weak entity set E is ......... | Zero or more attributes of E and key
attributes from supporting entity sets
A class in UML is similar to........... | An entity set in E/R model
A(n) _____ provides a means to analyze business requirements so as to standardize
organizational vocabulary, enforce business rules, and ensure adequate data quality
| Entity Relationship Diagram
Consider the law, that holds for set relations:T intersect(R union S) = (T
intersect R) union (T intersect S) The above law still hold for bag relations? |
False
Suppose the relation S(B,C,D) has tuples:B C D a 4 6 Compute the result of the
following query:SELECT SUM(D) FROM S WHERE D < 8 AND D > 5 Choose the row that
appears in the computed result. | 6
Suppose the relation S(B,C,D) has tuples: Compute the result of the following
query: SELECT D, SUM(C) FROM S GROUP BY D | (9,16)
Compute the right outer join of R and S, where the condition is: R.B = S.B. Then
identify 2 tuples of R that do not appear in the computed result. | (30,y), (70,t)
For what values of x, y, and z, including NULL, does the Boolean expression x <= 4
OR NOT(y >= 2 AND z = 10) have the truth value FALSE? Identify one of those values
from the list below | x = 5, y = 3, z = 10
Three properties of a lock in DBMS are: a)Granularity: the size of the lock b)
Granularity: the type of the lock c) Mode: the type of the lock d) Duration: the
time in seconds that the DBMS waits for a lock to be released | (a) and (c) and (d)
are true
Suppose relation R(A,B).Choose the SQL statement that is equivalent to the
following RA expression: | b. SELECT (A+B) AS C FROM R WHERE (A+B) > 10
Suppose R and S are 2 relations. R is the parent of S.And the relationship between
R and S is set to "ON DELETE CASCADE".This means that: | We can delete a row from R
although that row has children in S (and in this case, all the children will be
deleted too)
Three basic types of database integrity constraints are:(a)Entity integrity (b)
Domain integrity (c) Referential integrity (d) Primary key integrity | a. (a) and
(b) and (c) are true
___ allow the database application to find data fast, without reading the whole
table | Indexes
What are the drawbacks of indexes? (a)Indexes require more disk space (b) Indexes
make UPDATE, INSERT, DELETE statement slower (c)Indexes have no any drawback (d)
Indexes make SELECT statement slower | (a) and (b) are true
QN=40 (8534) A tuple which fails to participate in a join is called: | dangling
tuple
QN=41 (8538) (TRUE OR NULL) return: | TRUE
QN=42 (8552) Choose one correct statement: | Comparisons between two null values,
or between a NULL and any other value, return unknown
QN=43 (8554) For what values of x, y, and z, including NULL, does the Boolean
expression x <= 100 AND NOT(y >= 15 OR z = 35)have the truth value UNKNOWN?
Identify one of those values from the list below. | x = NULL, y = 0, z = 4.
Choose one correct statement | No two null values are equal
Choose the most correct statement about PRIMARY KEY: | All of the others
The most useful index on a relation is an index on its key. This is because: | The
search operation based on the primary key is commonly used.
In PSM, the difference between a stored procedure and a function is that: |
function has the return statement.
The aim for the Object-relational database is to bridge the gap between conceptual
data modelling techniques such as Entity-relationship diagram (ERD) and object-
relational mapping (ORM), which often use classes and inheritance, and relational
databases, which do not directly support them | True
______ is a set of markup declarations that define a document type for SGML-family
markup languages (SGML, XML, HTML) | Document Type Definition
A ____ document defines the XML document structure with a list of legal elements
and | DTD
What is a graph database? | A graph database is a database that uses graph
structures with nodes, edges and properties to represent and store information
a. A database is a collection of information that is organized so that it can
easily be accessed, managed, and updated | A database is a collection of data files
A ______ is a collection of programs that enables user to create and maintain
databases. In other words, it is general-purpose software that provides the users
with the processes of defining, constructing and manipulating the databases for
various applications | DBMS
Today, the two important data models are: | The relational data model (including
object-relational extensions) and the semi-structured data model (including XML and
related standards)
Today, in a modern DBMS, the queries are parsed and optimized by | query compiler
A person who is responsible for the structure or schema of the database is called:
| a database administrator
A database administrator (DBA) is a person that is also known by the title: |
Database Coordinator or Database Programmer
Data Definition language (DDL) is used to ...... | declare database schemas
Which is the subset of SQL commands used to manipulate Database structures,
including tables? | DDL (Data Definition Language)
"R(A,B,C,D)" is an example of: | A schema
Which statement is used to remove a column named D from the relation R? | ALTER
TABLE R DROP COLUMN D;
a. A primary key is the field(s) in a table that uniquely defines that table in a
database | A primary key is the field(s) in a table that uniquely defines the row
in the table
Which statement is used to add a column named D into the relation R? | ALTER TABLE
R ADD D [DataType];
Which one of the following is NOT a DML command? | GRANT
The relational operator that adds all possible pairs of rows from two tables is
known as the .... | product
Consider a relation with schema R(A, B, C, D) and FD's BC -> D, D -> A, A -> B.
Which of the following is the key of R? | BC
Given the relation schema R(A,B,C) and functional dependencies F = {AB-> C, B->A,
C->B}. Which attribute(s) is/are prime? | B and C

You might also like