Oracle 1Z0-870 Exam Questions & Answers

Size: px
Start display at page:

Download "Oracle 1Z0-870 Exam Questions & Answers"

Transcription

1 Oracle 1Z0-870 Exam Questions & Answers Number: 1Z0-870 Passing Score: 800 Time Limit: 120 min File Version: Oracle 1Z0-870 Exam Questions & Answers Exam Name: MySQL 5.0, 5.1 and 5.5 Certified Associate Exam For Full Set of Questions please visit:

2 Passguide QUESTION 1 Adam works as a Database Administrator for Pass4sure.com. He creates a table named Students. He wants to create a new table named Class with the help of the Students table. Which of the following syntaxes will Adam use to accomplish the task? A. CREATE TABLE Class INSERT INTO SELECT * FROM Students; B. CREATE TABLE Class FROM SELECT * FROM Students; C. CREATE TABLE Class (SELECT * FROM Students); D. CREATE TABLE Class AS SELECT * FROM Students; QUESTION 2 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. You have created two tables named Employees and Departments in the database. Now, you want to display data from both tables. Which of the following actions will you perform to accomplish the task? A. Join B. Table Merge operator C. HAVING D. GROUP BY QUESTION 3 Which of the following terms is described in the statement below? "It is procedural code that is automatically executed in response to certain events on a particular table or view in a database." A. Data type B. Table C. Datetime data type D. Database trigger

3 QUESTION 4 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database development platform. You have created a table named Employees in the database. You want to display the names of the employees whose salary is more than $5000, but you do not want to display any duplicate content. Therefore, you have written the following query: SELECT emp_id, DISTINCT emp_name WHERE salary > 5000 FROM Employees; Which of the following statements is true about the above query? A. The statement will display only unique names whose salary is more than $5000. B. The UNIQUE clause should be used in place of the DISTINCT clause. C. The statement will give an error. D. The statement will display those records whose salary is more than $5000. Correct Answer: C QUESTION 5 Fill in the blank with the appropriate word. The data type defines a date that is combined with a time of day along with fractional seconds that is based on a 24-hour clock. A. datetime QUESTION 6 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as the database platform. You have created a table named Students in the database. The structure of the table is as follows:

4 Stu_ID NUMBER (3) PRIMARY KEY Stu_Name VARCHAR2 (25) NOT NULL Fee NUMBER (8, 2) Class NUMBER (5); You have executed the following statement for the table "Students": SELECT e.stu_name, m.fee FROM Students e, Students m WHERE e.stu_id = m.stu_id; Which of the following join types have you used in the above statement? A. Cross join B. Equijoin C. Self join D. Outer join Correct Answer: C QUESTION 7 Fill in the blank with the appropriate word. A specifies that the value of a column (or columns), upon which the index is based, must be unique. A. unique index QUESTION 8 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. You have created a new table named Employees, which keeps all the information of the employees. You want to add a new row to the Employees table. Which of the following statements will you use to accomplish the task? A. INSERT (column1, column2,...columnn) INTO <table_name> VALUES(value1, value2,...v aluen); B. INSERT INTO <table_name>(column1, column2,...columnn) VALUES(value1,value2,...va luen); C. INSERT <table_name>(column1, column2,...columnn), VALUES(value1, value2,...valuen ); D. INSERT INTO <table_name>(column1, column2,... columnn), VALUES(value1, value2,...v aluen);

5 Correct Answer: B QUESTION 9 Fill in the blank with the appropriate term. A provides a concise and flexible means for matching strings of text, such as particular characters, words, or patterns of characters. A. regular expression QUESTION 10 Which of the following are true about UPDATE statements? Each correct answer represents a complete solution. Choose all that apply. A. You can use the WHERE clause to have your update affects a specific set of rows. B. You use the SET clause to update multiple columns of a table separated by commas. C. You can use co-related sub query in UPDATE statements to update data from other tables. D. If you don't use the WHERE clause then the UPDATE will not update any rows in the table. BC QUESTION 11 DRAG DROP Drag and drop the correct constraint types to their corresponding specifications.

6 A. Answer: Correct Answer: QUESTION 12 Which of the following statements is correct for equijoin used to join two tables named Employees and Department? A. SELECT Dept_Name, Emp_Name FROM Departments d1, Employees e1 ORDER BY Dept_Name, Emp_Name; B. SELECT D.Dept_Name, E.Emp_Name FROM Departments d1, Employees e1 HAVING Dept_Name, Emp_Name; C. SELECT E.Emp_Name, D.Dept_Name FROM Departments d1, Employees e1 WHERE Dept_No = Dept_No

7 ORDER BY Dept_Name, Emp_Name; D. SELECT Dept_Name, Emp_Name FROM Departments d1, Employees e1 WHERE d1.dept_no = e1.dept_no ORDER BY Dept_Name, Emp_Name; QUESTION 13 Which of the following properties of concurrency control refers to the requirement that other operations cannot access or see the data in an intermediate state during the execution of a transaction? A. Consistency B. Durability C. Atomicity D. Isolation QUESTION 14 Which of the following are the types of numeric literals that can be used in arithmetic expressions? Each correct answer represents a complete solution. Choose all that apply. A. Numeric B. Integer C. Binary D. Real Correct Answer: BD QUESTION 15 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. You have written two statements, which are as follows: 1. SELECT DISTINCT OBJECT_TYPE FROM USER_OBJECTS;

8 2. SELECT OBJECT_TYPE FROM ALL_OBJECTS; Which of the following options explains the difference between the results of these two statements? Each correct answer represents a complete solution. Choose all that apply. A. The first statement will display distinct object types that can be accessed by the user. B. The second statement will display all object types that a user can access. C. The first statement will display distinct object types owned by a user. D. The second statement will display all object types owned by a user. Correct Answer: BC QUESTION 16 Which of the following will be true about a table column if you plan to create an index on that column? Each correct answer represents a complete solution. Choose all that apply. A. The column is often used in the WHERE clause of SQL statements. B. The column contains very small number of NULL values. C. The table is updated frequently. D. The column should contain a wide range of values. D QUESTION 17 Consider the exhibit given below: Which of the following queries will return the name of the customer who placed the highest amount of orders and the total order amount? A. SELECT CUSTOMER, MAX(UNITPRICE*QUANTITY) AS "TOTAL" FROM ORDERS GROUP BY CUSTOMER

9 / B. SELECT CUSTOMER, SUM(UNITPRICE*QUANTITY) AS "TOTAL" FROM ORDERS WHERE SUM(UNITPRICE*QUANTITY)= (SELECT MAX(SUM(UNITPRICE*QUANTITY)) FROM ORDERS GROUP BY CUSTOMER) GROUP BY CUSTOMER / C. SELECT CUSTOMER, SUM(UNITPRICE*QUANTITY) AS "TOTAL" FROM ORDERS GROUP BY CUSTOMER HAVING SUM(UNITPRICE*QUANTITY)= (SELECT MAX(SUM(UNITPRICE*QUANTITY)) FROM ORDERS GROUP BY CUSTOMER) / D. SELECT CUSTOMER, SUM(UNITPRICE*QUANTITY) AS "TOTAL" FROM ORDERS GROUP BY CUSTOMER HAVING SUM(UNITPRICE*QUANTITY)= (SELECT SUM(UNITPRICE*QUANTITY) FROM ORDERS GROUP BY CUSTOMER) / Correct Answer: C QUESTION 18 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. You have created a table named Employees in the database. You want to create a list of employees working in the organization, but you do not want to display any duplicate row in the report. Which of the following statements will help you to accomplish the task? A. SELECT emp_id, emp_name FROM Employees ORDER BY emp_id; B. SELECT emp_id, emp_name FROM Employees; C. SELECT DISTINCT emp_id, emp_name FROM Employees; D. SELECT emp_id, emp_name FROM Employees GROUP BY emp_id; Correct Answer: C QUESTION 19 Adam works as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. Adam has created a table named Employees in the database. He wants to retrieve the information of those employees who have at least one person reporting to them. Which of the following queries will Adam execute to accomplish the task?

10 A. SELECT employee_id, last_name, job_id, department_id FROM Employees WHERE employee_id EXISTS (SELECT manager_id WHERE manager_id is NULL); B. SELECT employee_id, last_name, job_id, department_id FROM Employees HAVING employee_id IN (SELECT manager_id FROM Employees WHERE manager_id is NOT NULL); C. SELECT employee_id, last_name, job_id, department_id FROM Employees outer WHERE EXISTS (SELECT 'x' FROM Employees WHERE manager_id = outer.employee_id); D. SELECT employee_id, last_name, job_id, department_id FROM Employees WHERE employee_id IN (SELECT manager_id WHERE manager_id is NOT NULL); Correct Answer: C QUESTION 20 You work as a Database Administrator for Pass4sure.com. The company uses the MySQL database. You have created a new table named Employees in the database and performed update operation but you got an error because of the last transaction. Now, you want to terminate the last transaction. Which of the following commands can you use to accomplish the task? Each correct answer represents a complete solution. Choose all that apply. A. ROLLBACK B. REMOVE C. DELETE D. COMMIT D QUESTION 21 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. The database contains a table named Employees. You want to remove an index named Emp_name_idx from the Employees table. Which of the following statements should you use to accomplish the task? A. DELETE INDEX Emp_name_idx; B. CANCEL INDEX Emp_name_idx; C. REMOVE INDEX Emp_name_idx; D. DROP INDEX Emp_name_idx;

11 QUESTION 22 Which of the following statements will delete all the records from the table T1? Each correct answer represents a complete solution. Choose all that apply. A. TRUNCATE TABLE T1; B. DELETE FROM T1; C. DELETE * FROM T1; D. DELETE T1; BD QUESTION 23 You work as a Database Administrator for Pass4sure.com. The company uses the MySQL database. You have created a table named Employees. The table contains the following structure. The company has three departments. A task has been assigned to you to calculate the sum of the average length of employees' last name per department. Which of the following queries will you execute to accomplish the task? A. SELECT SUM(AVG(LENGTH(last_name))) FROM Employees HAVING department_id; B. SELECT SUM(AVG(LENGTH(last_name))) FROM Employees GROUP BY department_id; C. SELECT SUM(AVG(LENGTH(last_name))) FROM Employees WHERE department_id=not NU LL; D. SELECT SUM(AVG(LENGTH(last_name))) FROM Employees ORDER BY department_id; Correct Answer: B QUESTION 24 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. You want to use group functions, so you have decided to put an alias of group functions as 'GP'. Which of the following are the correct ways to use group functions? Each correct answer represents a complete solution. Choose all that apply.

12 A. GP1(GP2(GPn(group_item))) = result B. GP1(GP2(group_item)) = result C. GP1(GP2(GP3(group_item))) = result D. GP1(group_item) = result Correct Answer: BD QUESTION 25 Adam works as a Database Administrator for Pass4sure.com. Adam has created a table named Students. In this table, Adam wants to create a column to store the fees of students. Which of the following data types will Adam use to accomplish the task? Each correct answer represents a complete solution. Choose all that apply. A. NUMBER B. NUMBER(p,s) C. DEFAULT D. BLOB B QUESTION 26 Review the following ER diagram:

13 Which of the following SQL statements will return all rows for a given CUST_ID and PROD_ID where sales of specific products on a given day are greater than 10? Additionally the list should be ordered by CUST_LAST_NAME, CUST_FIRST_NAME and PROD_NAME. A. SELECT a.cust_last_name, a.cust_first_name, b.prod_name, c.time_id FROM customers a, products b, times c, sales e WHERE a.cust_id=e.cust_id AND b.prod_id=e.prod_id AND c.time_id=e.time_id B. GROUP BY a.cust_last_name, a.cust_first_name, b.prod_name, c.time_id HAVING COUNT(*) > 10 ORDER BY a.cust_last_name, a.cust_first_name, b.prod_name, c.time_id; C. SELECT a.cust_last_name, a.cust_first_name, b.prod_name, c.time_id, COUNT(*) FROM customers a, products b, times c, sales e WHERE a.cust_id=e.cust_id AND b.prod_id=e.prod_id AND c.time_id=e.time_id GROUP BY a.cust_last_name, a.cust_first_name, b.prod_name, c.time_id HAVING COUNT(*) > 10; D. SELECT a.cust_last_name, a.cust_first_name, b.prod_name, c.time_id, COUNT(*) FROM customers a, products b, times c, sales e WHERE a.cust_id=e.cust_id AND b.prod_id=e.prod_id AND c.time_id=e.time_id GROUP BY a.cust_last_name, a.cust_first_name, b.prod_name, c.time_id HAVING COUNT(*) > 10 ORDER BY a.cust_last_name, a.cust_first_name, b.prod_name, c.time_id;

14 E. SELECT a.cust_last_name, a.cust_first_name, b.prod_name, c.time_id, COUNT(*) TOTAL FROM customers a, products b, times c, sales e WHERE a.cust_id=e.cust_id AND b.prod_id=e.prod_id AND c.time_id=e.time_id GROUP BY a.cust_last_name, a.cust_first_name, b.prod_name, c.time_id ORDER BY a.cust_last_name, a.cust_first_name, b.prod_name, c.time_id; F. SELECT a.cust_last_name, a.cust_first_name, b.prod_name, c.time_id, COUNT(*) TOTAL FROM customers a, products b, times c, sales e WHERE a.cust_id=e.cust_id AND b.prod_id=e.prod_id AND c.time_id=e.time_id AND total > 10 GROUP BY a.cust_last_name, a.cust_first_name, b.prod_name, c.time_id ORDER BY a.cust_last_name, a.cust_first_name, b.prod_name, c.time_id; Correct Answer: C QUESTION 27 Speed Inc. is a courier company. It delivers letters, parcels, and other items to their desired destination. The company wants to create a database that keeps the records of items received, items delivered, and also the information about any undelivered item. A table named Courierdetail has the following attributes: CustomerName Address ContactNumber DateOfReceiving DeliveryAcknowledgement Which of the above-mentioned attributes can be designated as the primary key? A. CustomerName B. None of the attributes can be designated as the primary key. C. Address D. ContactNumber Correct Answer: B QUESTION 28 Considering the exhibit given below: SQL> INSERT INTO T1 VALUES (10,'JOHN');

15 1 row created SQL> INSERT INTO T1 VALUES (12,'SAM'); 1 row created SQL> INSERT INTO T1 VALUES (15,'ADAM'); 1 row created SQL> SAVEPOINT A; Savepoint created SQL> UPDATE T1 2 SET NAME='SCOTT' 3 WHERE CUST_NBR=12; 1 row updated SQL> SAVEPOINT B; Savepoint created SQL> DELETE FROM T1 WHERE NAME LIKE '%A%'; 1 row deleted SQL> GRANT SELECT ON T1 TO BLAKE; Grant succeeded SQL> ROLLBACK; Rollback complete What will be the output of SELECT * FROM T1;? A. CUST_NBR NAME JOHN B. CUST_NBR NAME JOHN 12 SCOTT 15 ADAM C. CUST_NBR NAME JOHN 15 ADAM D. CUST_NBR NAME JOHN 12 SCOTT

16 QUESTION 29 Which of the following provides reliable units of work that allow correct recovery from failures and keeps a database consistent even in cases of system failure? A. Database security B. Two-phase commit C. Concurrency control D. Database transaction QUESTION 30 Which of the following functions can be performed by a view? Each correct answer represents a complete solution. Choose all that apply. A. Restrict a user to specific columns in a table. B. Contain a sub query in the FROM clause. C. Join columns from multiple tables, so that they look like a single table. D. Restrict a user to specific rows in a table. CD QUESTION 31 Mark works as a Database Administrator for Neon Inc. He issues the following query to insert rows in a table named Emp: SELECT * FROM Emp SET AUTOCOMMIT=0 INSERT INTO Emp VALUES('XXX','John',04/02/1977) INSERT INTO Emp VALUES('YYY','Richard',03/01/1977) ROLLBACK How many rows will be inserted in the Emp table after the ROLLBACK statement has been issued?

17 A. Both rows will be inserted. B. No rows will be inserted. C. Only the second row will be inserted. D. Only the first row will be inserted. Correct Answer: B QUESTION 32 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. You have created a table named Employees in the database. The table contains the following information: You want to display information about employees in the following format: First_Name, Last_Name, City Which of the following statements will you use to accomplish the task? A. SELECT CONCAT('First_Name' CONCAT(' Last_Name', 'City')) FROM Employees; B. SELECT CONCAT('First_Name' Last_Name' 'City')) FROM Employees; C. SELECT CONCAT('First_Name', ' Last_Name', 'City')) FROM Employees; D. SELECT CONCAT('First_Name', CONCAT(' Last_Name', 'City')) FROM Employees; QUESTION 33 You work as a Database Administrator for Pass4sure.com. You have created a table named Students in a database. You want to add a PRIMARY KEY constraint to the Student_ID column of the Students table. Which of the following statements will you use to accomplish the task? A. UPDATE TABLE Students ADD CONSTRAINT Stu_ID_pk PRIMARY KEY (Student_ID); B. ADD CONSTRAINT Stu_ID_pk PRIMARY KEY (Student_ID); C. ALTER TABLE Students ADD CONSTRAINT Stu_ID_pk PRIMARY KEY (Student_ID);

18 D. MODIFY CONSTRAINT Stu_ID_pk PRIMARY KEY (Student_ID); Correct Answer: C QUESTION 34 You work as a Database Administrator for Pass4sure.com. You have created a new table named Employee. Now, you want to create a view employee_view for this table. The view will contain the emp_id, emp_name, emp_desig, salary, and emp_dept of those employees whose salary is greater than $ You do not want to make changes to the column values through the view. Which of the following syntaxes will you use to accomplish the task? A. CREATE VIEW employee_view AS SELECT emp_id, emp_name, emp_desig, emp_dept FROM Employee HAVING salary > WITH READ ONLY; B. CREATE VIEW employee_view AS SELECT emp_id, emp_name, emp_desig, emp_dept FROM Employee WHERE salary > WITH CHECK OPTION CONSTRAINT; C. CREATE VIEW employee_view AS SELECT emp_id, emp_name, emp_desig, emp_dept FROM Employee WHERE salary > WITH READ ONLY; D. CREATE VIEW employee_view AS SELECT emp_id, emp_name, emp_desig, emp_dept FROM Employee ORDER BY salary > WITH READ ONLY; Correct Answer: C QUESTION 35 Which of the following prevent DML operations like INSERT, UPDATE and DELETE on a view? Each correct answer represents a complete solution. Choose all that apply. A. The use of the GROUP BY clause. B. The use of the DISTINCT keyword. C. The use of the SQL Group Functions. D. The use of the ROWNUM pseudo column.

19 BCD QUESTION 36 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. You have created a table named Employees in the database. The table has the following data. Now, you want to remove the records of those persons whose last Name is 'Smith' and first name is 'Jack' from the Employees table. Which of the following statements will you use to accomplish the task? A. REMOVE Last_Name= 'Smith' AND First_Name='Jack' FROM Employees B. DELETE Last_Name= 'Smith' AND First_Name='Jack' FROM Employees C. REMOVE FROM Employees WHERE Last_Name= 'Smith' AND First_Name='Jack' D. DELETE FROM Employees WHERE Last_Name= 'Smith' AND First_Name='Jack' QUESTION 37 Review the following ER diagram:

20 Which of the following queries will properly display the average unit_cost (rounded to two decimal places) for a given product on a Saturday and Order the results by the PROD_NAME column? A. SELECT a.prod_name, AVG(b.unit_cost) FROM products a, costs b, times c WHERE a.prod_id=b.prod_id AND c.time_id=b.time_id AND c.day_name='saturday' GROUP BY a.prod_name ORDER BY a.prod_name; B. SELECT a.prod_name, ROUND(AVG(b.unit_cost),2) FROM products a, costs b, times c WHERE a.prod_id=b.prod_id AND c.time_id=b.time_id AND c.day_name='saturday' GROUP BY a.prod_name ORDER BY a.prod_name; C. SELECT a.prod_name, ROUND(AVG(b.unit_cost),2) FROM products a, costs b, times c WHERE a.prod_id=b.prod_id AND c.time_id=b.time_id AND c.day_name='saturday'; D. SELECT a.prod_name, ROUND(AVG(b.unit_cost),2) FROM products a, costs b, times c WHERE a.prod_id=b.prod_id AND c.time_id=b.time_id AND c.day_name='saturday' ORDER BY a.prod_name; E. SELECT a.prod_name, ROUND(AVG(b.unit_cost),2) FROM products a, costs b, times c WHERE a.prod_id=b.prod_id AND c.time_id=b.time_id AND c.day_name='saturday' GROUP BY a.prod_name ORDER BY ROUND(AVG(b.unit_cost),2);

21 Correct Answer: B QUESTION 38 Which of the following SQL functions may require the use of a GROUP BY clause in a SELECT statement? Each correct answer represents a complete solution. Choose all that apply. A. AVG B. TO_NUMBER C. LOWER D. SUM E. TO_CHAR D QUESTION 39 You work as a Database Administrator for Pass4sure.com. You create a database that has a table named Students. The table is used for storing the records of students. Due to security reasons, you want to permanently remove all data from the table without removing the table structure. Which of the following will you use to accomplish the task? Each correct answer represents a complete solution. Choose all that apply. A. REMOVE TABLE FROM Students; B. DROP TABLE FROM Students; C. TRUNCATE TABLE Students; D. DELETE FROM Students; Correct Answer: CD QUESTION 40 Which of the following clauses is used with the CREATE VIEW statement? A. ORDER BY B. WITH CHECK OPTION

22 C. GROUP BY D. WHERE Correct Answer: B QUESTION 41 Which of the following clauses is used with the CREATE VIEW statement? A. ORDER BY B. GROUP BY C. WITH CHECK OPTION D. WHERE Correct Answer: C QUESTION 42 You work as a Database Administrator for Realtech Inc. A database has a table named Product. The auto commit mode of the database is turned off. You want to perform an update on the Product table. Which of the following queries will permanently save the changed value of ProductID in the table? 1. UPDATE Product SET COST=49.90 WHERE ProductID='121' 2. UPDATE Product SET COST=49.90 WHERE ProductID='121' COMMIT A. Only Query 1 will save the changes permanently. B. Both the queries will successfully change the value, but only Query 1 will permanently store the value in the database. C. Both the queries will successfully change the value of ProductID='121'. D. Both the queries will successfully change the value, but only Query 2 will permanently store the value in the database.

23 QUESTION 43 You work as a Database Administrator for Pass4sure.com. You have written the following code for creating a view: CREATE VIEW Student_View AS SELECT Stu_ID, Stu_Description FROM Students WHERE Stu_ID = 512 ORDERED BY Stu_Description; After executing the above code, you got an error. Which of the following statements is incorrect in the view? A. ORDERED BY Stu_Description; B. WHERE Stu_ID = 512 C. CREATE VIEW Student_View D. AS SELECT Stu_ID, Stu_Description QUESTION 44 Which of the following statements is true about the GROUP BY clause? A. It returns a single row of information for each group of rows. B. It guarantees the order of the result set. C. It encourages duplicate rows for the grouping column(s). D. It automatically sorts the grouped result in descending order. QUESTION 45 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. You have created a table named Employees in the database. The structure of the table is as follows:

24 Now, you want to rename the Emp_join_date column to Joining_date. Which of the following statements is true according to the scenario? A. The column can be renamed by using the UPDATE statement. B. The column can be renamed by using the ALTER TABLE statement. C. The column can be renamed by using the TRUNCATE statement. D. The column can be renamed by using the RENAME statement. Correct Answer: B QUESTION 46 Which of the following statements will a user use to display a database in MySQL? A. DISPLAY DATABASES; B. SELECT * FROM DATABASES; C. SHOW DATABASE; D. VIEW DATABASES; Correct Answer: C QUESTION 47 What kind of join automatically joins two or more tables based on common column names? A. Self Join B. Inner Join C. Natural Join D. Equi-join Correct Answer: C

25 QUESTION 48 You are designing a database application for a telephone company. The company wants to provide online billing enquiry to its customers. Each customer has a unique Login and Password, which he/she will enter to log on to the site. After logging in, a customer will be allowed to view only his/her bill. Which of the following actions will you perform during application development? A. Create an integrity constraint B. Create an index C. Create a view D. Create a stored procedure QUESTION 49 All of the following statements are true about a unique index except for which one? A. It must be unique for all columns of a table. B. It should not be explicitly defined for tables. C. It must be created only for columns having PRIMARY KEY or UNIQUE constraints. D. It cannot be created by itself. E. It cannot be ensured that the combination of all values contained in the index is unique. Correct Answer: E QUESTION 50 Which of the following is required to manage multiple users accessing the same groups of resources with the least possible overhead, either optimized for a specific task, or for general purpose? A. Database transaction B. Two-phase commit C. Concurrency control D. Authentication Correct Answer: C

26 QUESTION 51 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database development platform. You have created a table named Employees in the database and you perform the UPDATE operation to update the rows of all employees whose salary is greater than$5,000. Due to some unavoidable circumstances, you have to undo the last transaction. Which of the following commands should you use to accomplish the task? A. ROLLBACK B. DELETE C. UNDO D. COMMIT QUESTION 52 Which of the following syntaxes will a user use to remove a database in MySQL? A. CANCEL DATABASE [IF EXISTS] database_name; B. REMOVE DATABASE [IF EXISTS] database_name; C. DELETE DATABASE [IF EXISTS] database_name; D. DROP DATABASE [IF EXISTS] database_name; QUESTION 53 Which of the following statements are true about group functions? Each correct answer represents a complete solution. Choose all that apply. A. Group functions return a single result based on a number of rows as opposed to the single row functions. B. Different group functions are AVG, COUNT, MAX, MIN, STDDEV, SUM, and VARIANCE. C. All group functions except the COUNT (*) and GROUPING functions ignore NULL values. D. The NVL function forces group functions to include duplicate values. BC

27 QUESTION 54 Which of the following comprises a unit of work performed within a database management system against a database, and treated in a coherent and reliable way independent of other transactions? A. ORDER BY B. HAVING C. GROUP BY D. Database transaction QUESTION 55 DRAG DROP Drag and drop the correct ACID properties to their corresponding specifications. A. Answer:

28 Correct Answer: QUESTION 56 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. You have created a table named Employees in the database. Now, you want to display information about indexes in the Employees table. Which of the following commands will you use to accomplish the task? A. % mysqlshow --keys db_name table_name B. % mysqlshow --status db_name table_name C. % mysqlshow --status table_name D. % mysqlshow db_name table_name QUESTION 57 You work as a Database Administrator for Pass4sure.com. The management instructs you to check the transaction in DBMS to guarantee that either all of the tasks of a transaction are performed or none of them are. Which of the following properties will you use to accomplish the task? A. Durability B. Consistency

29 C. Atomicity D. Isolation Correct Answer: C QUESTION 58 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. You have created a table named Employees. You want to insert a row in the table. The structure of the table is as follows: Emp_ID NUMBER PRIMARY KEY Emp_Name VARCHAR2 (30) Emp_Address VARCHAR2 (40) Which of the following statements can you use to accomplish the task? Each correct answer represents a complete solution. Choose all that apply. A. INSERT INTO Employees VALUES (100, 'Adam', 'California'); B. INSERT INTO Employees ('Adam', 'California'); C. INSERT INTO Employees (Emp_Name, Emp_Address) VALUES ('Adam', 'California'); D. INSERT INTO Employees (Emp_ID, Emp_Name, Emp_Address) VALUES (100, 'Adam', 'California'); D QUESTION 59 Which of the following update statements will change the salary and job title of employee Scott to that of Adams? Each correct answer represents a complete solution. Choose all that apply. A. UPDATE EMP SET (SAL,JOB)=(SELECT SAL,JOB FROM EMP WHERE ENAME='SCOTT') WHERE ENAME='ADAMS'; B. UPDATE EMP SET SAL=(SELECT SAL FROM EMP WHERE ENAME='ADAMS'), JOB=(SELECT JOB FROM EMP WHERE ENAME='ADAMS') WHERE ENAME='SCOTT'; C. UPDATE EMP SET JOB=(SELECT JOB FROM EMP WHERE ENAME='ADAMS'), SAL=(SELECT SAL FROM EMP WHERE ENAME='ADAMS') WHERE ENAME='SCOTT'; D. UPDATE EMP SET (SAL,JOB)=(SELECT SAL,JOB FROM EMP WHERE ENAME='ADAMS') WHERE ENAME='SCOTT';

30 Correct Answer: BCD QUESTION 60 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. You have created a table named Employees and want to retrieve the days of the week on which more than 7 members were hired, as well as the exact number of employees hired on those days. Which of the following queries will you execute to accomplish the task? A. SELECT TO_CHAR(Emp_hire_date, 'day') Emp_hire_day, COUNT(*) FROM EMPLOYEES GROUP BY TO_CHAR(Emp_hire_date, 'day') ORDER BY COUNT(*) >7; B. SELECT TO_CHAR(Emp_hire_date, 'day') Emp_hire_day, COUNT(*) FROM EMPLOYEES GROUP BY TO_CHAR(Emp_hire_date, 'day') HAVING COUNT(*) >7; C. SELECT TO_CHAR(Emp_hire_date, 'day') Emp_hire_day, COUNT(*) FROM EMPLOYEES GROUP BY TO_CHAR(Emp_hire_date, 'day') & COUNT(*) >7; D. SELECT TO_CHAR(Emp_hire_date, 'day') Emp_hire_day, COUNT(*) FROM EMPLOYEES GROUP BY TO_CHAR(Emp_hire_date, 'day') WHERE COUNT(*) >7; Correct Answer: B QUESTION 61 Which of the following operators is used to check if the field values are included in a specified comma-delimited list? A. LIKE B. OR C. BETWEEN D. IN QUESTION 62 Which of the following methods is used to search a string based on a regular expression?

31 A. match() B. discover() C. find() D. seek() QUESTION 63 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. You have written the following MySQL statement to calculate the salary of employees: SELECT (5000+((base_salary*5.0)/100)) FROM Employees; What will happen if you remove the parentheses from the statement? A. The output will be more than the desired output. B. A syntax error will occur. C. The output will be less than the desired output. D. The same value will be displayed. QUESTION 64 Which of the following is the correct syntax for the DESCRIBE command? A. DESC[RIBE] {[schema.] table_name} B. DESC[RIBE] {[schema.entity] WHERE [@net_service_name]} C. DESC[RIBE] {[schema.] Object. table_name} D. DESC[RIBE] {[schema.] Object [@net_service_name]} QUESTION 65 Which of the following statements can be used to outer-join a table to itself? A. SELECT E1.EMPLOYEE_ID, E1.MANAGER_ID, E2.EMPLOYEE_ID FROM EMPLOYEES E1, EMPLOYEES E2 WHERE E1.MANAGER_ID(+) = E2.EMPLOYEE_ID;

32 B. SELECT EMPLOYEE_ID, MANAGER_ID FROM EMPLOYEES WHERE MANAGER_ID = (+) EMPLOYEES.EMPLOYEE_ID; C. SELECT EMPLOYEE_ID, MANAGER_ID FROM EMPLOYEES (+) WHERE EMPLOYEES.MANAGER_ID = EMPLOYEES.EMPLOYEE_ID; D. SELECT EMPLOYEE_ID, MANAGER_ID FROM EMPLOYEES WHERE EMPLOYEES.MANAGER_ID(+) = EMPLOYEES.EMPLOYEE_ID; QUESTION 66 Oliver works as a Database Administrator for ADO Inc. He manages the database of the company. The database has a table named Product. He wants to perform some delete operations on the table. He issues the following SQL query: SAVEPOINT NP1 DELETE FROM Product WHERE ProductID='112' SAVEPOINT NP2 DELETE FROM Product WHERE ProductID='90' SAVEPOINT NP3 DELETE FROM Product WHERE ProductID='113' After three deletions, he changes his mind and issues the following command: ROLLBACK to NP2 What affect will this command have on the database? A. It will delete the records having ProductID as 112 and 113. B. It will delete the record where ProductID is 112. C. All the changes will be reverted, i.e. no records will be deleted from the table. D. It will delete the record where ProductID is 90. Correct Answer: B QUESTION 67 Which of the following data types can be used in MySQL? Each correct answer represents a complete solution. Choose all that apply.

33 A. Date and Time B. Function C. Numeric D. String CD QUESTION 68 If you want to create a simple database view on which other privileged users should not be able to perform DML operations, then which of the following options will you choose? Each correct answer represents a complete solution. Choose all that apply. A. Create the view as a Complex View. B. Grant only SELECT access on the view to users. C. Create the view with the WITH READ ONLY option. D. Create the view with the WITH CHECK OPTION option. Correct Answer: BC QUESTION 69 You work as a Database Administrator for Pass4sure.com. You have created a view named student_view from the Student table. You want to retrieve data from the view. Which of the following statements will you use to accomplish the task? A. SELECT FROM student_view B. SELECT * FROM Student WHERE VIEW_NAME ='student_view' C. SELECT * FROM student_view D. SELECT * FROM VIEW WHERE VIEW_NAME = 'student_view' Correct Answer: C QUESTION 70 Fill in the blank with the appropriate word. are important for database integrity, because they mean that the database can be restored to a clean copy even after erroneous operations are performed.

34 A. Rollbacks QUESTION 71 Fill in the blank with the appropriate word. A is a named group of privileges such as object, system, and role privileges, which can be granted to a user or to another role. A. role QUESTION 72 Which of the following functions may require the use of the GROUP BY clause? Each correct answer represents a complete solution. Choose all that apply. A. SUBSTR B. LOWER C. AVG D. COUNT E. SUM Correct Answer: CDE QUESTION 73 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database development platform. You have created a table named Employees in the database. You are assigned the task to create a report that will contain the first name of employees who are working as Marketing Managers for the organization. The structure of the table is as follows:

35 Which of the following statements will you use to accomplish the task? A. SELECT First_name FROM Employees WHERE Desig_id = 'Mar_man'; B. SELECT First_name FROM Employees WHERE Desig_id = Mar_Man; C. SELECT First_name FROM Employees HAVING Desig_id = 'Mar_Man'; D. SELECT First_name FROM Employees WHERE Desig_id = 'Mar_Man'; QUESTION 74 You work as a Database Administrator for Pass4sure.com. You have created a table named Employees and an index named emp_index. You find that the index is not working properly and thus you want to remove it. Which of the following statements will you use to accomplish the task? A. REMOVE INDEX emp_index B. DELETE INDEX emp_index C. CANCEL INDEX emp_index D. DROP INDEX emp_index QUESTION 75 You work as a Database Administrator for Pass4sure.com. You have created a new table named Students. You want to create a foreign key constraint on the student_id in the Students table. Which of the following statements will you follow to accomplish the task? A. Use the MODIFY TABLE command with the ADD clause on the Students table. B. Use the ALTER TABLE command with the ADD clause on the Students table. C. Use the UPDATE TABLE command with the ADD clause on the Students table. D. Use the CHANGE TABLE command with the ADD clause on the Students table. Correct Answer: B

36 QUESTION 76 Fill in the blank with the appropriate word. An is a combination of values, variables, operators, and functions that are interpreted according to some particular rules of precedence and of association for a particular programming language, which first computes and then produces another value. A. expression QUESTION 77 Relational Database Management System supports a mechanism known as concurrency control and locking for sharing of data. Which of the following are achieved through concurrency control and locking? Each correct answer represents a complete solution. Choose three. A. Consistency B. Isolation C. Referential Integrity D. Atomicity BD QUESTION 78 Samuel designs a database for a production company. He creates a table as follows: CREATE TABLE Product (Product_No number(10) CONSTRAINT Prod_Product_No_pk PRIMARY KEY, Product_ID number(10) CONSTRAINT prod_product_id_nk NOT NULL); For which column of the table will an index be created? A. No index will be created. B. An index will be created for the Product_ID column. C. An index will be created for the Product_No column. D. A unique index will be created for the Product_ID column.

37 Correct Answer: C QUESTION 79 Which of the following conditions is true if you are using the DROP TABLE command to delete a table? A. Only data from the table will be deleted, not the table structure. B. The structure of the table will not be deleted if there is data in it. C. The structure of the table and all the data from the table will be deleted, but can be rolled back and restored. D. The structure of the table and all the data in the table will be deleted, and cannot be rolled back and restored. QUESTION 80 Which of the following statements are true about a view? Each correct answer represents a complete solution. Choose all that apply. A. A sub query that is used in a complex view definition cannot contain joins or group functions. B. The OR REPLACE option is used to change the definition of an existing view without dropping and recreating it. C. The WITH CHECK OPTION constraint can be used in a view definition to restrict the columns displayed through the view. D. A view can be dropped and then re-created. Correct Answer: BD QUESTION 81 You work as a Database Administrator for Pass4sure.com. You have written the following statement: SELECT 'Student Name:' Stud_Name FROM Students WHERE Stud_ID = 50; Which of the following will be treated as a number literal in the SELECT statement? A. 50

38 B. Stud_ID C. Student Name D. QUESTION 82 Adam works as a Database Administrator for Pass4sure.com. He creates a table named Students. The structure of the Students table is as follows: CREATE TABLE Students ( Stud_ID NUMBER(3) NOT NULL, Stud_Name VARCHAR2(25) NOT NULL, Stud_Phone VARCHAR2(9) NOT NULL, Stud_Address VARCHAR2(50)); Adam wants to restrict the values in the Stud_Phone column to numeric. Which of the following statements are true if Adam wants to modify the structure of the Students table so that the data type of the Stud_Phone column changes from VARCHAR2 to NUMBER? Each correct answer represents a complete solution. Choose two. A. Adam cannot modify the data type of the column if there is data in the column. B. Adam can modify the data type of the column by using the UPDATE command. C. Adam cannot modify the data type of the column but can increase the length of the column even if there is data in the column. D. Adam can modify the data type of the column by using the CHANGE command. C QUESTION 83 Which of the following statements are true about a table name? Each correct answer represents a complete solution. Choose all that apply. A. It can contain only three special characters: the dollar sign ($), the underscore (_), and the pound sign (#). B. It must begin with an alphanumeric character and may contain a digit. C. It should be unique, meaningful, and descriptive. D. It can be up to 45 characters long. BC

39 QUESTION 84 Which of the following are true about DELETE and TRUNCATE statements? Each correct answer represents a complete solution. Choose all that apply. A. TRUNCATE can drop the storage being used by the table. B. DELETE statements require a COMMIT to confirm the DELETE. C. DELETE should be used when a conditional delete is to be performed. D. TRUNCATE is better if all the rows are to be deleted from a table. BCD QUESTION 85 For which of the following database objects can you create a synonym? Each correct answer represents a complete solution. Choose all that apply. A. Views B. Sequences C. User defined object types D. Another synonym BCD QUESTION 86 Consider the following exhibit: SQL> DESC Employee

40 SQL> SELECT * FROM Employee; 14 rows selected The Employee table has 14 rows. You want to retrieve the names of all employees and their managers. Therefore, you issued the following query: SELECT e.ename, m.ename FROM employee e INNER JOIN employee m ON e.manager_id = m.employee_id; How many records will the above query retrieve? A. 14 B. 1 C. 13 D. 0

41 Correct Answer: C QUESTION 87 You want to display records from two tables without validating whether the records match or not. Which of the following types of join will you use? A. MERGE JOIN B. OUTER JOIN C. CROSS JOIN D. FULL OUTER JOIN QUESTION 88 Review the following table descriptions: SQL> desc products SQL> desc sales SQL> desc customers

42 Which of the following SQL statements would correctly return the sum of all sales (QUANTITY_SOLD and AMOUNT_SOLD) for all products that contain the words 'Martial Arts' (PROD_NAME column) and all customers with a last name (CUST_LAST_NAME column) that contains the string 'Die'? A. SELECT a.cust_id, a.cust_last_name, SUM(c.quantity_sold), SUM(c.amount_sold) FROM customers a, sales c WHERE a.cust_id=c.cust_id AND c.prod_id IN (SELECT prod_id FROM products z WHERE UPPER(z.prod_name) LIKE 'MARTIAL ARTS%') AND UPPER(a.cust_last_name) LIKE 'DIE%'; B. SELECT a.cust_id, a.cust_last_name, SUM(c.quantity_sold), SUM(c.amount_sold) FROM customers a, sales c WHERE a.cust_id=c.cust_id AND c.prod_id IN (SELECT prod_id FROM products z WHERE UPPER(z.prod_name) LIKE 'MARTIAL ARTS%') AND UPPER(a.cust_last_name) LIKE 'DIE%' GROUP BY a.cust_id, a.cust_last_name; C. SELECT a.cust_id, a.cust_last_name, c.quantity_sold, c.amount_sold FROM customers a, sales c WHERE c.prod_id=b.prod_id AND a.cust_id=c.cust_id AND UPPER(products.prod_name) LIKE 'MARTIAL ARTS%' AND UPPER(a.cust_last_name) LIKE 'DIE%'; D. SELECT a.cust_id, a.cust_last_name, sum(c.quantity_sold), sum(c.amount_sold) FROM customers a, sales c WHERE a.cust_id=c.cust_id AND c.prod_id IN (select prod_id FROM products z WHERE UPPER(z.prod_name) LIKE 'MARTIAL ARTS') AND UPPER(a.cust_last_name) LIKE 'DIE' GROUP BY a.cust_id, a.cust_last_name; Correct Answer: B QUESTION 89 Fill in the blank with the appropriate term. The clause groups selected rows on the basis of values of specified column(s) for each row, and returns a single row of summary information for each group. A. GROUP BY

43 QUESTION 90 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database development platform. You have created a table named Employees in the database. You want to insert a row in the table. To accomplish the task, you have written an INSERT statement. Which of the following options will be followed by the input data in the INSERT statement? A. INTO B. INSERT C. VALUES D. TABLE QUESTION 91 Which type of join contains a join condition that uses an equality operator to process the join condition? A. Non Equijoin B. Cartesian product C. Equijoin D. Self join Correct Answer: C QUESTION 92 Fill in the blank with the appropriate word. An is a data structure that improves the performance of queries issued against a table. A. index

44 QUESTION 93 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as the database development platform. You have created a database named Employee. Which of the following statements will prevent you from getting error messages if a database with the given name already exists on the database server? A. CREATE DATABASE NOT EXISTS Employee; B. CREATE DATABASE NONAME EXISTS Employee; C. CREATE DATABASE IF NONAME EXISTS Employee; D. CREATE DATABASE IF NOT EXISTS Employee; QUESTION 94 You work as a Database Administrator for Pass4sure.com. You have created a table named Students in the database. Following are the data contained in this table: You have written the following query to retrieve records from the Students table: SELECT Stu_ID, Last_Name, SUM(Fees) FROM Students WHERE Fees < 3000 GROUP BY Class ORDER BY Last_Name; You get an error on executing the query. Which of the following is the cause of the error? A. ORDER BY Last_Name B. WHERE Fees < 3000

45 C. GROUP BY Class D. FROM Students Correct Answer: C QUESTION 95 You work as a Database Designer for RealTech Inc. You have to design the database of a bank. The database has two tables: Employee and Department. The Employee table has the following attributes: l EmpID (PK) l DeptID (FK) l Name l DateOfBirth l Designation The Department table has the following attributes: l DeptID (PK) l DepartmentName DeptID is the primary key (PK) of the Department table, whereas, after migration, in the above Employee table, it is the foreign key (FK). What does migration of the DeptID attribute to the child table Employee ensure? A. It ensures referential integrity. B. It ensures faster data retrieval. C. It ensures atomicity. D. It ensures domain integrity. QUESTION 96 Which of the following properties of the database transaction has been defined in the given statement: "Either all the changes or no changes have been made in the database." A. Atomicity B. Isolation C. Durability

46 D. Consistency QUESTION 97 You work as a Database Administrator for Pass4sure.com. You have created a table named Student. You want to create a view named student_view for this table. Which of the following syntaxes will you use to accomplish the task? A. CREATE OR REPLACE VIEW My_view... B. CREATE VIEW student_view... C. Insert VIEW student_view... D. CREATE student_view VIEW... Correct Answer: B QUESTION 98 Which of the following are the attributes of a simple view? Each correct answer represents a complete solution. Choose all that apply. A. It fetches data from two or more tables. B. It does not have any usage of SQL group functions or grouping of data. C. It fetches data from one database table only. D. DML operations are allowed on the view. Correct Answer: BCD QUESTION 99 Which of the following statements is true about the UNION operator? A. The UNION operator is similar to the OUTER JOIN operator. B. The UNION operator cannot be used for more than two tables. C. The UNION operator is based on the relationship between the two tables. D. The UNION operator is used to combine the result-sets.

47 QUESTION 100 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. You have created a table named Employee in the Sales database. Under unavoidable circumstances, you have to change the structure of the Employee table. Before changing the structure, you want to copy the data to a new table. For this, you have created a table named NewEmp with the same structure. Which of the following statements will you use to copy all the data from Employee to NewEmp? A. INSERT NewEmp SELECT * FROM Employee; B. INSERT INTO NewEmp FROM Employee; C. INSERT NewEmp FROM Employee; D. INSERT INTO NewEmp SELECT * FROM Employee; QUESTION 101 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. You want to use group functions, so you have decided to put an alias of group functions as 'GP'. Which of the following are the correct ways to use group functions? Each correct answer represents a complete solution. Choose all that apply. A. GP1(group_item) = result B. GP1(GP2(GP3(group_item))) = result C. GP1(GP2(group_item)) = result D. GP1(GP2(GPn(group_item))) = result C QUESTION 102 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. The database contains a table named Employees. You want to remove an index named Emp_name_idx from the Employees table. Which of the following statements should you use to accomplish the task? A. DELETE INDEX Emp_name_idx; B. CANCEL INDEX Emp_name_idx; C. REMOVE INDEX Emp_name_idx;

48 D. DROP INDEX Emp_name_idx; QUESTION 103 You work as a Database Administrator for Pass4sure.com. The company uses the MySQL database. You have created a table named Employees. The table contains the following structure. The company has three departments. A task has been assigned to you to calculate the sum of the average length of employees' last name per department. Which of the following queries will you execute to accomplish the task? A. SELECT SUM(AVG(LENGTH(last_name))) FROM Employees ORDER BY department_id; B. SELECT SUM(AVG(LENGTH(last_name))) FROM Employees WHERE department_id=not NU LL; C. SELECT SUM(AVG(LENGTH(last_name))) FROM Employees HAVING department_id; D. SELECT SUM(AVG(LENGTH(last_name))) FROM Employees GROUP BY department_id; QUESTION 104 Which of the following terms is described in the statement below? "It is procedural code that is automatically executed in response to certain events on a particular table or view in a database." A. Database trigger B. Datetime data type C. Table D. Data type

49 QUESTION 105 You work as a Database Administrator for Pass4sure.com. You have created a table named Employees and an index named emp_index. You find that the index is not working properly and thus you want to remove it. Which of the following statements will you use to accomplish the task? A. DELETE INDEX emp_index B. REMOVE INDEX emp_index C. CANCEL INDEX emp_index D. DROP INDEX emp_index QUESTION 106 You work as a Database Administrator for Pass4sure.com. You have created a table named Students in a database. You want to add a PRIMARY KEY constraint to the Student_ID column of the Students table. Which of the following statements will you use to accomplish the task? A. UPDATE TABLE Students ADD CONSTRAINT Stu_ID_pk PRIMARY KEY (Student_ID); B. MODIFY CONSTRAINT Stu_ID_pk PRIMARY KEY (Student_ID); C. ALTER TABLE Students ADD CONSTRAINT Stu_ID_pk PRIMARY KEY (Student_ID); D. ADD CONSTRAINT Stu_ID_pk PRIMARY KEY (Student_ID); Correct Answer: C QUESTION 107 What kind of join automatically joins two or more tables based on common column names? A. Equi-join B. Inner Join C. Self Join D. Natural Join

50 QUESTION 108 Review the following ER diagram: Which of the following queries will properly display the average unit_cost (rounded to two decimal places) for a given product on a Saturday and Order the results by the PROD_NAME column? A. SELECT a.prod_name, AVG(b.unit_cost) FROM products a, costs b, times c WHERE a.prod_id=b.prod_id AND c.time_id=b.time_id AND c.day_name='saturday' GROUP BY a.prod_name ORDER BY a.prod_name; B. SELECT a.prod_name, ROUND(AVG(b.unit_cost),2) FROM products a, costs b, times c WHERE a.prod_id=b.prod_id AND c.time_id=b.time_id AND c.day_name='saturday'; C. SELECT a.prod_name, ROUND(AVG(b.unit_cost),2) FROM products a, costs b, times c WHERE a.prod_id=b.prod_id AND c.time_id=b.time_id AND c.day_name='saturday D. GROUP BY a.prod_name ORDER BY ROUND(AVG(b.unit_cost),2); E. SELECT a.prod_name, ROUND(AVG(b.unit_cost),2) FROM products a, costs b, times c WHERE a.prod_id=b.prod_id AND c.time_id=b.time_id AND c.day_name='saturday' GROUP BY a.prod_name ORDER BY a.prod_name; F. SELECT a.prod_name, ROUND(AVG(b.unit_cost),2) FROM products a, costs b, times c WHERE a.prod_id=b.prod_id

51 AND c.time_id=b.time_id AND c.day_name='saturday' ORDER BY a.prod_name; QUESTION 109 Which of the following is the correct syntax for the DESCRIBE command? A. DESC[RIBE] {[schema.] Object. table_name} B. DESC[RIBE] {[schema.] Object C. DESC[RIBE] {[schema.] table_name} D. DESC[RIBE] {[schema.entity] WHERE Correct Answer: B QUESTION 110 Which of the following are true about UPDATE statements? Each correct answer represents a complete solution. Choose all that apply. A. You can use co-related sub query in UPDATE statements to update data from other tables. B. If you don't use the WHERE clause then the UPDATE will not update any rows in the table. C. You use the SET clause to update multiple columns of a table separated by commas. D. You can use the WHERE clause to have your update affects a specific set of rows. CD QUESTION 111 Which of the following INSERT statements is correct? A. INSERT INTO Employees VALUES (1001, 'Maria', '100 Park Street', '17-JUN-99'); B. INSERT INTO Employees VALUES (1001, 'Maria', '100 Park Street', '17-JUN-99') C. INSERT Employees (1001, 'Maria', '100 Park Street', '17-JUN-99'); D. INSERT INTO Employees VALUES (1001, Maria, 100 Park Street, '17-JUN-99');

52 QUESTION 112 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. You have created a table named Employees. You want to insert a row in the table. The structure of the table is as follows: Emp_ID NUMBER PRIMARY KEY Emp_Name VARCHAR2 (30) Emp_Address VARCHAR2 (40) Which of the following statements can you use to accomplish the task? Each correct answer represents a complete solution. Choose all that apply. A. INSERT INTO Employees ('Adam', 'California'); B. INSERT INTO Employees VALUES (100, 'Adam', 'California'); C. INSERT INTO Employees (Emp_Name, Emp_Address) VALUES ('Adam', 'California'); D. INSERT INTO Employees (Emp_ID, Emp_Name, Emp_Address) VALUES (100, 'Adam', 'California'); Correct Answer: BD QUESTION 113 Relational Database Management System supports a mechanism known as concurrency control and locking for sharing of data. Which of the following are achieved through concurrency control and locking? Each correct answer represents a complete solution. Choose three. A. Isolation B. Consistency C. Atomicity D. Referential Integrity BC QUESTION 114 Which of the following clauses is used with the CREATE VIEW statement?

53 A. ORDER BY B. WHERE C. WITH CHECK OPTION D. GROUP BY Correct Answer: C QUESTION 115 Adam works as a Database Administrator for Pass4sure.com. He creates a table named Students. He wants to create a new table named Class with the help of the Students table. Which of the following syntaxes will Adam use to accomplish the task? A. CREATE TABLE Class INSERT INTO SELECT * FROM Students; B. CREATE TABLE Class AS SELECT * FROM Students; C. CREATE TABLE Class (SELECT * FROM Students); D. CREATE TABLE Class FROM SELECT * FROM Students; Correct Answer: B QUESTION 116 Which of the following statements will a user use to display a database in MySQL? A. SHOW DATABASE; B. SELECT * FROM DATABASES; C. VIEW DATABASES; D. DISPLAY DATABASES; QUESTION 117 Consider the following exhibit: SQL> DESC Employee

54 The Employee table has 14 rows. You want to retrieve the names of all employees and their managers. Therefore, you issued the following query: SELECT e.ename, m.ename FROM employee e INNER JOIN employee m ON e.manager_id = m.employee_id; How many records will the above query retrieve? A. 1 B. 0

55 C. 13 D. 14 Correct Answer: C QUESTION 118 Which of the following methods is used to search a string based on a regular expression? A. find() B. discover() C. seek() D. match() QUESTION 119 You work as a Database Administrator for Pass4sure.com. You have created a table named Student. You want to create a view named student_view for this table. Which of the following syntaxes will you use to accomplish the task? A. CREATE student_view VIEW... B. CREATE OR REPLACE VIEW My_view... C. CREATE VIEW student_view... D. Insert VIEW student_view... Correct Answer: C QUESTION 120 Which of the following clauses is used with the CREATE VIEW statement? A. WHERE B. ORDER BY C. WITH CHECK OPTION D. GROUP BY Correct Answer: C

56 QUESTION 121 Which of the following statements are true about a table name? Each correct answer represents a complete solution. Choose all that apply. A. It can be up to 45 characters long. B. It should be unique, meaningful, and descriptive. C. It can contain only three special characters: the dollar sign ($), the underscore (_), and the pound sign (#). D. It must begin with an alphanumeric character and may contain a digit. Correct Answer: BCD QUESTION 122 Which of the following statements will delete all the records from the table T1? Each correct answer represents a complete solution. Choose all that apply. A. DELETE * FROM T1; B. DELETE T1; C. DELETE FROM T1; D. TRUNCATE TABLE T1; Correct Answer: BCD QUESTION 123 Adam works as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. Adam has created a table named Employees in the database. He wants to retrieve the information of those employees who have at least one person reporting to them. Which of the following queries will Adam execute to accomplish the task? A. SELECT employee_id, last_name, job_id, department_id FROM Employees outer WHERE EXISTS (SELECT 'x' FROM Employees WHERE manager_id = outer.employee_id); B. SELECT employee_id, last_name, job_id, department_id FROM Employees WHERE employee_id IN (SELECT manager_id WHERE manager_id is NOT NULL); C. SELECT employee_id, last_name, job_id, department_id FROM Employees HAVING employee_id IN (SELECT manager_id FROM Employees WHERE manager_id is NOT NULL); D. SELECT employee_id, last_name, job_id, department_id FROM Employees WHERE employee_id EXISTS (SELECT manager_id WHERE manager_id is NULL);

57 QUESTION 124 If you want to create a simple database view on which other privileged users should not be able to perform DML operations, then which of the following options will you choose? Each correct answer represents a complete solution. Choose all that apply. A. Create the view as a Complex View. B. Create the view with the WITH READ ONLY option. C. Grant only SELECT access on the view to users. D. Create the view with the WITH CHECK OPTION option. Correct Answer: BC QUESTION 125 Which of the following SQL functions may require the use of a GROUP BY clause in a SELECT statement? Each correct answer represents a complete solution. Choose all that apply. A. TO_CHAR B. LOWER C. SUM D. AVG E. TO_NUMBER Correct Answer: CD QUESTION 126 Fill in the blank with the appropriate word. are important for database integrity, because they mean that the database can be restored to a clean copy even after erroneous operations are performed. A. Rollbacks

58 QUESTION 127 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database development platform. You have created a table named Employees in the database. You want to insert a row in the table. To accomplish the task, you have written an INSERT statement. Which of the following options will be followed by the input data in the INSERT statement? A. INSERT B. TABLE C. INTO D. VALUES Correct Answer: C QUESTION 128 Fill in the blank with the appropriate word. An is a combination of values, variables, operators, and functions that are interpreted according to some particular rules of precedence and of association for a particular programming language, which first computes and then produces another value. A. expression QUESTION 129 Consider the exhibit given below: SQL> DESC ORDERS;

59 Which of the following queries will return the name of the customer who placed the highest amount of orders and the total order amount? A. SELECT CUSTOMER, MAX(UNITPRICE*QUANTITY) AS "TOTAL" FROM ORDERS GROUP BY CUSTOMER / B. SELECT CUSTOMER, SUM(UNITPRICE*QUANTITY) AS "TOTAL" FROM ORDERS WHERE SUM(UNITPRICE*QUANTITY)= (SELECT MAX(SUM(UNITPRICE*QUANTITY)) FROM ORDERS GROUP BY CUSTOMER) GROUP BY CUSTOMER / C. SELECT CUSTOMER, SUM(UNITPRICE*QUANTITY) AS "TOTAL" FROM ORDERS GROUP BY CUSTOMER HAVING SUM(UNITPRICE*QUANTITY)= (SELECT SUM(UNITPRICE*QUANTITY) FROM ORDERS GROUP BY CUSTOMER) / D. SELECT CUSTOMER, SUM(UNITPRICE*QUANTITY) AS "TOTAL" FROM ORDERS GROUP BY CUSTOMER HAVING SUM(UNITPRICE*QUANTITY)= (SELECT MAX(SUM(UNITPRICE*QUANTITY)) FROM ORDERS GROUP BY CUSTOMER) / QUESTION 130 Which of the following are the attributes of a simple view? Each correct answer represents a complete solution. Choose all that apply. A. DML operations are allowed on the view. B. It does not have any usage of SQL group functions or grouping of data. C. It fetches data from one database table only. D. It fetches data from two or more tables. BC QUESTION 131 Which of the following data types can be used in MySQL? Each correct answer represents a complete solution. Choose all that apply.

60 A. Function B. String C. Numeric D. Date and Time Correct Answer: BCD QUESTION 132 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. You have written the following MySQL statement to calculate the salary of employees: SELECT (5000+((base_salary*5.0)/100)) FROM Employees; What will happen if you remove the parentheses from the statement? A. The output will be more than the desired output. B. The output will be less than the desired output. C. A syntax error will occur. D. The same value will be displayed. QUESTION 133 You work as a Database Administrator for Pass4sure.com. You have created a new table named Students. You want to create a foreign key constraint on the student_id in the Students table. Which of the following statements will you follow to accomplish the task? A. Use the UPDATE TABLE command with the ADD clause on the Students table. B. Use the CHANGE TABLE command with the ADD clause on the Students table. C. Use the ALTER TABLE command with the ADD clause on the Students table. D. Use the MODIFY TABLE command with the ADD clause on the Students table. Correct Answer: C QUESTION 134

61 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as the database development platform. You have created a database named Employee. Which of the following statements will prevent you from getting error messages if a database with the given name already exists on the database server? A. CREATE DATABASE NOT EXISTS Employee; B. CREATE DATABASE IF NONAME EXISTS Employee; C. CREATE DATABASE NONAME EXISTS Employee; D. CREATE DATABASE IF NOT EXISTS Employee; QUESTION 135 Which of the following statements is correct for equijoin used to join two tables named Employees and Department? A. SELECT D.Dept_Name, E.Emp_Name FROM Departments d1, Employees e1 HAVING Dept_Name, Emp_Name; B. SELECT E.Emp_Name, D.Dept_Name FROM Departments d1, Employees e1 WHERE Dept_No = Dept_No ORDER BY Dept_Name, Emp_Name; C. SELECT Dept_Name, Emp_Name FROM Departments d1, Employees e1 ORDER BY Dept_Name, Emp_Name; D. SELECT Dept_Name, Emp_Name FROM Departments d1, Employees e1 WHERE d1.dept_no = e1.dept_no ORDER BY Dept_Name, Emp_Name; QUESTION 136 You work as a Database Designer for RealTech Inc. You have to design the database of a bank. The database has two tables: Employee and Department. The Employee table has the following attributes: EmpID (PK) DeptID (FK) Name

62 DateOfBirth Designation The Department table has the following attributes: DeptID (PK) DepartmentName DeptID is the primary key (PK) of the Department table, whereas, after migration, in the above Employee table, it is the foreign key (FK). What does migration of the DeptID attribute to the child table Employee ensure? A. It ensures atomicity. B. It ensures referential integrity. C. It ensures faster data retrieval. D. It ensures domain integrity. Correct Answer: B QUESTION 137 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. You have created a table named Employees in the database. You want to create a list of employees working in the organization, but you do not want to display any duplicate row in the report. Which of the following statements will help you to accomplish the task? A. SELECT emp_id, emp_name FROM Employees; B. SELECT emp_id, emp_name FROM Employees GROUP BY emp_id; C. SELECT emp_id, emp_name FROM Employees ORDER BY emp_id; D. SELECT DISTINCT emp_id, emp_name FROM Employees; QUESTION 138 You work as a Database Administrator for Pass4sure.com. You have created a table named Students in the database. Following are the data contained in this table.

63 You have written the following query to retrieve records from the Students table. SELECT Stu_ID, Last_Name, SUM(Fees) FROM Students WHERE Fees < 3000 GROUP BY Class ORDER BY Last_Name; You get an error on executing the query. Which of the following is the cause of the error? A. GROUP BY Class B. ORDER BY Last_Name C. FROM Students D. WHERE Fees < 3000 QUESTION 139 Which of the following update statements will change the salary and job title of employee Scott to that of Adams? Each correct answer represents a complete solution. Choose all that apply. A. UPDATE EMP SET JOB=(SELECT JOB FROM EMP WHERE ENAME='ADAMS'), SAL=(SELECT SAL FROM EMP WHERE ENAME='ADAMS') WHERE ENAME='SCOTT'; B. UPDATE EMP SET (SAL,JOB)=(SELECT SAL,JOB FROM EMP WHERE ENAME='SCOTT') WHERE ENAME='ADAMS'; C. UPDATE EMP SET SAL=(SELECT SAL FROM EMP WHERE ENAME='ADAMS'), JOB=(SELECT JOB FROM EMP WHERE ENAME='ADAMS') WHERE ENAME='SCOTT'; D. UPDATE EMP SET (SAL,JOB)=(SELECT SAL,JOB FROM EMP WHERE ENAME='ADAMS') WHERE ENAME='SCOTT';

64 CD QUESTION 140 You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database. You have created a table named Employees in the database. The table has the following data. Now, you want to remove the records of those persons whose last Name is 'Smith' and first name is 'Jack' from the Employees table. Which of the following statements will you use to accomplish the task? A. DELETE Last_Name= 'Smith' AND First_Name='Jack' FROM Employees B. REMOVE FROM Employees WHERE Last_Name= 'Smith' AND First_Name='Jack' C. REMOVE Last_Name= 'Smith' AND First_Name='Jack' FROM Employees D. DELETE FROM Employees WHERE Last_Name= 'Smith' AND First_Name='Jack' QUESTION 141 Which of the following declarations defines the maximum length of a CHAR datatype columns in bytes? A. CHAR (20 BYTE) B. CHAR (20) C. CHAR (20) BYTE D. Both CHAR (20) and CHAR (20 BYTE)

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

PASS4TEST. IT Certification Guaranteed, The Easy Way!  We offer free update service for one year PASS4TEST IT Certification Guaranteed, The Easy Way! \ http://www.pass4test.com We offer free update service for one year Exam : 310-814 Title : MySQL 5.0, 5.1 and 5.5 Certified Associate Exam Vendors

More information

Sun Certified MySQL Associate

Sun Certified MySQL Associate 310-814 Sun Certified MySQL Associate Version 3.1 QUESTION NO: 1 Adam works as a Database Administrator for a company. He creates a table named Students. He wants to create a new table named Class with

More information

ITCertMaster. Safe, simple and fast. 100% Pass guarantee! IT Certification Guaranteed, The Easy Way!

ITCertMaster.  Safe, simple and fast. 100% Pass guarantee! IT Certification Guaranteed, The Easy Way! ITCertMaster Safe, simple and fast. 100% Pass guarantee! http://www.itcertmaster.com IT Certification Guaranteed, The Easy Way! Exam : 1Z0-870 Title : MySQL 5.0, 5.1 and 5.5 Certified Associate Exam Vendors

More information

Vendor: Oracle. Exam Code: 1Z Exam Name: MySQL 5.0, 5.1 and 5.5 Certified Associate Exam. Version: Demo

Vendor: Oracle. Exam Code: 1Z Exam Name: MySQL 5.0, 5.1 and 5.5 Certified Associate Exam. Version: Demo Vendor: Oracle Exam Code: 1Z0-870 Exam Name: MySQL 5.0, 5.1 and 5.5 Certified Associate Exam Version: Demo QUESTION: 1 You work as a Database Administrator for. You have created a table named Student.

More information

INDEX. 1 Basic SQL Statements. 2 Restricting and Sorting Data. 3 Single Row Functions. 4 Displaying data from multiple tables

INDEX. 1 Basic SQL Statements. 2 Restricting and Sorting Data. 3 Single Row Functions. 4 Displaying data from multiple tables INDEX Exercise No Title 1 Basic SQL Statements 2 Restricting and Sorting Data 3 Single Row Functions 4 Displaying data from multiple tables 5 Creating and Managing Tables 6 Including Constraints 7 Manipulating

More information

Course Outline and Objectives: Database Programming with SQL

Course Outline and Objectives: Database Programming with SQL Introduction to Computer Science and Business Course Outline and Objectives: Database Programming with SQL This is the second portion of the Database Design and Programming with SQL course. In this portion,

More information

Intermediate SQL: Aggregated Data, Joins and Set Operators

Intermediate SQL: Aggregated Data, Joins and Set Operators Intermediate SQL: Aggregated Data, Joins and Set Operators Aggregated Data and Sorting Objectives After completing this lesson, you should be able to do the following: Identify the available group functions

More information

Chapter-14 SQL COMMANDS

Chapter-14 SQL COMMANDS Chapter-14 SQL COMMANDS What is SQL? Structured Query Language and it helps to make practice on SQL commands which provides immediate results. SQL is Structured Query Language, which is a computer language

More information

Oracle Syllabus Course code-r10605 SQL

Oracle Syllabus Course code-r10605 SQL Oracle Syllabus Course code-r10605 SQL Writing Basic SQL SELECT Statements Basic SELECT Statement Selecting All Columns Selecting Specific Columns Writing SQL Statements Column Heading Defaults Arithmetic

More information

KORA. RDBMS Concepts II

KORA. RDBMS Concepts II RDBMS Concepts II Outline Querying Data Source With SQL Star & Snowflake Schemas Reporting Aggregated Data Using the Group Functions What Are Group Functions? Group functions operate on sets of rows to

More information

Oracle 1Z Oracle Database 11g SQL Fundamentals I. Download Full Version :

Oracle 1Z Oracle Database 11g SQL Fundamentals I. Download Full Version : Oracle 1Z1-051 Oracle Database 11g SQL Fundamentals I Download Full Version : https://killexams.com/pass4sure/exam-detail/1z1-051 QUESTION: 238 You need to perform these tasks: - Create and assign a MANAGER

More information

Introduction to Computer Science and Business

Introduction to Computer Science and Business Introduction to Computer Science and Business This is the second portion of the Database Design and Programming with SQL course. In this portion, students implement their database design by creating a

More information

1 Writing Basic SQL SELECT Statements 2 Restricting and Sorting Data

1 Writing Basic SQL SELECT Statements 2 Restricting and Sorting Data 1 Writing Basic SQL SELECT Statements Objectives 1-2 Capabilities of SQL SELECT Statements 1-3 Basic SELECT Statement 1-4 Selecting All Columns 1-5 Selecting Specific Columns 1-6 Writing SQL Statements

More information

Introduction to Oracle9i: SQL

Introduction to Oracle9i: SQL Oracle 1z0-007 Introduction to Oracle9i: SQL Version: 22.0 QUESTION NO: 1 Oracle 1z0-007 Exam Examine the data in the EMPLOYEES and DEPARTMENTS tables. You want to retrieve all employees, whether or not

More information

1Z Oracle Database 11g - SQL Fundamentals I Exam Summary Syllabus Questions

1Z Oracle Database 11g - SQL Fundamentals I Exam Summary Syllabus Questions 1Z0-051 Oracle Database 11g - SQL Fundamentals I Exam Summary Syllabus Questions Table of Contents Introduction to 1Z0-051 Exam on Oracle Database 11g - SQL Fundamentals I 2 Oracle 1Z0-051 Certification

More information

Exam code: Exam name: Database Fundamentals. Version 16.0

Exam code: Exam name: Database Fundamentals. Version 16.0 98-364 Number: 98-364 Passing Score: 800 Time Limit: 120 min File Version: 16.0 Exam code: 98-364 Exam name: Database Fundamentals Version 16.0 98-364 QUESTION 1 You have a table that contains the following

More information

BraindumpsVCE. Best vce braindumps-exam vce pdf free download

BraindumpsVCE.   Best vce braindumps-exam vce pdf free download BraindumpsVCE http://www.braindumpsvce.com Best vce braindumps-exam vce pdf free download Exam : 1z1-061 Title : Oracle Database 12c: SQL Fundamentals Vendor : Oracle Version : DEMO Get Latest & Valid

More information

RDBMS-Day3. SQL Basic DDL statements DML statements Aggregate functions

RDBMS-Day3. SQL Basic DDL statements DML statements Aggregate functions RDBMS-Day3 SQL Basic DDL statements DML statements Aggregate functions SQL SQL is used to make a request to retrieve data from a Database. The DBMS processes the SQL request, retrieves the requested data

More information

CS6312 DATABASE MANAGEMENT SYSTEMS LABORATORY L T P C

CS6312 DATABASE MANAGEMENT SYSTEMS LABORATORY L T P C CS6312 DATABASE MANAGEMENT SYSTEMS LABORATORY L T P C 0 0 3 2 LIST OF EXPERIMENTS: 1. Creation of a database and writing SQL queries to retrieve information from the database. 2. Performing Insertion,

More information

Data about data is database Select correct option: True False Partially True None of the Above

Data about data is database Select correct option: True False Partially True None of the Above Within a table, each primary key value. is a minimal super key is always the first field in each table must be numeric must be unique Foreign Key is A field in a table that matches a key field in another

More information

@vmahawar. Agenda Topics Quiz Useful Links

@vmahawar. Agenda Topics Quiz Useful Links @vmahawar Agenda Topics Quiz Useful Links Agenda Introduction Stakeholders, data classification, Rows/Columns DDL Data Definition Language CREATE, ALTER, DROP, TRUNCATE CONSTRAINTS, DATA TYPES DML Data

More information

Retrieving Data Using the SQL SELECT Statement. Copyright 2004, Oracle. All rights reserved.

Retrieving Data Using the SQL SELECT Statement. Copyright 2004, Oracle. All rights reserved. Retrieving Data Using the SQL SELECT Statement Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: List the capabilities of SQL

More information

Retrieving Data Using the SQL SELECT Statement. Copyright 2009, Oracle. All rights reserved.

Retrieving Data Using the SQL SELECT Statement. Copyright 2009, Oracle. All rights reserved. Retrieving Data Using the SQL SELECT Statement Objectives After completing this lesson, you should be able to do the following: List the capabilities of SQL SELECT statements Execute a basic SELECT statement

More information

Creating and Managing Tables Schedule: Timing Topic

Creating and Managing Tables Schedule: Timing Topic 9 Creating and Managing Tables Schedule: Timing Topic 30 minutes Lecture 20 minutes Practice 50 minutes Total Objectives After completing this lesson, you should be able to do the following: Describe the

More information

Sample Question Paper

Sample Question Paper Sample Question Paper Marks : 70 Time:3 Hour Q.1) Attempt any FIVE of the following. a) List any four applications of DBMS. b) State the four database users. c) Define normalization. Enlist its type. d)

More information

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 7 Introduction to Structured Query Language (SQL)

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management Tenth Edition Chapter 7 Introduction to Structured Query Language (SQL) Objectives In this chapter, students will learn: The basic commands and

More information

1Z0-007 ineroduction to oracle9l:sql

1Z0-007 ineroduction to oracle9l:sql ineroduction to oracle9l:sql Q&A DEMO Version Copyright (c) 2007 Chinatag LLC. All rights reserved. Important Note Please Read Carefully For demonstration purpose only, this free version Chinatag study

More information

Oracle Database 11g: SQL and PL/SQL Fundamentals

Oracle Database 11g: SQL and PL/SQL Fundamentals Oracle University Contact Us: +33 (0) 1 57 60 20 81 Oracle Database 11g: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn In this course, students learn the fundamentals of SQL and PL/SQL

More information

Transaction Management Chapter 11. Class 9: Transaction Management 1

Transaction Management Chapter 11. Class 9: Transaction Management 1 Transaction Management Chapter 11 Class 9: Transaction Management 1 The Concurrent Update Problem To prevent errors from being introduced when concurrent updates are attempted, the application logic must

More information

ASSIGNMENT NO Computer System with Open Source Operating System. 2. Mysql

ASSIGNMENT NO Computer System with Open Source Operating System. 2. Mysql ASSIGNMENT NO. 3 Title: Design at least 10 SQL queries for suitable database application using SQL DML statements: Insert, Select, Update, Delete with operators, functions, and set operator. Requirements:

More information

Oracle Database SQL Basics

Oracle Database SQL Basics Oracle Database SQL Basics Kerepes Tamás, Webváltó Kft. tamas.kerepes@webvalto.hu 2015. február 26. Copyright 2004, Oracle. All rights reserved. SQL a history in brief The relational database stores data

More information

Relational Database Language

Relational Database Language DATA BASE MANAGEMENT SYSTEMS Unit IV Relational Database Language: Data definition in SQL, Queries in SQL, Insert, Delete and Update Statements in SQL, Views in SQL, Specifying General Constraints as Assertions,

More information

Database Foundations. 6-3 Data Definition Language (DDL) Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Database Foundations. 6-3 Data Definition Language (DDL) Copyright 2015, Oracle and/or its affiliates. All rights reserved. Database Foundations 6-3 Roadmap You are here Introduction to Oracle Application Express Structured Query Language (SQL) Data Definition Language (DDL) Data Manipulation Language (DML) Transaction Control

More information

Exam Code: 1z Exam Name: Ineroduction to oracle9l:sql. Vendor: Oracle. Version: DEMO

Exam Code: 1z Exam Name: Ineroduction to oracle9l:sql. Vendor: Oracle. Version: DEMO Exam Code: 1z0-007 Exam Name: Ineroduction to oracle9l:sql Vendor: Oracle Version: DEMO Part: A 1: Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME

More information

King Fahd University of Petroleum and Minerals

King Fahd University of Petroleum and Minerals 1 King Fahd University of Petroleum and Minerals Information and Computer Science Department ICS 334: Database Systems Semester 041 Major Exam 1 18% ID: Name: Section: Grades Section Max Scored A 5 B 25

More information

Displaying Data from Multiple Tables. Copyright 2004, Oracle. All rights reserved.

Displaying Data from Multiple Tables. Copyright 2004, Oracle. All rights reserved. Displaying Data from Multiple Tables Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Write SELECT statements to access data

More information

Exam: 1Z Title : Introduction to Oracle9i: SQL. Ver :

Exam: 1Z Title : Introduction to Oracle9i: SQL. Ver : Exam: 1Z0-007 Title : Introduction to Oracle9i: SQL Ver : 05.14.04 QUESTION 1 A: This query uses "+" to create outer join as it was in Oracle8i, but it requires also usage of WHERE clause in SELECT statement.b:

More information

5. Single-row function

5. Single-row function 1. 2. Introduction Oracle 11g Oracle 11g Application Server Oracle database Relational and Object Relational Database Management system Oracle internet platform System Development Life cycle 3. Writing

More information

SQL is an English like language consisting of commands to store, retrieve, maintain & regulate access to your database.

SQL is an English like language consisting of commands to store, retrieve, maintain & regulate access to your database. SQL SQL is an English like language consisting of commands to store, retrieve, maintain & regulate access to your database. SQL*Plus SQL*Plus is an application that recognizes & executes SQL commands &

More information

Table of Contents. PDF created with FinePrint pdffactory Pro trial version

Table of Contents. PDF created with FinePrint pdffactory Pro trial version Table of Contents Course Description The SQL Course covers relational database principles and Oracle concepts, writing basic SQL statements, restricting and sorting data, and using single-row functions.

More information

ITCertMaster. Safe, simple and fast. 100% Pass guarantee! IT Certification Guaranteed, The Easy Way!

ITCertMaster.   Safe, simple and fast. 100% Pass guarantee! IT Certification Guaranteed, The Easy Way! ITCertMaster Safe, simple and fast. 100% Pass guarantee! http://www.itcertmaster.com Exam : 1z0-007 Title : Introduction to Oracle9i: SQL Vendor : Oracle Version : DEMO Get Latest & Valid 1Z0-007 Exam's

More information

Microsoft MOS- Using Microsoft Office Access Download Full Version :

Microsoft MOS- Using Microsoft Office Access Download Full Version : Microsoft 77-605 MOS- Using Microsoft Office Access 2007 Download Full Version : http://killexams.com/pass4sure/exam-detail/77-605 QUESTION: 120 Peter works as a Database Designer for AccessSoft Inc. The

More information

ÇALIŞMA TEST SORULARI

ÇALIŞMA TEST SORULARI 1. A table has the following definition: EMPLOYEES( EMPLOYEE_ID NUMBER(6) NOT NULL, LAST_NAME VARCHAR2(10) NOT NULL, MANAGER_ID VARCHAR2(6)) and contains the following rows: (1001, 'Bob Bevan', '200')

More information

SQL. Char (30) can store ram, ramji007 or 80- b

SQL. Char (30) can store ram, ramji007 or 80- b SQL In Relational database Model all the information is stored on Tables, these tables are divided into rows and columns. A collection on related tables are called DATABASE. A named table in a database

More information

SQL Interview Questions

SQL Interview Questions SQL Interview Questions SQL stands for Structured Query Language. It is used as a programming language for querying Relational Database Management Systems. In this tutorial, we shall go through the basic

More information

Oracle 1Z Oracle Database 11g : SQL Fundamentals I. Download Full Version :

Oracle 1Z Oracle Database 11g : SQL Fundamentals I. Download Full Version : Oracle 1Z0-051 Oracle Database 11g : SQL Fundamentals I Download Full Version : http://killexams.com/pass4sure/exam-detail/1z0-051 Answer: D QUESTION: 183 View the Exhibits and examine the structures of

More information

normalization are being violated o Apply the rule of Third Normal Form to resolve a violation in the model

normalization are being violated o Apply the rule of Third Normal Form to resolve a violation in the model Database Design Section1 - Introduction 1-1 Introduction to the Oracle Academy o Give examples of jobs, salaries, and opportunities that are possible by participating in the Academy. o Explain how your

More information

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle Database: SQL Fundamentals I. Q&As: 292

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle Database: SQL Fundamentals I. Q&As: 292 Vendor: Oracle Exam Code: 1Z1-051 Exam Name: Oracle Database: SQL Fundamentals I Q&As: 292 QUESTION 1 Evaluate the SQL statement: TRUNCATE TABLE DEPT; Which three are true about the SQL statement? (Choose

More information

Join, Sub queries and set operators

Join, Sub queries and set operators Join, Sub queries and set operators Obtaining Data from Multiple Tables EMPLOYEES DEPARTMENTS Cartesian Products A Cartesian product is formed when: A join condition is omitted A join condition is invalid

More information

Chapter 7. Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel

Chapter 7. Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel 1 In this chapter, you will learn: The basic commands

More information

Database Programming with SQL

Database Programming with SQL Database Programming with SQL 2-1 Objectives This lesson covers the following objectives: Apply the concatenation operator to link columns to other columns, arithmetic expressions, or constant values to

More information

1 SQL Structured Query Language

1 SQL Structured Query Language 1 SQL Structured Query Language 1.1 Tables In relational database systems (DBS) data are represented using tables (relations). A query issued against the DBS also results in a table. A table has the following

More information

AO3 - Version: 2. Oracle Database 11g SQL

AO3 - Version: 2. Oracle Database 11g SQL AO3 - Version: 2 Oracle Database 11g SQL Oracle Database 11g SQL AO3 - Version: 2 3 days Course Description: This course provides the essential SQL skills that allow developers to write queries against

More information

Oracle Database: SQL and PL/SQL Fundamentals NEW

Oracle Database: SQL and PL/SQL Fundamentals NEW Oracle Database: SQL and PL/SQL Fundamentals NEW Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training delivers the fundamentals of SQL and PL/SQL along with the

More information

WHAT IS SQL. Database query language, which can also: Define structure of data Modify data Specify security constraints

WHAT IS SQL. Database query language, which can also: Define structure of data Modify data Specify security constraints SQL KEREM GURBEY WHAT IS SQL Database query language, which can also: Define structure of data Modify data Specify security constraints DATA DEFINITION Data-definition language (DDL) provides commands

More information

Data Manipulation Language

Data Manipulation Language Manipulating Data Objectives After completing this lesson, you should be able to do the following: Describe each data manipulation language (DML) statement Insert rows into a table Update rows in a table

More information

GIFT Department of Computing Science Data Selection and Filtering using the SELECT Statement

GIFT Department of Computing Science Data Selection and Filtering using the SELECT Statement GIFT Department of Computing Science [Spring 2013] CS-217: Database Systems Lab-2 Manual Data Selection and Filtering using the SELECT Statement V1.0 4/12/2016 Introduction to Lab-2 This lab reinforces

More information

Using DDL Statements to Create and Manage Tables. Copyright 2006, Oracle. All rights reserved.

Using DDL Statements to Create and Manage Tables. Copyright 2006, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables Objectives After completing this lesson, you should be able to do the following: Categorize the main database objects Review the table structure List the

More information

Retrieving Data Using the SQL SELECT Statement. Copyright 2004, Oracle. All rights reserved.

Retrieving Data Using the SQL SELECT Statement. Copyright 2004, Oracle. All rights reserved. Retrieving Data Using the SQL SELECT Statement Objectives After completing this lesson, you should be able to do the following: List the capabilities of SQL SELECT statements Execute a basic SELECT statement

More information

II B.Sc(IT) [ BATCH] IV SEMESTER CORE: RELATIONAL DATABASE MANAGEMENT SYSTEM - 412A Multiple Choice Questions.

II B.Sc(IT) [ BATCH] IV SEMESTER CORE: RELATIONAL DATABASE MANAGEMENT SYSTEM - 412A Multiple Choice Questions. Dr.G.R.Damodaran College of Science (Autonomous, affiliated to the Bharathiar University, recognized by the UGC)Re-accredited at the 'A' Grade Level by the NAAC and ISO 9001:2008 Certified CRISL rated

More information

SQL functions fit into two broad categories: Data definition language Data manipulation language

SQL functions fit into two broad categories: Data definition language Data manipulation language Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition Chapter 7 Beginning Structured Query Language (SQL) MDM NUR RAZIA BINTI MOHD SURADI 019-3932846 razia@unisel.edu.my

More information

Exact Numeric Data Types

Exact Numeric Data Types SQL Server Notes for FYP SQL data type is an attribute that specifies type of data of any object. Each column, variable and expression has related data type in SQL. You would use these data types while

More information

Sql Server Syllabus. Overview

Sql Server Syllabus. Overview Sql Server Syllabus Overview This SQL Server training teaches developers all the Transact-SQL skills they need to create database objects like Tables, Views, Stored procedures & Functions and triggers

More information

GIFT Department of Computing Science. CS-217/224: Database Systems. Lab-5 Manual. Displaying Data from Multiple Tables - SQL Joins

GIFT Department of Computing Science. CS-217/224: Database Systems. Lab-5 Manual. Displaying Data from Multiple Tables - SQL Joins GIFT Department of Computing Science CS-217/224: Database Systems Lab-5 Manual Displaying Data from Multiple Tables - SQL Joins V3.0 5/5/2016 Introduction to Lab-5 This lab introduces students to selecting

More information

Prepared by Manash Deb website: 1

Prepared by Manash Deb website:  1 S.Q.L. SQL means Structured Query Language. SQL is a database computer language designed for managing data in relational database management systems (RDBMS). RDBMS technology is based on the concept of

More information

SELF TEST. List the Capabilities of SQL SELECT Statements

SELF TEST. List the Capabilities of SQL SELECT Statements 98 SELF TEST The following questions will help you measure your understanding of the material presented in this chapter. Read all the choices carefully because there might be more than one correct answer.

More information

1 SQL Structured Query Language

1 SQL Structured Query Language 1 SQL Structured Query Language 1.1 Tables In relational database systems (DBS) data are represented using tables (relations). A query issued against the DBS also results in a table. A table has the following

More information

RDBMS- Day 4. Grouped results Relational algebra Joins Sub queries. In today s session we will discuss about the concept of sub queries.

RDBMS- Day 4. Grouped results Relational algebra Joins Sub queries. In today s session we will discuss about the concept of sub queries. RDBMS- Day 4 Grouped results Relational algebra Joins Sub queries In today s session we will discuss about the concept of sub queries. Grouped results SQL - Using GROUP BY Related rows can be grouped together

More information

Institute of Aga. Network Database LECTURER NIYAZ M. SALIH

Institute of Aga. Network Database LECTURER NIYAZ M. SALIH 2017 Institute of Aga Network Database LECTURER NIYAZ M. SALIH Database: A Database is a collection of related data organized in a way that data can be easily accessed, managed and updated. Any piece of

More information

Greenplum SQL Class Outline

Greenplum SQL Class Outline Greenplum SQL Class Outline The Basics of Greenplum SQL Introduction SELECT * (All Columns) in a Table Fully Qualifying a Database, Schema and Table SELECT Specific Columns in a Table Commas in the Front

More information

Study Guide for: Oracle Database SQL Certified Expert Exam Guide (Exam 1Z0-047)

Study Guide for: Oracle Database SQL Certified Expert Exam Guide (Exam 1Z0-047) Study Guide for: Oracle Database SQL Certified Expert Exam Guide (Exam 1Z0-047) Study Material for: Student 08.10.2010 15:49:30 Examine the following data listing for table WORKERS: WORKER_ID LAST_NAME

More information

Oracle Database: SQL and PL/SQL Fundamentals Ed 2

Oracle Database: SQL and PL/SQL Fundamentals Ed 2 Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 67863102 Oracle Database: SQL and PL/SQL Fundamentals Ed 2 Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals

More information

Oracle SQL & PL SQL Course

Oracle SQL & PL SQL Course Oracle SQL & PL SQL Course Complete Practical & Real-time Training Job Support Complete Practical Real-Time Scenarios Resume Preparation Lab Access Training Highlights Placement Support Support Certification

More information

Database Foundations. 6-4 Data Manipulation Language (DML) Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Database Foundations. 6-4 Data Manipulation Language (DML) Copyright 2015, Oracle and/or its affiliates. All rights reserved. Database Foundations 6-4 Roadmap You are here Introduction to Oracle Application Express Structured Query Language (SQL) Data Definition Language (DDL) Data Manipulation Language (DML) Transaction Control

More information

Restricting and Sorting Data. Copyright 2004, Oracle. All rights reserved.

Restricting and Sorting Data. Copyright 2004, Oracle. All rights reserved. Restricting and Sorting Data Objectives After completing this lesson, you should be able to do the following: Limit the rows that are retrieved by a query Sort the rows that are retrieved by a query Use

More information

Tables From Existing Tables

Tables From Existing Tables Creating Tables From Existing Tables After completing this module, you will be able to: Create a clone of an existing table. Create a new table from many tables using a SQL SELECT. Define your own table

More information

Oracle Database: SQL and PL/SQL Fundamentals

Oracle Database: SQL and PL/SQL Fundamentals Oracle University Contact Us: 001-855-844-3881 & 001-800-514-06-9 7 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training

More information

Database Management Systems Paper Solution

Database Management Systems Paper Solution Database Management Systems Paper Solution Following questions have been asked in GATE CS exam. 1. Given the relations employee (name, salary, deptno) and department (deptno, deptname, address) Which of

More information

DB2 SQL Class Outline

DB2 SQL Class Outline DB2 SQL Class Outline The Basics of SQL Introduction Finding Your Current Schema Setting Your Default SCHEMA SELECT * (All Columns) in a Table SELECT Specific Columns in a Table Commas in the Front or

More information

Exam : 1Z Title : Introduction to Oracle9i: SQL

Exam : 1Z Title : Introduction to Oracle9i: SQL Exam : 1Z0-007 Title : Introduction to Oracle9i: SQL Ver : 01-15-2009 QUESTION 1: Examine the data in the EMPLOYEES and DEPARTMENTS tables. EMPLOYEES LAST_NAME DEPARTMENT_ID SALARY Getz 10 3000 Davis 20

More information

A subquery is a nested query inserted inside a large query Generally occurs with select, from, where Also known as inner query or inner select,

A subquery is a nested query inserted inside a large query Generally occurs with select, from, where Also known as inner query or inner select, Sub queries A subquery is a nested query inserted inside a large query Generally occurs with select, from, where Also known as inner query or inner select, Result of the inner query is passed to the main

More information

CertKiller.1z Q&A

CertKiller.1z Q&A CertKiller.1z0-051.442.Q&A Number: 1z0-051 Passing Score: 800 Time Limit: 120 min File Version: 23.04 http://www.gratisexam.com/ a): These are the most accurate study questions. Just focus on these and

More information

Teradata. This was compiled in order to describe Teradata and provide a brief overview of common capabilities and queries.

Teradata. This was compiled in order to describe Teradata and provide a brief overview of common capabilities and queries. Teradata This was compiled in order to describe Teradata and provide a brief overview of common capabilities and queries. What is it? Teradata is a powerful Big Data tool that can be used in order to quickly

More information

Oracle Database 10g: Introduction to SQL

Oracle Database 10g: Introduction to SQL ORACLE UNIVERSITY CONTACT US: 00 9714 390 9000 Oracle Database 10g: Introduction to SQL Duration: 5 Days What you will learn This course offers students an introduction to Oracle Database 10g database

More information

Using DDL Statements to Create and Manage Tables. Copyright 2004, Oracle. All rights reserved.

Using DDL Statements to Create and Manage Tables. Copyright 2004, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Categorize the main database

More information

chapter 2 G ETTING I NFORMATION FROM A TABLE

chapter 2 G ETTING I NFORMATION FROM A TABLE chapter 2 Chapter G ETTING I NFORMATION FROM A TABLE This chapter explains the basic technique for getting the information you want from a table when you do not want to make any changes to the data and

More information

CS121 MIDTERM REVIEW. CS121: Relational Databases Fall 2017 Lecture 13

CS121 MIDTERM REVIEW. CS121: Relational Databases Fall 2017 Lecture 13 CS121 MIDTERM REVIEW CS121: Relational Databases Fall 2017 Lecture 13 2 Before We Start Midterm Overview 3 6 hours, multiple sittings Open book, open notes, open lecture slides No collaboration Possible

More information

Using DDL Statements to Create and Manage Tables. Copyright 2004, Oracle. All rights reserved.

Using DDL Statements to Create and Manage Tables. Copyright 2004, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Categorize the main database

More information

Database Programming with SQL

Database Programming with SQL Database Programming with SQL 12-2 Objectives In this lesson, you will learn to: Construct and execute an UPDATE statement Construct and execute a DELETE statement Construct and execute a query that uses

More information

ORACLE CERTIFIED ASSOCIATE ORACLE DATABASE 11g ADMINISTRATOR

ORACLE CERTIFIED ASSOCIATE ORACLE DATABASE 11g ADMINISTRATOR ORACLE CERTIFIED ASSOCIATE ORACLE DATABASE 11g ADMINISTRATOR The process of becoming Oracle Database certified broadens your knowledge and skills by exposing you to a wide array of important database features,

More information

Oracle Database: Introduction to SQL

Oracle Database: Introduction to SQL Oracle Database: Introduction to SQL What you will learn Understanding the basic concepts of relational databases ensure refined code by developers. This course helps the participants to write subqueries,

More information

Unit 1 - Chapter 4,5

Unit 1 - Chapter 4,5 Unit 1 - Chapter 4,5 CREATE DATABASE DatabaseName; SHOW DATABASES; USE DatabaseName; DROP DATABASE DatabaseName; CREATE TABLE table_name( column1 datatype, column2 datatype, column3 datatype,... columnn

More information

CONCAT SUBSTR LOWER (*) All three will be evaluated simultaneously. Correct

CONCAT SUBSTR LOWER (*) All three will be evaluated simultaneously. Correct 1. You query the database with this SQL statement: SELECT CONCAT(last_name, (SUBSTR(LOWER(first_name), 4))) Default Password FROM employees; Which function will be evaluated first? CONCAT SUBSTR LOWER

More information

Getting Information from a Table

Getting Information from a Table ch02.fm Page 45 Wednesday, April 14, 1999 2:44 PM Chapter 2 Getting Information from a Table This chapter explains the basic technique of getting the information you want from a table when you do not want

More information

Visit for more.

Visit  for more. Chapter 9: More On Database & SQL Advanced Concepts Informatics Practices Class XII (CBSE Board) Revised as per CBSE Curriculum 2015 Visit www.ip4you.blogspot.com for more. Authored By:- Rajesh Kumar Mishra,

More information

1D0-541_formatted. Number: Passing Score: 800 Time Limit: 120 min File Version: 1.

1D0-541_formatted.  Number: Passing Score: 800 Time Limit: 120 min File Version: 1. 1D0-541_formatted Number: 000-000 Passing Score: 800 Time Limit: 120 min File Version: 1.0 http://www.gratisexam.com/ 1D0-541 1D0-541 CIW v5 Database Design Specialist Version 1.7 Exam A QUESTION 1 With

More information

1 Prepared By Heena Patel (Asst. Prof)

1 Prepared By Heena Patel (Asst. Prof) Topic 1 1. What is difference between Physical and logical data 3 independence? 2. Define the term RDBMS. List out codd s law. Explain any three in detail. ( times) 3. What is RDBMS? Explain any tow Codd

More information

Techno India Batanagar Computer Science and Engineering. Model Questions. Subject Name: Database Management System Subject Code: CS 601

Techno India Batanagar Computer Science and Engineering. Model Questions. Subject Name: Database Management System Subject Code: CS 601 Techno India Batanagar Computer Science and Engineering Model Questions Subject Name: Database Management System Subject Code: CS 601 Multiple Choice Type Questions 1. Data structure or the data stored

More information

Database Foundations. 6-9 Joining Tables Using JOIN. Copyright 2014, Oracle and/or its affiliates. All rights reserved.

Database Foundations. 6-9 Joining Tables Using JOIN. Copyright 2014, Oracle and/or its affiliates. All rights reserved. Database Foundations 6-9 Roadmap Introduction to Oracle Application Express Structured Query Language (SQL) Data Definition Language (DDL) Data Manipulation Language (DML Transaction Control Language (TCL)

More information

Database Programming with SQL

Database Programming with SQL Database Programming with SQL 18-1 Objectives In this lesson, you will learn to: Define the terms COMMIT, ROLLBACK, and SAVEPOINT as they relate to data transactions List three advantages of the COMMIT,

More information