KillTest 质量更高 服务更好 学习资料 半年免费更新服务

Similar documents
KillTest 质量更高 服务更好 学习资料 半年免费更新服务

學 科 100% ( 為 單 複 選 題, 每 題 2.5 分, 共 100 分 ) 1. 請 參 閱 附 圖 作 答 : (A) 選 項 A (B) 選 項 B (C) 選 項 C (D) 選 項 D Ans:D 2. 下 列 對 於 資 料 庫 正 規 化 (Normalization) 的 敘

6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM

Microsoft Word - ChineseSATII .doc

目錄 C ontents Chapter MTA Chapter Chapter

KillTest 质量更高 服务更好 学习资料 半年免费更新服务

DB2 (join) SQL DB2 11 SQL DB2 SQL 9.1 DB2 DB2 ( ) SQL ( ) DB2 SQL DB2 DB2 SQL DB2 DB2 SQL DB2 ( DB2 ) DB2 DB2 DB2 SQL DB2 (1) SQL (2) S

Oracle Database 10g: SQL (OCE) 的第一堂課

Microsoft PowerPoint - 05-SQL3-advanced.ppt

SQL: Interactive Queries (2)

KillTest 质量更高 服务更好 学习资料 半年免费更新服务

untitled

國 立 政 治 大 學 教 育 學 系 2016 新 生 入 學 手 冊 目 錄 表 11 國 立 政 治 大 學 教 育 學 系 博 士 班 資 格 考 試 抵 免 申 請 表 論 文 題 目 申 報 暨 指 導 教 授 表 12 國 立 政 治 大 學 碩 博 士 班 論

ebook46-23

高中英文科教師甄試心得

Microsoft Word - Final Exam Review Packet.docx

( Version 0.4 ) 1

Computer Architecture

教 学 目 标 描 述 主 要 数 据 库 对 象 创 建 表 描 述 列 定 义 时 可 用 的 数 据 类 型 改 变 表 的 定 义 删 除 改 名 和 截 断 表 描 述 每 个 DML 语 句 插 入 行 到 表 中 更 新 表 中 的 行 从 表 中 删 除 行 描 述 约 束 创 建

Preface This guide is intended to standardize the use of the WeChat brand and ensure the brand's integrity and consistency. The guide applies to all d

* RRB *

Microsoft Word - template.doc

目錄

untitled

前言 C# C# C# C C# C# C# C# C# microservices C# More Effective C# More Effective C# C# C# C# Effective C# 50 C# C# 7 Effective vii

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc

IBM Rational ClearQuest Client for Eclipse 1/ IBM Rational ClearQuest Client for Ecl

KillTest 质量更高 服务更好 学习资料 半年免费更新服务

2015 Chinese FL Written examination

Microsoft Word - TIP006SCH Uni-edit Writing Tip - Presentperfecttenseandpasttenseinyourintroduction readytopublish

4. 每 组 学 生 将 写 有 习 语 和 含 义 的 两 组 卡 片 分 别 洗 牌, 将 顺 序 打 乱, 然 后 将 两 组 卡 片 反 面 朝 上 置 于 课 桌 上 5. 学 生 依 次 从 两 组 卡 片 中 各 抽 取 一 张, 展 示 给 小 组 成 员, 并 大 声 朗 读 卡

习题1

2009 Japanese First Language Written examination

2010 Japanese First Language Written examination

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO

2009 Korean First Language Written examination

2008 Nankai Business Review 61

coverage2.ppt

天 主 教 輔 仁 大 學 社 會 學 系 學 士 論 文 小 別 勝 新 婚? 久 別 要 離 婚? 影 響 遠 距 家 庭 婚 姻 感 情 因 素 之 探 討 Separate marital relations are getting better or getting worse? -Exp

WTO

國家圖書館典藏電子全文

Microsoft Word - HSK使用手册.doc

ENGG1410-F Tutorial 6

國立中山大學學位論文典藏

Microsoft Word doc


untitled

「人名權威檔」資料庫欄位建置表

Microsoft PowerPoint _代工實例-1

RUN_PC連載_8_.doc

Oracle 4

背 景 资 料 对 于 在 华 经 营 的 企 业 里, 人 力 资 源 管 理 绝 不 是 一 件 轻 松 的 工 作 HR 从 业 者 除 了 要 具 备 猎 人 的 眼 光 心 理 学 家 的 耐 心 谈 判 专 家 的 口 才, 更 为 重 要 的 是, 还 需 要 具 备 专 业 的 法

Microsoft Word - 第四組心得.doc

国 际 视 野 中 国 立 场 原 创 诉 求 专 业 精 神 读 者 寄 语 Readers of the Message

SQL Server SQL Server SQL Mail Windows NT

A Study on JI Xiaolan s ( ) Life, Couplets and Theories of Couplets 紀 曉 嵐 ( ) 生 平 資 料 斠 正 及 對 聯 聯 論 研 究 LI Ha 李 夏 THE UNIVER

ch_code_infoaccess

Microsoft PowerPoint - STU_EC_Ch08.ppt

Guide to Install SATA Hard Disks

基于UML建模的管理管理信息系统项目案例导航——VB篇

2005 5,,,,,,,,,,,,,,,,, , , 2174, 7014 %, % 4, 1961, ,30, 30,, 4,1976,627,,,,, 3 (1993,12 ),, 2

USPTO Academic research Corporate needs Global/International Inventors Libraries News Media/Publication Patent Attorney or Agent USPTO e (ebusiness Ce

RUPUML RUP RUP RUP RUP

東吳大學

Microsoft Word - SH doc

数 据 库 系 统 基 础 2/54 第 6 章 数 据 库 管 理 与 维 护

BC04 Module_antenna__ doc

Untitiled

11.2 overview

Oracle9i 的查询优化

untitled

從詩歌的鑒賞談生命價值的建構

Background 2006 年 2 月 我 国 新 企 业 会 计 准 则 的 颁 布, 标 志 着 与 国 际 惯 例 趋 同 的 中 国 新 会 计 准 则 体 系 的 建 立, 自 2007 年 1 月 1 日 起 首 先 在 境 内 上 市 的 公 司 施 行, 自 2008 年 1 月

PowerPoint Presentation

Microsoft PowerPoint - ryz_030708_pwo.ppt

R D B M S O R D B M S R D B M S / O R D B M S R D B M S O R D B M S 4 O R D B M S R D B M 3. ORACLE Server O R A C L E U N I X Windows NT w w

untitled

山东2014第四季新教材《会计基础》冲刺卷第三套

网易介绍

168 健 等 木醋对几种小浆果扦插繁殖的影响 第1期 the view of the comprehensive rooting quality, spraying wood vinegar can change rooting situation, and the optimal concent

ebook140-9

ap15_chinese_interpersoanal_writing_ _response

Microsoft Word - xb 牛尚鹏.doc

OncidiumGower Ramsey ) 2 1(CK1) 2(CK2) 1(T1) 2(T2) ( ) CK1 43 (A 44.2 ) CK2 66 (A 48.5 ) T1 40 (

IP Access Lists IP Access Lists IP Access Lists

Chapter 9: Objects and Classes

入學考試網上報名指南


國立中山大學學位論文典藏.PDF

Microsoft Word - 11月電子報1130.doc

一年級上學期(2001/2002)測驗時間表及範圍 /10/2001

untitled

18世纪东亚儒教思想的地形

123

( ) ( ) ( ) ( )

2/80 2

Value Chain ~ (E-Business RD / Pre-Sales / Consultant) APS, Advanc

KillTest 质量更高 服务更好 学习资料 半年免费更新服务

豐 邑 家 族 季 刊 編 者 的 話 No.07 彼 此 相 愛 總 編 輯 : 邱 崇 喆 主 編 : 戴 秋 柑 編 輯 委 員 : 黃 淑 美 盧 永 吉 王 森 生 趙 家 明 林 孟 姿 曾 淑 慧 執 行 編 輯 : 豐 邑 建 設 企 劃 課 出 版 發 行 :

Chn 116 Neh.d.01.nis

Transcription:

KillTest 质量更高 服务更好 学习资料 http://www.killtest.cn 半年免费更新服务

Exam : 310-814 Title : Sun Certified MySQL Associate Version : Demo 1 / 12

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 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; 2.You work as a Database Administrator for a company. 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 Answer: A 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 4.You work as a Database Administrator for a company. 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. Answer: C 2 / 12

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 Answer: A 6.You work as a Database Administrator for a company. 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: Stu_IDNUMBER (3) PRIMARY KEY Stu_NameVARCHAR2 (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 Answer: C 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 Answer: A 8.You work as a Database Administrator for a company. 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); Answer: B 3 / 12

9.Fill in the blank with the appropriate term. A provides a concise and flexible means for matching strings of text, suchas particular characters, words, or patterns of characters. A. regular expression Answer: A 10.Which of the following are true about UPDATE statements? 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. Answer: A,B,C 11.DRAG DROP Drag and drop the correct constraint types to their corresponding specifications. Answer: 12.Which of the following statements is correct for equijoin used to join two tables named Employees and Department? 4 / 12

A. SELECTDept_Name, Emp_Name FROM Departments d1, Employees e1 ORDER BY Dept_Name, Emp_Name; B. SELECTD.Dept_Name, E.Emp_Name FROM Departments d1, Employees e1 HAVING Dept_Name, Emp_Name; C. SELECTE.Emp_Name, D. Dept_Name FROM Departments d1, Employees e1 WHERE Dept_No = Dept_No ORDER BY Dept_Name, Emp_Name; E. SELECTDept_Name, Emp_Name FROM Departments d1, Employees e1 WHERE d1.dept_no = e1.dept_no ORDER BY Dept_Name, Emp_Name; 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 14.Which of the following are the types of numeric literals that can be used in arithmetic expressions? A. Numeric B. Integer C. Binary D. Real Answer: B,D 15.You work as a Database Administrator for a company. The company uses MySQL as its database. You have written two statements, which are as follows: 1. SELECT DISTINCT OBJECT_TYPE FROM USER_OBJECTS; 2. SELECT OBJECT_TYPE FROM ALL_OBJECTS; Which of the following options explains the difference between the results of these two statements? 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. 5 / 12

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. Answer: B,C 16.Which of the following will be true about a table column if you plan to create an index on that column? 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. Answer: A,D 17.FreeE 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" GROUP BY CUSTOMER / B. SELECT CUSTOMER,SUM(UNITPRICE*QUANTITY) AS "TOTAL" WHERE SUM(UNITPRICE*QUANTITY)= (SELECT MAX(SUM(UNITPRICE*QUANTITY)) GROUP BY CUSTOMER) GROUP BY CUSTOMER / C. SELECT CUSTOMER,SUM(UNITPRICE*QUANTITY) AS "TOTAL" GROUP BY CUSTOMER HAVING SUM(UNITPRICE*QUANTITY)= (SELECT MAX(SUM(UNITPRICE*QUANTITY)) GROUP BY CUSTOMER) 6 / 12

/ D. SELECT CUSTOMER,SUM(UNITPRICE*QUANTITY) AS "TOTAL" GROUP BY CUSTOMER HAVING SUM(UNITPRICE*QUANTITY)= (SELECT SUM(UNITPRICE*QUANTITY) GROUP BY CUSTOMER) / Answer: C 18.You work as a Database Administrator for a company. 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. SELECTemp_id, emp_name FROM Employees ORDER BY emp_id; B. SELECTemp_id, emp_name FROM Employees; C. SELECT DISTINCTemp_id, emp_name FROM Employees; D. SELECTemp_id, emp_name FROM Employees GROUP BY emp_id; Answer: C 19.Adam works as a Database Administrator for a company. 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. SELECTemployee_id, last_name, job_id, department_id FROM Employees WHERE employee_id EXISTS (SELECT manager_id WHERE manager_id is NULL); B. SELECTemployee_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. SELECTemployee_id, last_name, job_id, department_id FROM Employees outer WHERE EXISTS (SELECT 'x' FROM Employees WHERE manager_id = outer.employee_id); D. SELECTemployee_id, last_name, job_id, department_id FROM Employees WHERE employee_idin (SELECT manager_id WHERE manager_id is NOT NULL); Answer: C 20.You work as a Database Administrator for a company. 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? 7 / 12

A. ROLLBACK B. REMOVE C. DELETE D. COMMIT Answer: A,D 21.You work as a Database Administrator for a company. 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 INDEXEmp_name_idx; B. CANCEL INDEXEmp_name_idx; C. REMOVE INDEXEmp_name_idx; D. DROP INDEXEmp_name_idx; 22.Which of the following statements will delete all the records from the table T1? A. TRUNCATE TABLE T1; B. DELETE FROM T1; C. DELETE * FROM T1; D. DELETE T1; Answer: A,B,D 23.You work as a Database Administrator for a company. 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. SELECTSUM(AVG(LENGTH(last_name))) FROM Employees HAVING department_id; B. SELECTSUM(AVG(LENGTH(last_name))) FROM Employees GROUP BY department_id; C. SELECTSUM(AVG(LENGTH(last_name))) FROM Employees WHERE department_id=not NU LL; D. SELECTSUM(AVG(LENGTH(last_name))) FROM Employees ORDER BY department_id; Answer: B 24.You work as a Database Administrator for a company. 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'. 8 / 12

Which of the following are the correct ways to use group functions? 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 Answer: B,D 25.Adam works as a Database Administrator for a company. 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? A. NUMBER B. NUMBER(p,s) C. DEFAULT D. BLOB Answer: A,B 26.Review the following ER diagram: 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? 9 / 12

Additionally the list should be ordered by CUST_LAST_NAME, CUST_FIRST_NAME and PROD_NAME. A. SELECTa.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 BYa.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. SELECTa.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. SELECTa.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; E. SELECTa.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. SELECTa.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; Answer: C 27.Speed Inc. is a courier company. It delivers letters, parcels, and other items to their desired 10 / 12

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 Answer: B 28.Considering the exhibit given below: SQL> INSERT INTO T1 VALUES (10,'JOHN'); 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; Savepointcreated SQL> UPDATE T1 2 SET NAME='SCOTT' 3 WHERE CUST_NBR=12; 1 row updated SQL> SAVEPOINT B; Savepointcreated 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 ---------------- --------- 10 JOHN B. CUST_NBR NAME ---------------- --------- 10 JOHN 12 SCOTT 11 / 12

15 ADAM C. CUST_NBR NAME ---------------- --------- 10 JOHN 15 ADAM D. CUST_NBR NAME ---------------- --------- 10 JOHN 12 SCOTT 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 30.Which of the following functions can be performed by a view? 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. Answer: A,C,D 12 / 12