DAC - EANDC - QB - Question Bank For DBT
DAC - EANDC - QB - Question Bank For DBT
1. Redo Log Buffer SGA stores all the redo log entries.
2. Process is a ’thread of control’ or mechanism in Operating System that executes series of steps.
3. The data of a row in a table may not be able to fit the same data block. Data for row is stored in a chain of
data blocks which is called as Row chaining
4. A sub-query cannot have a clause and a of selects.
5. A is a set of values that may appear in one or more columns.
6. PL/SQL provides keyword, which is used to name an exception.
7. An defined as the collection of blocks which must be continuous whenever allocation takes place.
8. A is a table that is currently being modified by a DML statement.
9. The character is used to designate wild characters.
10. Indexes are created in conjunction with and constraints.
11. Types of views are and .
12. The date function that returns a numerical value is .
13. To define access keys in the menu give the symbol before the desired character.
14. An index may contain upto columns.
15. To print the message along with the variable ew use the package .
16. To select data from a range of values operator is used.
17. A expression returns either TRUE or FALSE.
18. number of columns can be used in an ORDER BY clause.
19. Once the values are inserted in a table, the size of its columns can only be Increased & can never be
decreased
20. ROWID is a pseudo column
21. In DBMS terms, the number of rows in a table is called its cardinality & the no. of columns it has defines its
degree
22. The most serious drawback in the ER model is that it cannot depict relationships
23. Dummy records is used to represent many to many relationship in the Network model
24. The data structure used in the Network model is graph & that used in the hierarchical model is tree
25. An SQL query is interpreted & a PL/SQL block is compiled before execution
26. The 4 phases of processing a cursor are Declare, Open, Fetch & Close
27. The FOR UPDATE clause when used with a SELECT query locks a table
28. When a user executes SELECT ……. FOR UPDATE on a table, it tries to lock it, but if the table is already
locked, the user is placed in a no-operation mode. This situation can be prevented by using NOWAIT clause
Page 1 of 1
29. A table whose primary key retains its uniqueness in the view created over it is called a key preserved table
30. Instead of trigger is used to take care of operations on columns of a Non Key-preserved table through the
join view
40. The With admin option clause of the GRANT command makes the recipient the owner of the granted
object
41. The With grant option clause of the GRANT command allows the recipient to pass the privilege to others
42. The 5 important components of a Database Management system (DBMS) are Database engine, data
dictionary, query processor, report writer & form generator
52. A NULL value in the column indicates that the value is not applicable or currently not available
Page 2 of 1
53. init.ora file contains the no. of failed login attempts after which the SQL*PLUS application shuts down
54. A Sequence can be used to provide a surrogate key in a table that does not have a primary key of its own
55. Snapshots are the means of creating local copies of remote tables.
56. Materialized views are also known as Snapshots
Q.2True or False
1. The use of DBMS automatically removes redundancies.
2. Relational model requires the use of connectors as ‘links’.
3. In the network model a record can have many parents.
4. Char conserves memory as compared to varchar.
5. A table once created can be dropped.
6. The name of a table can be changed with Alter command.
7. A table can have more than one primary key.
8. The columns on which ORDER BY is done must be a part of <Select Statement>
9. For a valid UNION of two result sets, the column names of the result sets should match.
10. Char datatype stores only characters in the database.
11. The VARCHAR2 datatype comes under standard SQL datatypes
12. The maximum length of VARCHAR2 datatype is identical when used in a PL/SQL code and when used in a
table
13. The ORDER BY clause whenever used should always be the last clause of an SQL query (True)
14. 4 The size of a column in a table cannot be decreased once a value is inserted in it (True)
15. The UNIQUE and FOREIGN keys cannot have NULL values (False)
16. Online Transaction Processing (OLTP) consists of more DML and less DQL statements( True)
17. Decision Support System (DSS) is used to understand the trends of data (True)
18. Database Manager is the person responsible for proper functioning of a DBMS. (False)
19. A set of privileges assembled together is called a ROLE (True)
20. A SELECT statement cannot be used to lock a table (False)
21. All functions performed by constraints can equally be performed by triggers (True)
22. By default, the trigger is created at ROW level (False)
23. A single trigger can be used for handling Insert/delete/update on a table (True)
Page 3 of 1
24. DDL operations, once performed are automatically committed & do not require any commit statement for
confirmation (True)
25. No column of a Non-key preserved table can be modified through a view (True)
26. No trigger other than the INSTEAD OF trigger can be applied to a view (True)
27. PL/SQL programs residing at the client side are called named PL/SQL blocks (False)
28. The difference between a procedure and a function is that a procedure needs to be executed explicitly using
EXECUTE whereas a function can be executed within an SQL statement as well (True)
29. The datatypes of parameters passed to stored procedures cannot have any width (True)
30. DDL statements cannot be executed within a Pl/SQL code (False)
31. The updates made to a view are not reflected to the underlying base tables (False)
32. A single query cannot have WHERE, GROUP BY, HAVING and ORDER BY clauses simultaneously (False)
33. DECODE is a standard function specified by SQL 92 standards (False)
34. The two SELECT statements joined using UNION, INTERSECT and MINUS must have same no, of
columns & datatypes, the size of these columns does not matter (True)
35. The UNION clause does not eliminate duplicates (False)
36. A view is non-updateable if it has a reference to ROWNUM (True)
37. An ORDER BY clause cannot be used in a CREATE VIEW statement (True)
38. ROWID is a datatype (True)
39. 2NF applies only to the tables with composite primary keys (True)
40. The inner join (or equi join) is same as the natural join (True)
41. The implicit variables :new and :old cannot be used in context of table level triggers (True)
42. A function and a table cannot have a same name but a function and a trigger can (True)
43. Indexing a table increases the speed of execution of queries based on it (True)
44. The HAVING clause can only contain aggregate functions (True)
45. The ROWNUM column can be modified through update statement (False)
46. SELECT NLOG(7) FROM dual returns the natural log of 7 (False)
Page 4 of 4
Multiple Choice question (1 Mark each)
1. Fetching past the last row of a cursor
A. Raises the NO_DATA_FOUND Exception
B. Raises the VALUE_ERROR Exception
C. Raises the CURSOR_NOT_FOUND Exception
D. Does not raise an exception
7. Which of the following objects are dropped automatically when a table is dropped.
A. Procedure
B. Constraints
C. Views
D. Synonyms
Page 5 of 4
8. Consider the following four options from a single statement. Which of the following lines in the SELECT
statement below contain an error.
A. SELECT DECODE (EMPID, 58385,’INACTIVE’,’ACTIVE’) EMPID
B. FROM EMP
C. WHERE SUBSTR (LASTNAME, 1, 1) > TO_NUMBER (‘S’)
D. AND EMPID > 02000
E. ORDER BY EMPID DESC, LASTNAME ASC;
9. User ‘Janko’ would like to insert a row into the Emp table, which has 3 columns: empid, lastname, salary.
The user would like to enter data for empid 59694, lastname Harry, but no salary. Which statement would
work best.
A. INSERT INTO EMP VALUES (59694,’Harry’, NULL);
B. INSERT INTO EMP VALUES (59694,’Harry’);
C. INSERT INTO EMP (empid, lastname, salary) VALUES (59694,’Harry’);
D. INSERT INTO EMP VALUES (Select 59694 from ‘Harris’);
E. INSERT INTO EMP(empid, lastname) VALUES (59694,’Harry’);
Which statement must be added to make this trigger execute after updating the salary column of player
table
A. After update on player
B. After salary update of player
C. After update [salary] on player
D. After update of salary on player
11. For every new ballplayer added to the Player table, a record must be inserted into the Player_Bat_Stat
table. You have written a trigger to accomplish this task. To which timing will this trigger be assigned.
A. After
B. Instead of
C. Statement
D. Pre-Insert
12. Which of the following is one of the benefits of using procedures and functions
A. Procedures and functions increase the number of calls to the database.
B. Procedures and functions are reparsed for multiple users by exploiting shared SQL areas.
C. Procedures and functions avoid reparsing for multiple users by exploiting shared SQL areas.
D. Testing of procedures and functions requires the database to the restarted to clear out shared SQL
areas for future access.
14. A table can have maximum no. Of Long Raw datatype columns
Page 6 of 4
A. One
B. No limit
C. 255
D. depends on tablespace
15. A user is setting up a join operation between Emp and Dept tables. The query should return all the
employees, which are assigned dept, as well as the employees which are yet not assigned any dept.
A. Select e.empid, d.head from emp e, dept d;
B. Select e.empid, d.head from emp e, dept d where e.deptno = d.deptno;
C. Select e.empid, d.head from emp e, dept d where e.deptno = d.deptno (+);
D. Select e.empid, d.head from emp e, dept d where e.deptno (+)= d.deptno;
16. Output from a table called PLAYS with two columns, PLAY_NAME and AUTHOR, is shown next. Which of
the following SQL statements produced it?
PLAY_TABLE
-- - - -
"Midsummer Night’s Dream", SHAKESPEARE
"Waiting For Godot", BECKETT
"The Glass Menagerie", WILLIAMS
18. Which of the following statements are NOT TRUE about ORDER BY clauses?
A. Ascending or descending order can be defined with the asc or desc keywords.
B. Only one column can be used to define the sort order in an order by clause.
C. Multiple columns can be used to define sort order in an order by clause.
D. Columns can be represented by numbers indicating their listed order in the select
E. clause within order by.
20. A user is setting up a join operation between tables EMP and DEPT. There are some employees in the EMP
table that the user wants returned by the query, but the employees are not assigned to department heads
yet. Which SELECT statement is most appropriate for this user?
A. select e.empid, d.head from emp e, dept d;
B. select e.empid, d.head from emp e, dept d where e.dept# = d.dept#;
C. select e.empid, d.head from emp e, dept d where e.dept# = d.dept# (+);
D. select e.empid, d.head from emp e, dept d where e.dept# (+) = d.dept#;
21. Developer ANJU executes the following statement: CREATE TABLE animals AS SELECT * from
Page 11 of 11
MASTER.ANIMALS; What is the effect of this statement?
A. A table named ANIMALS will be created in the MASTER schema with the same data as the ANIMALS
table owned by ANJU.
B. A table named ANJU will be created in the ANIMALS schema with the same data as the ANIMALS table
owned by MASTER.
C. A table named ANIMALS will be created in the ANJU schema with the same data as the ANIMALS table
owned by MASTER.
D. A table named MASTER will be created in the ANIMALS schema with the same data as the ANJU table
owned by ANIMALS.
25. You issue the following statement. What will be displayed if the EMPID selected is 60494?
SELECT DECODE(empid,38475, ’Terminated’,60494, ’LOA’, ’ACTIVE’) FROM emp;
A. 60494
B. LOA
C. Terminated
D. ACTIVE
26. After executing an UPDATE statement, the developer codes a PL/SQL block to perform an operation based
on SQL%ROWCOUNT. What data is returned by the SQL%ROWCOUNT operation?
A. A Boolean value representing the success or failure of the update
B. A numeric value representing the number of rows updated
C. A VARCHAR2 value identifying the name of the table updated
D. A LONG value containing all data from the table
27. A procedure declares a user-defined exception but does not raise it explicitly. Which of the following
statements is true about this function?
A. The user-defined exception will never be raised.
B. The user-defined exception will be handled by a WHEN OTHERS exception handler.
C. The procedure will fail on compile.
D. The user-defined exception is defined incorrectly.
28. Which statement most accurately describes the result of not creating an exception handler for a raised
exception?
A. The program will continue without raising the exception.
B. There will be a memory leak.
Page 12 of 11
C. Control will pass to the PL/SQL block caller’s exception handler.
D. The program will return a %notfound error.
30. If left out, which of the following would cause an infinite loop to occur in a simple loop?
A. loop
B. end loop
C. if-then
D. exit
32. Developer JANET receives an error due to the following statement in the DECLARATION section: PI
CONSTANT NUMBER;. The problem is because:
A. There is not enough memory in the program for the constant.
B. There is no value associated with the constant.
C. There is no datatype associated with the constant.
D. PI is a reserved word.
33. The OTHERS exception handler is used to handle the OTHERS raised exception.
A. TRUE
B. FALSE
34. Which of the following statements are true about WHILE loops?
A. Explicit exit statements are required in while loops.
B. Counter variables are required in while loops.
C. An if-then statement is needed to signal when a while loop should end.
D. All exit conditions for while loops are handled in the exit when clause.
37. After executing an UPDATE statement, the developer codes a PL/SQL block to perform an operation based
on SQL%ROWCOUNT. What data is returned by the SQL%ROWCOUNT operation?
A. A Boolean value representing the success or failure of the update
B. A numeric value representing the number of rows updated
C. A VARCHAR2 value identifying the name of the table updated
Page 13 of 11
D. A LONG value containing all data from the table
38. A developer would like to use referential datatype declaration on a variable. The variable name is
EMPLOYEE_LASTNAME, and the corresponding table and column is EMPLOYEE, and LASTNAME,
respectively. How would the developer define this variable using referential datatypes?
A. Use employee.lname%type.
B. Use employee.lname%rowtype.
C. Look up datatype for EMPLOYEE column on LASTNAME table and use that.
D. Declare it to be type LONG.
39. The RAISE_APPLICATION_ERROR( ) procedure defines errors returned in which of the following numeric
ranges?
A. -00000 and -99999
B. -01200 and -01299
C. -00030 and -00039
D. -20000 and -20999
40. When developing a PL/SQL library, the developer defines variable NUM2 as IN OUT in the ADD_NUMS( )
function. Which of the following statements may happen as a result of this?
A. The add_nums( ) function will not compile.
B. Code running after add_nums( ) that uses the NUM2 variable may behave unpredictably because
NUM2’s value was changed in add_nums( ).
C. The add_nums( ) function will return errors to the user when run.
D. The add_nums( ) function will cause a memory leak.
41. In which areas of a PL/SQL block must the developer place code for user-defined exceptions? (Choose
three)
A. Command line PL/SQL block call
B. Variable declaration section
C. Executable section
D. Exception handler
42. A procedure declares a user-defined exception but does not raise it explicitly. Which of the following
statements is true about this function?
A. The user-defined exception will never be raised.
B. The user-defined exception will be handled by a WHEN OTHERS exception handler.
C. The procedure will fail on compile.
D. The user-defined exception is defined incorrectly.
43. Which of the following lines in the PL/SQL source code will return an error?
A. create procedure estatus (
B. eid NUMBER, statchar CHAR ) is begin
C. select status into statchar from EMP where EMPID = eid; end;
D. There are no errors in this code block
44. Which of the following trigger types will be impacted by constraining factors brought on by mutating tables?
A. Row triggers only
B. Statement triggers only
C. Both row and statement triggers
D. Neither row or statement triggers
Page 14 of 11
DELETE FROM soccer_fans_snacks
END; WHERE fan_id = :old.fan_id;
Why will trigger creation fail?
A. The row trigger does not properly reference the old value in FAN_ID.
B. The statement trigger should have been defined as a row trigger.
C. The statement trigger fires after the delete statement is processed.
D. The row trigger does not properly define the associated table
46. To find information about trigger status, which of the following views are appropriate?
A. ALL_TRIGGERS
B. ALL_OBJECTS
C. ALL_TRIGGER_COLS
D. ALL_SOURCE
47. UPDATE OR DELETE ON SOCCER_FAN_SNACKS. Which two of the following keywords may be useful in
your trigger source code to distinguish what should run, and when?
A. inserting
B. updating
C. deleting
D. truncating
48. The SOCCER_FANS table has a trigger associated with it that inserts data into SOCCER_FANS_SNACKS
whenever rows are inserted into SOCCER_FANS. A foreign key constraint exists between FAN_ID on
SOCCER_FANS and SOCCER_FANS_SNACKS. What happens when the trigger fires?
A. The trigger processes normally.
B. The trigger invalidates.
C. The trigger execution fails because of a mutating or constraining table.
D. The trigger execution succeeds because the trigger is a statement trigger.
Page 15 of 11
a) The trigger fires successfully.
b) The trigger fires unsuccessfully.
c) Nothing, the SEAT_NUM column was not updated.
d) The trigger invalidates
57. The clause(s) that every SQL Server query must have is/are
A. Select
B. From
C. Where
D. Both (a) and (b)
E. (a),(b) and (c)
Page 22 of 22
B. Create, alter, drop
C. Login, logout
D. Both (a) and (b)
E. (a) , (b) and (c)
Page 23 of 22
(c) All non-matching rows of table B
(d) All non-matching rows of table A ANS-(b)
71. In a query with a GROUP BY clause, the columns in the SELECT clause
(a) must be aggregate functions only
(b) must also appear in the GROUP BY clause
(c) must also appear in the GROUP BY and HAVING clauses
(d) Both (a) and (b)
(e) Can be selected arbitrarily ANS-(d)
(a) RIS
(b) CHA
Page 24 of 22
(c) ARRIS
(d) ARR ANS-(a)
17. Identify some conversion functions. Which conversion functions are commonly used?
18. What is a table join? How is a table join produced?
19. How does an outer join remedy the situation where a lack of corresponding values in the shared column of
two tables causes rows from neither table to be selected? What is the special character used to denote
outer joins?
20. What is a self join? How might a self join be used?
21. How are group functions incorporated into select statements? How many rows of output can usually be
expected from a query using a group function?
22. What is ROWID? Is ROWID stored in a table?
23. How is the group by clause of a select statement used? (With Example)
24. Identify some situations where statements containing the group by clause return errors.
25. What is the having clause, and what function does it serve?
Page 25 of 22
26. How can the user specify values to fulfill having criteria without actually knowing what the values themselves
are?
27. What is a subquery? When might a user want to incorporate a subquery into a database select statement?
28. What are some situations where a where clause may be sufficient in place of a subquery?
29. What is variable scope? What is a local variable? What is a global variable?
30. What is the distinct keyword, and how is it used?
31. Can you use the order by clause within select statements with subqueries? Why or why not?
32. What are three types of data relationships?
33. What is functional dependency?
34. What is required of two tables in order for the tables to be related?
35. What is a relational database model?
36. What are the components of a relational database? How are they used?
37. What is an entity-relationship diagram and how is it read?
38. What is a logical data model? Identify some methods used to translate an entity-relationship diagram into a
data model.
39. What command is used to create tables?
40. What is an integrity constraint? What are the five types of integrity constraints?
41. Describe some table naming conventions.
42. What should be included in the name of a table that has a referential integrity constraint with another table,
in which the table referring to the other table is the child table?
43. What are some of the differences between the CHAR and the VARCHAR2 datatype?
44. How is data stored in the DATE datatype? What is the ROWID datatype?
45. How can a table be created with data already populated in it?
46. What is the data dictionary?
47. When can a user not change data in a table?
48. What statement is used to change the definition of a table?
49. What process is used to change a NULLable column to one with a NOT NULL constraint?
50. What are some of the rules and guidelines for changing column definitions?
51. What are some of the ways integrity constraints can be changed on a table?
52. What are some rules that must be adhered to for modification of each type of constraint?
53. What are two options for deleting data from a table?
54. Is truncating a table part of DML or DDL? Explain.
55. How is a database object name changed? What are some of the effects of renaming a table?
56. What is another way to duplicate the effect of renaming a table?
57. How can table remarks be entered and where are they stored?
58. How can you reference comments on a database object?
59. What is a sequence? What are some ways a sequence can be used?
60. What are CURRVAL and NEXTVAL? What happens to CURRVAL when NEXTVAL is selected?
61. What statement is used for creating a sequence?
62. What are the options used for sequence creation?
Page 26 of 22
63. What statement is used to modify a sequence definition?
64. When do changes to a sequence take effect?
65. What are the effects of dropping a sequence?
66. What are two reasons for using views?
67. What is a simple view? How does it differ from a complex view?
68. What statement is used to alter the definition of a view?
69. Identify two reasons for using indexes.
1. What is SGA?
2. What is PGA?
3. What is Database Buffer Cache
4. What are Redo Log Files?
5. What are procedures?
6. What are Packages?
7. How do u implement the If statement in the Select Statement
8. What are snapshots?
9. What are different types of views?
10. What are the Pct Free and Pct Used?
11. What is a 2 Phase Commit?
12. What is the difference between deleting and truncating of tables?
13. What are mutating tables?
14. What is the Difference between a post query and a pre query?
15. Can U disable database trigger? How?
16. What is clustered index?
17. What are the advantages of normalization of data?
18. What is a sequence? How is it activated? Give one use
19. What is the purpose of having an Execution section in a Package Body?
20. What is the advantage of using stored procedures?
21. What is the difference between nested query and co-related query?
22. Explain different types of views
23. Explain cursors? What are reference cursors?
24. What are some advantages of using PL/SQL to access the database?
25. Where is PL/SQL compiled and stored?
26. What is the difference between a named and an anonymous code block?
27. Identify some of the database and nondatabase datatypes in PL/SQL that can be used.
28. How can you declare PL/SQL variables without explicitly identifying the datatype? How do you declare a
variable with an initialized value?
29. How do you declare a constant? Why might you use a constant?
Page 27 of 22
30. Where can a variable be assigned a value?
31. What is the assignment operator? How does it differ from the equality operator?
32. What special characters are required for using data manipulation statements in PL/SQL?
33. What value can implicit cursor attributes serve in PL/SQL code?
34. What are some of the implicit cursor attributes a developer can use in PL/SQL?
35. How is nested conditional statement processing handled?
36. What are three different types of loops? What is an exit when statement? What is a loop counter, and for
which type of loop is it most commonly used? Which type of loop doesn’t require an explicit exit statement?
37. What is an implicit cursor and what is the syntax for creating one?
38. What is an explicit cursor? Why might a developer use an explicit cursor rather than an implicit one?
39. What is the syntax for creating an explicit cursor?
40. What must be done in order to make a cursor exist in memory?
41. What step must be accomplished to put data in a cursor?
42. How is data retrieved from a cursor?
43. What value does passing parameters to a cursor provide?
44. How can a cursor be defined to accept parameters?
45. What steps in cursor loop handling does a cursor for loop handle implicitly?
46. How is the exit condition defined for a cursor for loop?
47. What is a user-defined error? Where must code be defined in order to create a user-defined exception?
48. What is the others exception, and how is it used?
49. What syntax is used to create procedures in PL/SQL? What is the difference between is and as?
50. In what area of a named procedure is variable declaration handled?
51. What are the three ways PL/SQL will move parameters back and forth between program units?
52. Explain how each parameter passing method works in PL/SQL.
53. What syntax is used to create functions in PL/SQL?
54. What parameter passing type is not allowed in functions that is allowed in procedures?
55. What is a functions "purity level" and what are the conditions for meeting that purity level? If that level is met,
can you call the function from a SQL statement? Why or why not?
56. What command is used to run a stored procedure from the SQL prompt in SQL*Plus? What error occurs
when the procedure name is entered without this command?
57. How are functions called using SQL*Plus? How do you pass parameters out of order from how the function
or procedure defines them?
Page 28 of 22
63. Describe two things that can be identified uniquely by using raise_application_error( ).
64. Describe how exceptions are reported when the raise_application_error( ) procedure is used.
65. Dedine a database trigger. What programming language is a trigger developed with?
66. Define a stored procedure. Where are database triggers and stored procedures stored?
67. How does a database trigger differ from a stored procedure?
68. What determines when a trigger will fire with respect to its triggering event?
69. What special character must precede a reference to old or new data involved in the row trigger execution?
70. With row triggers, is it more efficient to define the trigger to fire before or after the triggering event is
complete? Why?
71. How many triggers can be attached to a table? What are the different types of triggers you can attach? What
datatype issues do you run into with triggers and the LONG datatypes?
72. What is a constraining table? A mutating table? What restrictions are there on row triggers regarding these
two situations?
Page 23 of 23
23. Consider a table : STUDENT (Name, Marks)
Write a query to retrieve 5 top scorers from the above table
24. Explain clearly, the differences between Super key, Candidate key, Primary key and alternate key with
examples
25. Describe in brief, the contents of init.ora, listener.or a, tnsnames.ora and sqlnet.ora files
26. Explain E-R Model, its drawbacks and remedies
27. What is the criteria for a DBMS to be called a full fledged RDBMS
28. Enumerate the differences between Network, Hierarchical and Relational data models giving examples of
each.
29. Explain the differences between “WITH GANT OPTION” and “WITH ADMIN OPTION” clauses
30. Define cursor and describe its types giving examples
31. Can a SELECT query be used to lock rows of a table? If yes, explain how the system can be prevented from
going into a no-operation mode.
32. Explain the various steps to be taken for processing an explicit cursor
33. What are the various cursor attributes? Explain them
34. Explain clearly, the difference between CHAR, VARCHAR, NCHAR, NVARCHAR & VARCHAR2 datatypes
35. Write a trigger that prevents a user from inserting, deleting & updating a table.
36. Describe the basic structure of a PL/SQL program
37. Enlist and explain the implicit variables available to a trigger with an example. Are these also available in a
table level trigger?
38. Explain how exceptions can be handled in a PL/SQL block
39. Explain the process by which a user-defined name can be given to a predefined exception.
40. Explain the difference between natural join, inner join, self join, outer join and
41. Equi joins.
42. Describe in brief, the various control structures available in PL/SQL
43. What is the difference between disabling and dropping a trigger and how is it done?
44. What is RAISE_APPLICATION_ERROR? When and how is it used?
45. How are exceptions explicitly generated and caught in a PL/SQL program?Explain
46. Write a trigger to count the number of logins of a particular user in a day.
47. What is a view? How is it different from a table?
48. What are the conditions for a view to be updateable?
Page 24 of 23
49. What are the advantages of a view? Is a view really stored?
50. What is de-normalization? When and why is it used?
51. What is a key-preserved and a non key-preserved table? In what context are they used? Explain with
example.
52. What are INSTEAD OF triggers? When are they used?
53. What are the various types of triggers that can be applied to a view?
54. What are named and unnamed (anonymous) PL/SQL blocks? Why are they called so?
55. What are the differences between a procedure, function & a package?
56. What are the various types of parameters that can be passed to stored procedure? Explain when each is
used.
57. Write the complete syntax of any 2 of the following ---
58. Procedure, Function and Package
59. What is a datafile? What does it contain & where is it stored?
60. What are correlated queries? Explain their application with examples
61. Consider a table EMPLOYEE (Empname, Deptname)
62. Write a query to find first 2 highly populated departments.
63. Considering above table, find departments with more than 10 employees
5. Display the names of suppliers who have sold the maximum overall quantity.
6. Get suppliers supplying atleast one part supplied by Supplier S2
7. Get all suppliers not supplying Nuts
Page 25 of 23
8. For each part supplied get partno and names of cities supplying that part.
9. Find out the total quantity supplied by each supplier.
15. Explain GROUP BY and HAVING clauses with example. Explain the scenario where these are used.
16. Describe following clauses in context of an SQL query ----
UNION INTERSECT MINUS
17. Explain the various types of constraints in a DBMS giving example of each.
18. What is a Database Management system? Explain its need and enumerate its advantages with examples
19. What is Normalization? Why is it done? Explain its advantages and disadvantages.
20. Write a note on any 2 of the following –
4NF, 5NF, BCNF
21. What are sequences? Explain with example giving the scenario where they are used.
22. What are the various phases a query goes through after it is submitted and before the result is displayed?
23. What are the various parts of a ROWID? What do they signify?
24. What is meant by partitioning of a table? Why is it done?
25. Explain the difference between column level and table level constraints with proper examples
26. Compare and contrast SQL and PL/SQL with proper reasoning.
27. What are the steps in executing a stored procedure with OUT parameters? Explain with example.
28. Explain how all the functionalities provided by various constraints can be equally achieved through triggers.
29. Write the syntax of a trigger that will fire on insert/update/delete of a particular column of a table. Is such a
trigger possible? If not, why?
30. What is the difference between a Role and a privilege? Explain the syntax of granting and revoking
privileges.
31. Consider 3 users – A, B and C. Suppose A grants certain privileges to B who then forwards them to C. Now
A revokes privileges from B. What will happen to the privileges given to C? Explain with proper reasons.
32. What are the different types of backups taken of a database? Explain the scenario when which is used.
33. Explain the problems encountered while porting software from one RDBMS to other. Also suggest how to
circumvent them.
34. What are the main components in a SQL SERVER database? Explain
35. Explain the contents and functions of login.sql file. When is it executed?
36. Describe when are the following clauses used in an SQL query with examples ---
EXISTS ANY IN
37. Can an SQL query have another sub query in its FROM clause? Describe the scenario when it might be
Page 27 of 27
used.
38. “When the exact size of data is known beforehand, the CHAR data type is preferable over VARCHAR”.
Justify
39. Describe any 5 DDL, DML and DCL statements along with examples.
40. Explain Database Triggers
41. Explain Exceptions
42. What are Table Spaces, Data Files, Parameter File, and Control Files?
Page 28 of 27