Professional Documents
Culture Documents
1) ------- responsible for authorizing access to the database, for co-ordinating and monitoring its use, acquiring software, and hardware resources, controlling
its use and monitoring efficiency of operations.
A. Authorization Manager
B. Storage Manager
C. File Manager
D. Transaction Manager
E. Buffer Manager
Ans: E
3) -------- level describes what data is stored in the database and the relationships among the data
A.Physical Level
B.Logical Level
C.Conceptual Level
D.None of the above
Ans: B
7) ------------is a collection of operations that perform s single logical function in a database application
A.Transaction
B.Concurrent operation
C.Atomocity
D.Durability
Ans: A
8) The problem that is compounded when constraints involve several data items from different files are Called --------
A.Transaction Control Management Problem
B.Security Problem
C.Integrity Problem
D.Durability Problem
Ans: C
10) -----manages the allocation of the space on the disk storage and the data base structure used to represent information stored on disk
A.Disk Manager
B.File Manager
C.Buffer Manager
D.Memory Manager
E.None of the above
Ans: B
1
11) is the minimal super key
A.Primary Key
B.Candidate Key
C.Surrogate Key
D.Unique Key
E.Alternate Key
Ans: B
12) engine executes low level instructions generated by the DML compilier
A.DDL Analyzer
B.Query Interpreter
C.Database Engine
D.None of the above
Ans: D
13) ------------responsible to define the content, the structure, the constraints, and functions or transactions against the database
A.Transcation Manager
B.Query Analyzer
C.DBA
D.All the above
E.None of the above
Ans: C
17) In Relational database Data is stored as record types and the relationship is represented by set types
A.True
B.False
Ans: A
18) In Hierarchical database to get to a low-level table, you start at the root and work your way down the tree until you reach your target data.
A.True
B.False
Ans: A
20) Conceptual data model is the source of information for logical design phase
A.True
B.False
Ans: A
21) Logical database design describes describes base relations, file organizations, and indexes that are used to achieve efficient access to data.
A.True
B.False
Ans: B
22) Conceptual data modeling uses a high level data modeling concept of E-R Models
A.True
B.False
Ans: A
2
24) Logical data independence. Refers to the separation of the external views from the conceptual view
A.True
B.False
Ans: A
27) Each program maintains its own set of data. So users of one program may be unaware of potentially useful data held by other programs this leads
toDuplication of data
A.True
B.False
Ans: B
29) Simple Attribute composed of multiple components, each with an independent existence.
A.True
B.False
Ans: B
30) Cardinality specifies how many instances of an entity relate to one instance of another entity.
A.True
B.False
Ans: A
1. Which SQL function is used to count the number of rows in a SQL query ?
a) COUNT()
b) NUMBER()
c) SUM()
d) COUNT(*)
View Answer
Answer: d
Explanation: COUNT(*) takes null value row in to consideration.
Answer: c
Explanation: The MAX() function returns the largest value of the selected column.
3. Which of the following SQL clauses is used to DELETE tuples from a database table ?
a) DELETE
b) REMOVE
c) DROP
d) CLEAR
View Answer
Answer: a
Explanation: The SQL DELETE Query is used to delete the existing records from a table.
4. ___________removes all rows from a table without logging the individual row deletions.
a) DELETE
b) REMOVE
c) DROP
d) TRUNCATE
View Answer
3
Answer: d
Explanation: TRUNCATE statement is a Data Definition Language (DDL) operation that marks the extents of a table for deallocation.
Answer: a
Explanation: Data definition language (DDL) commands enable you to perform the following tasks:Create, alter, and drop schema objects.
Answer: d
Explanation: Transaction control commands manage changes made by DML commands. These SQL commands are used for managing changes affecting the data.
Answer: b
Explanation: SQL commands can be used not only for searching the database but also to perform various other functions.They are DDL,DML,TCL and DCL.
8. If you don’t specify ASC or DESC after a SQL ORDER BY clause, the following is used by default
a) ASC
b) DESC
c) There is no default value
d) None of the mentioned
View Answer
Answer: a
Explanation: ASC is the default sort order. Null values are treated as the lowest possible values.
Answer: a
Explanation: The SQL TRUNCATE command is used to delete all the rows from the table and free the space containing the table.
Answer: a
Explanation: SQL Aliases are defined for columns and tables. Basically aliases is created to make the column selected more readable.
Answer: d
Explanation: Data Manipulation Language is used to modify the records in the database.
2. With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” ends with an “a” ?
a) SELECT * FROM Persons WHERE FirstName=’a’
b) SELECT * FROM Persons WHERE FirstName LIKE ‘a%’
c) SELECT * FROM Persons WHERE FirstName LIKE ‘%a’
d) SELECT * FROM Persons WHERE FirstName=’%a%’
View Answer
4
Answer: c
Explanation: The SQL LIKE clause is used to compare a value to similar values using wildcard operators.
3. With SQL, how can you return all the records from a table named “Persons” sorted descending by “FirstName” ?
a) SELECT * FROM Persons SORT BY ‘FirstName’ DESC
b) SELECT * FROM Persons ORDER FirstName DESC
c) SELECT * FROM Persons SORT ‘FirstName’ DESC
d) SELECT * FROM Persons ORDER BY FirstName DESC
View Answer
Answer: d
Explanation: The SQL SELECT statement queries data from tables in the database.
4. With SQL, how can you return the number of not null records in the “Persons” table ?
a) SELECT COUNT() FROM Persons
b) SELECT COLUMNS() FROM Persons
c) SELECT COLUMNS(*) FROM Persons
d) SELECT COUNT(*) FROM Persons
View Answer
Answer: a
Explanation: The ALTER TABLE statement is used to add, delete, or modify columns.
Answer: b
Explanation: The SQL UPDATE Query is used to modify the existing records in a table.You can use WHERE clause with UPDATE query to update selected rows
otherwise all the rows would be affected.
Answer: a
Explanation: The SQL UNION operator is used to combine the result sets of 2 or more SELECT statements. It removes duplicate rows between the various SELECT
statements.
Answer: c
Explanation: The SELECT DISTINCT statement is used to return only distinct (different) values.
Answer: a
Explanation: The ORDER BY keyword sorts the records in ascending order by default.
10. How can you change “Hansen” into “Nilsen” in the “LastName” column in the Persons table?
a) UPDATE Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’
b) MODIFY Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’
c) MODIFY Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’
d) UPDATE Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’
View Answer
5
Answer: d
Explanation: In its simplest form, the syntax for the UPDATE statement when updating one table is:UPDATE table SET column1 = expression1,column2 =
expression2,… WHERE conditions.
1. Which of the following command makes the updates performed by the transaction permanent in the database ?
a) ROLLBACK
b) COMMIT
c) TRUNCATE
d) DELETE
View Answer
Answer: b
Explanation: Commit command is used to permanently save any transaaction into database.
2. Which TCL command undo all the updates performed by the SQL in the transaction ?
a) ROLLBACK
b) COMMIT
c) TRUNCATE
d) DELETE
View Answer
Answer: b
Explanation: Rollback is used for undoing the work done in the current transaction. This command also releases the locks if any hold by the current transaction.
Answer: b
Explanation: The SQL WHERE clause is used to filter the results and apply conditions in a SELECT, INSERT, UPDATE, or DELETE statement.
Answer: d
Explanation: The ORDER BY keyword sorts the records in ascending order by default.
Answer: d
Explanation: The LIKE operator is used in a WHERE clause to search for a specified pattern in a column.
6. Find the names of these cities with temperature and condition whose condition is neither sunny nor cloudy.
a) SELECT city, temperature, condition FROM weather WHERE condition NOT IN (‘sunny’, ‘cloudy’)
b) SELECT city, temperature, condition FROM weather WHERE condition NOT BETWEEN (‘sunny’, ‘cloudy’)
c) SELECT city, temperature, condition FROM weather WHERE condition IN (‘sunny’, ‘cloudy’)
d) SELECT city, temperature, condition FROM weather WHERE condition BETWEEN (‘sunny’, ‘cloudy’);
View Answer
Answer: a
Explanation: The IN operator allows you to specify multiple values in a WHERE clause.
7. Find the name of those cities with temperature and condition whose condition is either sunny or cloudy but temperature must be greater than 70.
a) SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ AND condition = ‘cloudy’ OR temperature > 70
b) SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ OR temperature > 70
c) SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ AND temperature > 70
d) SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ AND condition = ‘cloudy’ AND temperature > 70
View Answer
Answer: c
Explanation: The AND operator displays a record if both the first condition AND the second condition are true.The OR operator displays a record if either the first
condition OR the second condition is true.
Answer: a
Explanation: Subquery—also referred to as an inner query or inner select—is a SELECT statement embedded within a data manipulation language (DML) statement or
nested within another subquery.
9. Find all the cities with temperature, condition and humidity whose humidity is in the range of 63 to 79.
a) SELECT * FROM weather WHERE humidity IN (63 to 79)
b) SELECT * FROM weather WHERE humidity NOT IN (63 AND 79)
c) SELECT * FROM weather WHERE humidity BETWEEN 63 AND 79
d) SELECT * FROM weather WHERE humidity NOT BETWEEN 63 AND 79
View Answer
Answer: c
Explanation: The BETWEEN operator is used to select values within a range.
Answer: d
Explanation: The SQL DELETE Query is used to delete the existing records from a table. You can use WHERE clause with DELETE query to delete selected rows.
1. What type of join is needed when you wish to include rows that do not have matching values?
A. Equi-join
B. Natural join
C. Outer join
Answer: Option C
Explanation:
2. What type of join is needed when you wish to return rows that do have matching values?
A. Equi-join
B. Natural join
C. Outer join
Answer: Option D
Explanation:
7
B. They do not need to have a unique name.
Answer: Option C
Explanation:
Answer: Option A
Explanation:
Answer: Option A
6. Which of the following is one of the basic approaches for joining tables?
A. Subqueries
B. Union Join
C. Natural join
Answer: Option D
Explanation:
8
View Answer Discuss in Forum Workspace Report
Answer: Option D
Explanation:
8. The following SQL is which type of join: SELECT CUSTOMER_T. CUSTOMER_ID, ORDER_T. CUSTOMER_ID, NAME, ORDER_ID FROM
CUSTOMER_T,ORDER_T WHERE CUSTOMER_T. CUSTOMER_ID = ORDER_T. CUSTOMER_ID
A. Equi-join
B. Natural join
C. Outer join
D. Cartesian join
Answer: Option A
Explanation:
B. The process of making an application capable of generating specific SQL code on the fly.
Answer: Option A
Explanation:
A. Combines the output from no more than two queries and must include the same number of columns.
9
B. Combines the output from no more than two queries and does not include the same number of columns.
C. Combines the output from multiple queries and must include the same number of columns.
D. Combines the output from multiple queries and does not include the same number of columns.
Answer: Option C
Answer: Option A
Explanation:
A. Uses the result of an inner query to determine the processing of an outer query.
B. Uses the result of an outer query to determine the processing of an inner query.
C. Uses the result of an inner query to determine the processing of an inner query.
D. Uses the result of an outer query to determine the processing of an outer query.
Answer: Option B
Explanation:
Correlated subquery references a column in the outer query and executes the subquery once for every row in the outer query while Uncorrelated subquery
executes the subquery first and passes the value to the outer query.
A. One
B. Two
C. Three
Answer: Option D
Explanation:
10
View Answer Discuss in Forum Workspace Report
14. The following SQL is which type of join: SELECT CUSTOMER_T. CUSTOMER_ID, ORDER_T. CUSTOMER_ID, NAME, ORDER_ID FROM
CUSTOMER_T,ORDER_T ;
A. Equi-join
B. Natural join
C. Outer join
D. Cartesian join
Answer: Option D
Explanation:
Answer: Option C
This set of SQL Server Multiple Choice Questions & Answers (MCQs) focuses on “Recovery”.
1. SQL Server backup and restore operations occur within the context of the _______ model of the database.
a) backup
b) recovery
c) restore
d) None of the mentioned
View Answer
Answer: b
Explanation: A recovery model is a database property that controls how transactions are logged.
Answer: c
Explanation: Recovery Model is one of the mechanisms which controls and manages the growth of the transaction log file.
Answer: b
Explanation: Three recovery models exist: simple, full, and bulk-logged.
11
c) Bulk-logged
d) All of the mentioned
View Answer
Answer: a
Explanation: Simple recovery model is the simplest of all and maintains only a minimum amount of information in the SQL Server transaction log file.
Answer: a
Explanation: Manageability with Simple recovery model is much easier–no need to take transactional backups.
Answer: d
Explanation: perations that require transaction log backups are not supported by the simple recovery model.
Answer: b
Explanation: In full recovery model,no work is lost due to a lost or damaged data fileand it can even recover to an arbitrary point in time.
8. How many type of backups you can run when the data is in the “Full” recovery model ?
a) 5
b) 6
c) 7
d) All of the mentioned
View Answer
Answer: b
Explanation: Six backups if full recovery model are Complete backup,Differential backup,File and/or Filegroup backup,Partial backup,Copy-Only backup,Transaction
log backup.
9. The _______ recovery model is a special-purpose model that works in a similar manner to the full recovery model.
a) Simple
b) Full
c) bulk-logged
d) None of the mentioned
View Answer
Answer: c
Explanation: Full Recovery and Bulk-Logged Recovery models provide the greatest protection for data.
10. Which of the following statement is used for changing Recovery Model with T-SQL ?
a) ALTER DATABASE
b) ALTER TABLE
c) ALTER COLUMN
d) None of the mentioned
View Answer
Answer: a
Explanation: You can use ALTER DATABASE command with the SET RECOVERY option to change the recovery model of a database.
This set of SQL Server Multiple Choice Questions & Answers (MCQs) focuses on “Locking”.
Answer: b
Explanation: RID stands for Row identifier and is used to lock a single row within a table.
12
2. Point out the correct statement :
a) Deadlocking is same as normal blocking
b) No other transactions can read or modify data locked with shared lock
c) A deadlock occurs when there is a cyclic dependency between two or more threads for some set of resources
d) All of the mentioned
View Answer
Answer: c
Explanation: Deadlock is a condition that can occur on any system with multiple threads, not just on a relational database management system.
Answer: b
Explanation: Shared (S) locks on a resource are released as soon as the data has been read.
Answer: d
Explanation: When SERIALIZABLE isolation level is set – a range lock is placed on the data set, preventing other users from updating or inserting rows into the data
set until the transaction is complete.
Answer: b
Explanation: SQL Server transactions do not time out (unless LOCK_TIMEOUT is set)
6. __________ locks allow processes to bulk copy data concurrently into the same table.
a) Bulk update
b) Bulk import
c) Bulk export
d) Bulk copy
View Answer
Answer: a
Explanation: Bulk update (BU) locks are used when bulk copying data into a table and either the TABLOCK hint is specified
Answer: c
Explanation: Do not issue shared locks and do not honor exclusive locks.
8. Which of the following mode indicates the intention of the transaction to read all of the resources lower in the hierarchy ?
a) IS
b) IX
c) SIX
d) All of the mentioned
View Answer
Answer: c
Explanation: SIX stands for Shared with intent exclusive and can modify some (but not all) resources lower in the hierarchy by placing IX locks on those individual
resources.
13
Answer: c
Explanation: SQL Server allows only one Sch-M lock on an object at a time.
10. Which of the following mode has exclusive range and exclusive resource lock ?
a) RangeX_X
b) RangeS_U
c) RangeS_S
d) RangeI_N
View Answer
Answer: a
Explanation: RangeX-X locks are exclusive resource locks acquired on Index key values from a specific range when the transaction modifies a key value from the
Index.
This set of SQL Server Multiple Choice Questions & Answers (MCQs) focuses on “Transaction ”.
1. The INSERT, UPDATE, or DELETE statement fails if the OLE DB provider used to access the linked server does not support the _________ interface.
a) ITransJoin
b) ITransactionJoin
c) IactionJoin
d) None of the mentioned
View Answer
Answer: b
Explanation: ITransactionJoin is exposed only by providers that support distributed transactions.
Answer: b
Explanation: SQL-92 was the third revision of the SQL database query language
Answer: a
Explanation:
COMMIT [ WORK ]
[;]
b)
[;]
c)
COMMITWORK [ WORK ]
[;]
Answer:
Explanation: COMMIT WORK marks the end of a transaction.
14
d) All of the mentioned
View Answer
Answer:
Explanation: BEGIN TRANSACTION increments @@TRANCOUNT by 1.
Answer: b
Explanation: When nesting transactions, ROLLBACK WORK always rolls back to the outermost BEGIN TRANSACTION statement.
7. Which of the following is valid syntax for SAVE TRANSACTION with all the optional parameters ?
a)
[;]
b)
[;]
c)
Answer: c
Explanation: The savepoint defines a location to which a transaction can return if part of the transaction is conditionally canceled.
8. In _______ transaction we include the DML statements that need to be execute as a unit.
a) Explicit
b) Implicit
c) Distributed
d) All of the mentioned
View Answer
Answer: a
Explanation: Generally we don’t include Select statement in a transaction.
Answer: a
Explanation: When nesting transactions, ROLLBACK WORK always rolls back to the outermost BEGIN TRANSACTION statement and decrements the
@@TRANCOUNT system function to 0.
10. If @@TRANCOUNT is 1, ________ makes all data modifications performed since the start of the transaction a permanent part of the database.
a) COMMIT TRANSACTION
b) SAVE TRANSACTION
c) ROLLBACK TRANSACTION
d) None of the mentioned
View Answer
Answer: a
Explanation: If @@TRANCOUNT is greater than 1, COMMIT TRANSACTION decrements @@TRANCOUNT only by 1 and the transaction stays active.
Answer: a
Explanation: transaction_name specifies a transaction name assigned by a previous BEGIN TRANSACTION. transaction_name must conform to the rules for
identifiers
15
2. Point out the correct statement :
a) ROLLBACK TRANSACTION with a savepoint_name or transaction_name rolls back to the beginning of the transaction
b) A ROLLBACK TRANSACTION statement does produce any messages to the user
c) Issuing a COMMIT TRANSACTION when @@TRANCOUNT is 0 results in an error
d) All of the mentioned
View Answer
Answer: c
Explanation: Error condition implies that there is no corresponding BEGIN TRANSACTION.
Answer: c
Explanation: If warnings are needed in stored procedures or triggers, use RAISERROR.
BEGIN TRANSACTION;
GO
GO
COMMIT TRANSACTION;
b)
BEGIN TRANSACTION;
GO
GO
ROLLBACK TRANSACTION;
c)
BEGIN TRANSACTION;
GO
GO
END;
Answer: a
Explanation: You cannot roll back a transaction after a COMMIT TRANSACTION statement is issued because the data modifications have been made a permanent
part of the database.
Answer: b
Explanation: The Database Engine increments the transaction count within a statement only when the transaction count is 1 at the start of the statement.
16
6. A ROLLBACK TRANSACTION statement specifying a savepoint_name releases any locks that are acquired beyond the savepoint, with the exception of:.
a) escalations
b) containment
c) contention
d) None of the mentioned
View Answer
Answer: a
Explanation: These locks are not released, and they are not converted back to their previous lock mode.
Answer: a
Explanation: COMMIT syntax, with or without specifying the optional keyword WORK, is compatible with SQL-92.
Answer: d
Explanation: If there is an error occuring within these statements individually, SQL Server will roll back the complete statement.
9. ROLLBACK WORK always rolls back to the outermost BEGIN TRANSACTION statement for ___________ transactions.
a) Simple
b) Nested
c) Distributed
d) None of the mentioned
View Answer
Answer: b
Explanation: When nesting transactions, ROLLBACK WORK decrements the @@TRANCOUNT system function to 0.
10. Which of the following condition will ignore the request to enable delayed durability ?
a) DELAYED_DURABILITY = FORCED
b) DELAYED_DURABILITY = 0
c) DELAYED_DURABILITY = IGNORED
d) DELAYED_DURABILITY = NULL
View Answer
Answer: a
Explanation: The request is ignored if the database has been altered with DELAYED_DURABILITY = DISABLED or DELAYED_DURABILITY = FORCED.
a. Ensuring that transactions are free from interference from other users.
17
a. Atomicity, Consistency, Isolation, Database
a. Lost Update
b. Uncommitted Dependency
c. Inconsistent Data
4. A lock that allows concurrent transactions to access different rows of the same table is known as a
a. Field-level lock
b. Row-level lock
c. Table-level lock
d. Database-level lock
a. Saved
b. Loaded
18
c. Rolled
d. Committed
Answer: (d).Committed
6. A system is in a ______ state if there exists a set of transactions such that every transaction in the set is waiting for
a. Idle
b. Waiting
c. Deadlock
d. Ready
Answer: (c).Deadlock
7. The deadlock state can be changed back to stable state by using _____________ statement.
a. Commit
b. Rollback
c. Savepoint
d. Deadlock
Answer: (b).Rollback
a. Deadlock prevention
b. Deadlock recovery
c. Deadlock detection
19
d. All of the mentioned
9. 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
b. Wait-wound
c. Wound-wait
d. Wait
Answer: (a).Wait-die
10. 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
a. Wait-die
b. Wait-wound
c. Wound-wait
d. Wait
Answer: (c).Wound-wait
a. Read-only graph
b. Wait graph
c. Wait-for graph
20
View Answer Report Discuss Too Difficult! Search Google
12. A deadlock exists in the system if and only if the wait-for graph contains a ___________.
a. Cycle
b. Direction
c. Bi-direction
d. Rotation
Answer: (a).Cycle
13. Selecting the victim to be rollbacked to the previous state is determined by the minimum cost. The factors determining
cost of rollback is
a. How long the transaction has computed, and how much longer the transaction will compute before it completes its designated task.
c. How many more data items the transaction needs for it to complete and how many transactions will be involved in the rollback.
14. __________ rollback requires the system to maintain additional information about the state of all the running
transactions.
a. Total
b. Partial
c. Time
d. Commit
21
Answer: (b).Partial
a. 0x99fffL
b. ABCDEFG
c. 0x99fffa
d. 99671246
Answer: (a).0x99fffL
16. Which of the following occurs when a transaction rereads data and finds new rows that were inserted by a command
a. Nonrepeatable read
b. Phantom read
c. Dirty read
d. Consistent read
17. A transaction for which all committed changes are permanent is called:
a. atomic
b. consistent
c. isolated
d. durable
Answer: (d).durable
22
18. In this instance, dirty reads are disallowed, while nonrepeatable reads and phantom reads are allowed.
a. Read committed
b. Read uncommitted
c. Repeatable read
d. Serializable
19. Which of the following occurs when a transaction rereads data it has previously read and finds modification or
a. Nonrepeatable read
b. Phantom read
c. Dirty read
d. Consistent read
20. A transaction may not always complete its execution successfully. Such a transaction is termed
a. Aborted
b. Terminated
c. Closed
Answer: (a).Aborted
This set of SQL Server Multiple Choice Questions & Answers (MCQs) focuses on “Log Shipping”.
23
1.Which of the following is the instance of SQL Server that is your production server in log shipping ?
a) secondary database
b) primary database
c) secondary server
d) primary server
View Answer
Answer: d
Explanation: Once the monitor server has been configured, it cannot be changed without removing log shipping first.
Answer: a
Explanation: The database is not available only while the restore process is running.
Answer: a
Explanation: There are two available modes and they are related to the state in which the secondary, log shipped.
4. Which of the following script can check the database recovery model by querying sys.databases for log shipping ?
a)
USE [master]
GO
GO
b)
USE [master]
GO
GO
c)
USE [master]
GO
GO
Answer: b
Explanation: Make sure your database is in full or bulk-logged recovery model.
Answer: b
Explanation: Log Shipping is a pretty simple process to setup.
6. Which of the following stored procedure is used to add a primary database on primary server ?
a) sp_add_log_shipping_primary_database
b) sp_add_primary_database
c) sp_add_log_shipping
d) sp_add_log_shipping_primary
View Answer
Answer: a
Explanation: sp_add_log_shipping_primary_database stored procedure returns the backup job ID and primary ID.
7. Execute sp_add_jobschedule to add a schedule for the backup job on _________ server
a) primary
b) secondary
c) primary and secondary
d) None of the mentioned
View Answer
Answer: a
Explanation: sp_add_jobschedule creates a schedule for a job.
sp_add_log_shipping_secondary_primary
[ @secondary_server = ] 'primary_server',
b)
sp_add_log_shipping_secondary_primary
[ @primary_server = ] 'primary_server',
c)
xp_add_log_shipping_secondary_primary
[ @primary_server = ] 'primary_server',
Answer: b
Explanation: sp_add_log_shipping_secondary_primary sets up the primary information, adds local and remote monitor links, and creates copy and restore jobs on the
secondary server for the specified primary database.
9. Which of the following table stores history detail for log shipping jobs ?
a) log_shipping_monitor_alert
b) log_shipping_monitor_primary
c) log_shipping_monitor_history_detail
d) None of the mentioned
View Answer
Answer: c
Explanation: log_shipping_monitor_alert stores alert job ID.
Answer: c
Explanation: sp_help_log_shipping_primary_database retrieves primary database settings and displays the values from the log_shipping_primary_databases.
25
MCQ Based On Object-Oriented Database
A. Unary
Answer: Option B
Explanation:
Answer: Option C
Explanation:
3. Identify the class name for the following code: ABC123 course();
A. ABC123
B. course
C. course()
Answer: Option A
Explanation:
26
A. Attribute
B. Structure
C. Operation
Answer: Option D
Explanation:
A. Class
B. Attribute
C. Relationship
Answer: Option C
Answer: Option D
Explanation:
A. Strings
B. Boolean
C. Long
Answer: Option D
27
Explanation:
A. They have the ability to store complex data types on the Web.
C. They are most useful for traditional, two-dimensional database table applications.
Answer: Option A
Explanation:
Answer: Option A.
10. Which of the following is an unordered collection of elements that may contain duplicates?
A. Set
B. Bag
C. List
D. Dictionary
Answer: Option B
11. Which of the following is true concerning the following statement: class Manager extends Employee
28
Answer: Option B
Explanation:
12. Which of the following is an ordered collection of elements of the same type?
A. Set
B. Bag
C. List
D. Dictionary
Answer: Option C
Explanation:
C. Neither direction.
D. Both directions.
Answer: Option D
Explanation:
Answer: Option D
Explanation:
29
15. The Object Query Language is which of the following"?
Answer: Option A
1. Every time attribute A appears, it is matched with the same value of attribute B, but not the same value of attribute C. Therefore, it is true that:
A. A → B.
B. A → C.
C. A → (B,C).
D. (B,C) → A.
Answer: Option A
Explanation:
2. The different classes of relations created by the technique for preventing modification anomalies are called:
A. normal forms.
C. functional dependencies.
Answer: Option A
Explanation:
30
D. domain/key normal form.
Answer: Option C
Explanation:
A. record.
B. relation.
C. column.
D. field.
Answer: Option A
Explanation:
A. composite keys.
B. determinants.
C. candidate keys.
D. foreign keys.
Answer: Option C
6. Which of the following is a group of one or more attributes that uniquely identifies a row?
A. Key
B. Determinant
C. Tuple
D. Relation
Answer: Option A
Explanation:
7. 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):
31
A. transitive dependency.
B. insertion anomaly.
D. normal form.
Answer: Option C
Explanation:
8. A relation is considered a:
A. Column.
B. one-dimensional table.
C. two-dimensional table.
D. three-dimensional table.
Answer: Option C
Explanation:
9. In the relational model, relationships between relations or tables are created by using:
A. composite keys.
B. determinants.
C. candidate keys.
D. foreign keys.
Answer: Option D
Explanation:
A. tables.
B. rows.
C. relations.
32
D. attributes.
Answer: Option D
A. record.
B. relation.
C. column.
D. field.
Answer: Option B
Explanation:
Answer: Option C
Explanation:
13. For some relations, changing the data can have undesirable consequences called:
B. modification anomalies.
C. normal forms.
D. transitive dependencies.
Answer: Option B
Explanation:
14. A key:
33
B. can only be one column.
C. identifies a row.
D. identifies a column.
Answer: Option C
Explanation:
A. column of a table.
C. row of a table.
D. key of a table.
Answer: Option A
Answer: Option D
Explanation:
A. A → C.
B. B → C.
D. C is a determinant.
Answer: Option C
Explanation:
34
18. A tuple is a(n):
A. column of a table.
C. row of a table.
D. key of a table.
Answer: Option C
Explanation:
19. If attribute A determines both attributes B and C, then it is also true that:
A. A → B.
B. B → A.
C. C → A.
D. (B,C) → A.
Answer: Option A
Explanation:
A. split the relation into two relations, each with a single theme.
Answer: Option A
1. Which of the following indicates the maximum number of entities that can be involved in a relationship?
A. Minimum cardinality
B. Maximum cardinality
C. ERD
35
D. Greater Entity Count (GEC)
Answer: Option B
Explanation:
2. Which type of entity cannot exist in the database unless another type of entity also exists in the database, but does not require that the identifier of that other
entity be included as part of its own identifier?
A. Weak entity
B. Strong entity
C. ID-dependent entity
Answer: Option A
Explanation:
3. In a one-to-many relationship, the entity that is on the one side of the relationship is called a(n) ________ entity.
A. parent
B. child
C. instance
D. subtype
Answer: Option A
Explanation:
A. Supertype entity
B. Subtype entity
C. Archetype entity
D. Instance entity
Answer: Option D
Explanation:
36
View Answer Discuss in Forum Workspace Report
A. itself
B. a subtype entity
C. an archetype entity
D. an instance entity
Answer: Option A
6. Which of the following indicates the minimum number of entities that must be involved in a relationship?
A. Minimum cardinality
B. Maximum cardinality
C. ERD
Answer: Option A
Explanation:
7. Which of the following refers to something that can be identified in the users' work environment, something that the users want to track?
A. Entity
B. Attribute
C. Identifier
D. Relationship
Answer: Option A
Explanation:
8. In which of the following is a single-entity instance of one type related to many entity instances of another type?
A. One-to-One Relationship
B. One-to-Many Relationship
C. Many-to-Many Relationship
37
D. Composite Relationship
Answer: Option B
Explanation:
9. Which of the following refers to an entity in which the identifier of one entity includes the identifier of another entity?
A. Weak entity
B. Strong entity
C. ID-dependent entity
D. ID-independent entity
Answer: Option C
Explanation:
10. Which type of entity is related to two or more associated entities that each contain specialized attributes that apply to some but not all of the instances of the
entity?
A. Supertype entity
B. Subtype entity
C. Archetype entity
D. Instance entity
Answer: Option A
A. entity.
B. attribute.
C. identifier.
D. relationship.
Answer: Option C
Explanation:
38
A. entities.
B. attributes.
C. identifiers.
D. relationships.
Answer: Option B
Explanation:
13. In which of the following can many entity instances of one type be related to many entity instances of another type?
A. One-to-One Relationship
B. One-to-Many Relationship
C. Many-to-Many Relationship
D. Composite Relationship
Answer: Option C
Explanation:
A. database.
B. entity class.
C. attribute.
D. ERD.
Answer: Option B
Explanation:
15. Which of the following is NOT a basic element of all versions of the E-R model?
A. Entities
B. Attributes
C. Relationships
39
D. Primary keys
Answer: Option D
16. In which of the following is a single-entity instance of one type of related to a single-entity instance of another type?
A. One-to-One Relationship
B. One-to-Many Relationship
C. Many-to-Many Relationship
D. Composite Relationship
Answer: Option A
Explanation:
17. Entities can be associated with one another in which of the following?
A. Entities
B. Attributes
C. Identifiers
D. Relationships
Answer: Option D
Explanation:
18. Which type of entity has its relationship to another entity determined by an attribute in that other entity called a discriminator?
A. Supertype entity
B. Subtype entity
C. Archetype entity
D. Instance entity
Answer: Option B
Explanation:
19. Which type of entity represents a logical generalization whose actual occurrence is represented by a second, associated entity?
A. Supertype entity
40
B. Subtype entity
C. Archetype entity
D. Instance entity
Answer: Option C
Explanation:
20. In a one-to-many relationship, the entity that is on the many side of the relationship is called a(n) ________ entity.
A. parent
B. child
C. instance
D. subtype
Answer: Option B
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Query Processing”.
Answer: b
Explanation: Database is a collection of related tables.
Answer: d
Explanation: The network model is a database model conceived as a flexible way of representing objects and their relationships.
3. Which of the following schemas does define a view or views of the database for particular users?
a) Internal schema
b) Conceptual schema
c) Physical schema
d) External schema
View Answer
Answer: d
Explanation: An externally-defined schema can provide access to tables that are managed on any PostgreSQL, Microsoft SQL Server, SAS, Oracle, or MySQL
database.
4. Which of the following is an attribute that can uniquely identify a row in a table?
a) Secondary key
b) Candidate key
c) Foreign key
d) Alternate key
View Answer
Answer: b
Explanation: A Candidate Key can be any column or a combination of columns that can qualify as unique key in database.
41
5. Which of the following is the process of selecting the data storage and data access characteristics of the database?
a) Logical database design
b) Physical database design
c) Testing and performance tuning
d) Evaluation and selecting
View Answer
Answer: b
Explanation: The physical design of the database optimizes performance while ensuring data integrity by avoiding unnecessary data redundancies.
6. Which of the following terms does refer to the correctness and completeness of the data in a database?
a) Data security
b) Data constraint
c) Data independence
d) Data integrity
View Answer
Answer: d
Explanation: ACID property is satisfied by transaction in database.
Answer: b
Explanation: One entity department is related to several employees.
Answer: c
Explanation: A superkey is a combination of attributes that can be uniquely used to identify a database record.
9. If the state of the database no longer reflects a real state of the world that the database is supposed to capture, then such a state is called
a) Consistent state
b) Parallel state
c) Durable state
d) Inconsistent state
View Answer
Answer: d
Explanation: SQL data consistency is that whenever a transaction is performed, it sees a consistent database.
Answer: b
Explanation: Concurrency control ensures that correct results for concurrent operations are generated, while getting those results as quickly as possible.
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Advanced Query Optimization”.
1. _______________ is a procedural extension of Oracle – SQL that offers language constructs similar to those in imperative programming languages.
a) SQL
b) PL/SQL
c) Advanced SQL
d) PQL
View Answer
Answer: b
Explanation: PL/SQL is an imperative 3GL that was designed specifically for the seamless processing of SQL commands.
2. ___________ combines the data manipulating power of SQL with the data processing power of Procedural languages.
a) PL/SQL
b) SQL
c) Advanced SQL
d) PQL
View Answer
42
Answer: a
Explanation: PL/SQL is an imperative 3GL that was designed specifically for the seamless processing of SQL commands.
3. _______________ has made PL/SQL code run faster without requiring any additional work on the part of the programmer.
a) SQL Server
b) My SQL
c) Oracle
d) SQL Lite
View Answer
Answer: c
Explanation: An Oracle database is a collection of data treated as a unit. The purpose of a database is to store and retrieve related information.
Answer: a
Explanation: Lexical items can be generally understood to convey a single meaning, much as a lexeme, but are not limited to single words.
Answer: d
Explanation: The database object name is referred to as its identifier.
6. A ___________________ is an explicit numeric, character, string or Boolean value not represented by an identifier.
a) Comments
b) Literals
c) Delimiters
d) Identifiers
View Answer
Answer: b
Explanation: The terms literal and constant value are synonymous and refer to a fixed data value.
Answer: d
Explanation: The terms literal and constant value are synonymous and refer to a fixed data value.
Answer: b
Explanation: The terms literal and constant value are synonymous and refer to a fixed data value.
9. In _______________ the management of the password for the account can be handled outside of oracle such as operating system.
a) Database Authentication
b) Operating System Authentication
c) Internal Authentication
d) External Authentication
View Answer
Answer: b
Explanation: Database management involves the monitoring, administration, and maintenance of the databases and database groups in your enterprise.
10. In ________________ of Oracle, the database administrator creates a user account in the database for each user who needs access.
a) Database Authentication
b) Operating System Authentication
c) Internal Authentication
d) External Authentication
View Answer
43
Answer: a
Explanation: Database management involves the monitoring, administration, and maintenance of the databases and database groups in your enterprise.
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Buffer Management”.
1. In order to reduce the overhead in retrieving the records from the storage space we use
a) Logs
b) Log buffer
c) Medieval space
d) Lower records
View Answer
Answer: b
Explanation: The output to stable storage is in units of blocks.
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
b) Can be different
c) Is opposite
d) Can be partially same
View Answer
Answer: a
Explanation: As a result of log buffering, a log record may reside in only main memory (volatile storage) for a considerable time before it is output to stable storage.
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
a) Read-write logging
b) Read-ahead logging
c) Write-ahead logging
d) None of the mentioned
View Answer
Answer: c
Explanation: The WAL rule requires only that the undo information in the log has been output to stable storage, and it permits the redo information to be written later.
Answer: d
Explanation: If there are insufficient log records to fill the block, all log records in main memory are combined into a partially full block and are output to stable
storage.
5. The _______________ policy, allows a transaction to commit even if it has modified some blocks that have not yet been written back to disk.
a) Force
b) No-force
c) Steal
d) No-steal
View Answer
Answer: b
Explanation: No-force policy allows faster commit of transactions.
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.
a) Force
b) No-force
c) Steal
d) No-steal
View Answer
Answer: b
Explanation: No-force policy allows faster commit of transactions.
7. The ___________ policy, allows the system to write modified blocks to disk even if the transactions thatmade those modifications have not all committed.
a) Force
b) No-force
c) Steal
d) No-steal
View Answer
Answer: c
Explanation: The no-steal policy does not work with transactions that perform a large number of updates.
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
44
a) Latches
b) Swap Space
c) Dirty Block
d) None of the mentioned
View Answer
Answer: a
Explanation: These locks, and other similar locks that are held for a short duration.
9. The __________________ contains a list of blocks that have been updated in the database buffer.
a) Latches
b) Swap Space
c) Dirty Block
d) None of the mentioned
View Answer
Answer: c
Explanation: Dirty blocks are those that have been updated in memory, and the disk version is not up-to-date.
10. The operating system reserves space on disk for storing virtual-memory pages that are not currently in main memory; this space is called
a) Latches
b) Swap Space
c) Dirty Block
d) None of the mentioned
View Answer
Answer: b
Explanation: Almost all current-generation operating systems retain complete control of virtual memory.
Answer: b
Explanation: Hash technique uses particular hash key value.
Answer: c
Explanation: Indices do not have to be treated like other database structures.
Answer: d
Explanation: Two techniques are present.
Answer: a
Explanation: It moves in a crab like manner.
45
Answer: b
Explanation: Crabbing protocol moves in a crab like manner.
6. In crabbing protocol the the lock obtained on the root node is in _________ mode.
a) Shared
b) Exclusive
c) Read only
d) None of the mentioned
View Answer
Answer: a
Explanation: Crabbing protocol moves in a crab like manner down the index tree.
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.
a) Shared
b) Exclusive
c) Read only
d) None of the mentioned
View Answer
Answer: b
Explanation: Crabbing protocol moves in a crab like manner down the index tree.
8. In crabbing protocol to inset or delete a key value the leaf node has to be locked in ___________ mode.
a) Shared
b) Exclusive
c) Read only
d) None of the mentioned
View Answer
Answer: b
Explanation: Crabbing protocol moves in a crab like manner down the index tree.
Answer: c
Explanation: This pointer is required because a lookup that occurs while a node is being split may have to search not only that node but also that node’s right sibling.
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.
a) B+ tree locking
b) Link level locking
c) Key-value locking
d) Next value locking
View Answer
Answer: c
Explanation: Key-value locking thus provides increased concurrency.
46