Database Programming - Section 7. Instructor Guide

Size: px
Start display at page:

Download "Database Programming - Section 7. Instructor Guide"

Transcription

1 Database Programming - Section 7 Instructor Guide

2

3 Table of Contents...1 Lesson 1 - Multiple-Row Subqueries...1 What Will I Learn?...3 Why Learn It? Try It / Solve It...12 Lesson 2 - Practice Exercises and Quiz...18 What Will I Learn?...19 Why Learn It? Try It / Solve It...22 Lesson 3 - Practice Exercises and Quiz...27 What Will I Learn?...28 Why Learn It? Try It / Solve It...31 Lesson 4 - INSERT Statement...34 What Will I Learn?...36 Why Learn It? Try It / Solve It...46 Lesson 5 - Updating Column Values and Deleting Rows...50 What Will I Learn?...52 Why Learn It? Try It / Solve It...61 Page i

4

5 Lesson 1 - Multiple-Row Subqueries Lesson 1 - Multiple-Row Subqueries Lesson Preparation Review Study Guide requirements with students. Have students complete the study guides as part of the Try It / Solve It portion of the content. What to Watch For Students will have difficulty knowing how to break down a database request into the outer and inner query statements. Help them identify what information is needed before the outer query can execute. Finding this unknown information is the function of the inner query. Look for the keywords in the problem, such as greater than, in, less than all, equal to any. The keywords will be the operators for the outer query. These keywords can help divide the problem into the two queries. Connections Having to find information before something else can be accomplished should be familiar to students. Relate subqueries to data modeling. How could students have designed database tables without knowing the entities, attributes, and relationships used to define the database? In fact, nothing can be done before knowing what the business needs are. Meeting with clients, interviewing key people, and examining business documents are all part of the process to find out what businesses do and what information is critical to know to build a database. Page 1

6 Ask students, as data modelers, if they think that they could encounter a business that really isn't clear on what its business needs are? Possible answer: Whether selling tires or designing software, most businesses are good at the business they do. Knowing how to create an ERD or build a database is probably not something that most businesses have the time, expertise, or resources to accomplish. How far back do you have to go to find the information needed to solve a problem? Possible answer: As a data modeler, it is your job to model the information needs of the business. The more information you have about the business, the more accurately it could be modeled. However, usually time and resources limit an endless search. Somewhere in between is the compromise that becomes the database. Page 2

7 What Will I Learn? What Will I Learn? Page 3

8 Why Learn It? Why Learn It? Why Learn It? Use the graphic to review the structure of a subquery. Point out the IN operator. Explain in this lesson that students will use a new set of operators to process subqueries that return more than one value. Page 4

9 Read through the steps in "How to Write a Subquery." Use the example to demonstrate each step. Page 5

10 To review previous material, ask students to write a query to find the name of the Global Fast Foods employee who makes the most money. Page 6

11 Point out to students the subquery results set and show the values returned by the subquery become the values the outer query uses to restrict the rows returned. Ask students what will be returned from the outer query if there are no CD numbers less than 94. Answer: No rows will be returned if a NULL value is returned by the subquery. Page 7

12 Point out to students the use of ANY. In this case, if there are years in the d_cds table that have null values, the subquery will not return null as long as there are other nonnull values in the year column. Page 8

13 Explain the graphic. Ask students to state what =ALL, < ALL and <> ALL would return in the example shown in the graphic. =ALL The outer query would only return those titles that had years = ALL. In this case, no data is found. There is no entry with "The Music Man" producer, one year 2000 and the other <ALL The outer query would only return those titles that had years less than all the years from "The Music Man" producer. <>ALL The outer query would only return those titles that did not have any of the years returned by the subquery from "The Music Man" producer. Page 9

14 Review the idea of something being NOT IN. Use a simple example such as "I need to speak to all the students NOT IN jazz band." If an inner query returns a null, how can the WHERE clause have a value not in an absent or unavailable value? Page 10

15 Deconstruct the two almost identical queries for practice. Help students work through what happens in each type of subquery. Answer: The single-row subquery inner query found the lowest salary in department 50 (2500). The outer query then selected all the departments that had their lowest salary greater than that from department 50. The multiple-row inner query also selected the department 50 salary of No other department had a lowest salary the same as department 50. Page 11

16 Try It / Solve It Try It / Solve It Try It / Solve It Answers: 1. SELECT title, year FROM d_cds WHERE year < (SELECT year FROM d_cds WHERE title LIKE 'Carpe Diem'); 2. SELECT * FROM d_songs WHERE type_code IN (SELECT type_code FROM d_types WHERE description IN ('Jazz','Pop')); Page 12

17 3. SELECT name, cost, package_code FROM d_events where cost <= (SELECT low_range FROM d_packages WHERE code = 200); Page 13

18 Try It / Solve It Try It / Solve It Try It / Solve It Answers: 4. SELECT last_name FROM employees WHERE salary = ANY (SELECT MIN(salary) FROM employees GROUP BY department_id); Page 14

19 5. Point out that there can be more than one way of getting the required information. (multiple row subquery) SELECT first_name, last_name (single-row subquery) FROM f_staffs SELECT first_name, last_name WHERE salary <= ALL FROM f_staffs (SELECT salary WHERE salary= FROM f_staffs); (SELECT min(salary) FROM f_staffs); 6. a. < b. < ANY c. IN or = ANY d. > ALL Page 15

20 Try It / Solve It Try It / Solve It Try It / Solve It Answers: 7. a and d are True 8. SELECT department_id, MIN(salary) FROM employees GROUP BY department_id HAVING MIN(salary) < (SELECT MIN(salary) FROM employees WHERE department_id = 50); Page 16

21 Try It / Solve It Try It / Solve It Try It / Solve It Answers: 9. True: b, d 10. a, b, c, d could be returned Page 17

22 Lesson 2 - Practice Exercises and Quiz Lesson 2 - Practice Exercises and Quiz Lesson Preparation There are 13 review questions to prepare students for the quiz in Lesson 3. Questions 1-8 are listed in Try It / Solve It in this lesson. The remaining questions appear in Try It / Solve It in Lesson 3. The Study Guide for this section should also be completed by students before taking the quiz. What to Watch For Students may not look carefully at the data returned from a query to verify that the results are desired. Spot-check for accuracy. Connections None. Page 18

23 What Will I Learn? What Will I Learn? Page 19

24 Why Learn It? Why Learn It? Page 20

25 Page 21

26 Try It / Solve It Try It / Solve It Try It / Solve It Answers: To check for understanding, assign one practice exercise at a time. Review the syntax and results with students. 1. a. SELECT last_name,job_id, salary FROM employees WHERE department_id in (10,30); b. SELECT last_name,job_id, salary FROM employees WHERE department_id = 10 or department_id=30; c. This is not the most efficient answer, but it does return the correct results: SELECT last_name,job_id,salary FROM employees WHERE department_id IN( SELECT department_id FROM departments WHERE department_id IN (10,30)); Page 22

27 2. SELECT department_name, location_id FROM departments ORDER BY department_id; Page 23

28 Try It / Solve It Try It / Solve It Try It / Solve It Answers: 3. SELECT e.last_name,e.job_id, TO_CHAR(salary, '$999,999.00'),d.location_id FROM employees e,departments d WHERE e.department_id=d.department_id ORDER BY job_id, salary DESC; 4. SELECT e.last_name,e.job_id,e.salary FROM employees e, job_grades s WHERE e.salary = s.highest_sal or e.salary =s.lowest_sal; Page 24

29 Try It / Solve It Try It / Solve It Try It / Solve It Answers: 5. SELECT e.department_id, d.department_name, COUNT(last_name), SUM(salary), AVG(salary) FROM employees e, departments d WHERE e.department_id = d.department_id GROUP BY e.department_id,d.department_name; 6. SELECT last_name,job_id,department_id FROM employees WHERE department_id IN (SELECT department_id FROM employees GROUP BY department_id HAVING count(*) > 3) ORDER BY department_id; Page 25

30 Try It / Solve It Try It / Solve It Try It / Solve It Answers: 7. SELECT last_name, job_id, salary, hire_date FROM employees WHERE hire_date = (SELECT MIN(hire_date) FROM employees); SELECT last_name, job_id, salary, hire_date FROM employees WHERE hire_date <=ALL (SELECT hire_date FROM employees) 8. SELECT last_name, job_id, salary, LPAD(NVL(TO_CHAR(commission_pct),'NA'),10) commission_pct FROM employees ORDER BY salary DESC; Page 26

31 Lesson 3 - Practice Exercises and Quiz Lesson 3 - Practice Exercises and Quiz Lesson Preparation Ask students if there are any outstanding questions. The questions in this section's practice exercises use subqueries to reinforce case manipulation, date, and number functions. What to Watch For Successfully pass 70% or better on quiz. Connections None. Page 27

32 What Will I Learn? What Will I Learn? Page 28

33 Why Learn It? Why Learn It? Page 29

34 Page 30

35 Try It / Solve It Try It / Solve It Try It / Solve It Answers: 1. SELECT 'The artist of "' title '"' ' is ' artist AS "DJ On Demand Songs" FROM d_songs WHERE type_code = (SELECT type_code FROM d_songs WHERE title LIKE 'Im Going to Miss My Teacher'); 2. SELECT last_name, TO_CHAR(salary, '$99,999.99')AS "Monthly Salary" FROM employees WHERE salary < (SELECT MAX(salary) FROM employees WHERE job_id LIKE 'MK\_REP'ESCAPE'\'); Page 31

36 Try It / Solve It Try It / Solve It Try It / Solve It Answers: 3. SELECT song_id FROM d_play_list_items WHERE event_id= (SELECT event_id FROM d_play_list_items WHERE song_id = 45); 4. SELECT c.first_name, c.last_name, d.name FROM d_clients c, d_events d WHERE c.client_number = d.client_number and d.cost > (SELECT cost FROM d_events WHERE id = 100); Page 32

37 Try It / Solve It Try It / Solve It Try It / Solve It Answers: 5. SELECT last_name FROM f_staffs WHERE salary > (SELECT salary FROM f_staffs WHERE id = 12); Page 33

38 Lesson 4 - INSERT Statement Lesson 4 - INSERT Statement Lesson Preparation This section begins the SQL syntax commonly referred to as data manipulation language (DML). Before beginning the section, it would be beneficial for students to do a DESCRIBE tablename for each table in the DJs on Demand and Global Fast Foods databases. Even though data may appear to be a number value in a row, it may be stored as CHAR or VARCHAR2 and require single quotation marks in the DML statements. This may eliminate problems that students can encounter, such as it doesn't run! What to Watch For Students will try to insert values into a table without checking the data types or null value requirements. Discourage frivolous data! Use student names to generate interest. Page 34

39 Connections Extension: Students can begin creating an address-book table of their family, relatives, and friends. The table would be useful for addressing graduation announcements, holiday cards, birthdays, or party invitations. Use the CREATE TABLE format example shown. Don't worry about null values or primary keys. The idea is to create a table and use the INSERT statement to populate it. CREATE TABLE ADDRESS_BOOK ( first_name VARCHAR2(15), last_name VARCHAR2(15), street_address VARCHAR2(20), city VARCHAR2(15), state VARCHAR2(15), country VARCHAR2(15), zip_postal_code VARCHAR2(15), phone_number VARCHAR2(15), VARCHAR2(20), birthday DATE) ; Page 35

40 What Will I Learn? What Will I Learn? What Will I Learn? Students will be excited about being able to make changes to the databases. Let them know that, if they alter or delete tables in their schema, they will be responsible for restoring them. Help them start thinking like real DBAs. To discourage students from creating frivolous examples, give them the specific data provided in the practice problems for each example. This will make checking for understanding easier. To keep their schema tables in their original state, have students make a copy of each table. Use the following statement to accomplish this task. Name each table copy_tablename. Students should use the copy tables for the DML practices in the following lessons. The table copies do not inherit the associated primary- to foreign-key integrity rules (relationship constraints) of the original tables. The column data types, however, are inherited in the copied tables. Using copies of the original tables will eliminate having to deal with errors when trying to enter foreign-key values before primary keys are established or deleting primary keys when foreign keys exist. In subsequent sections, the constraints will be added to the copy tables. CREATE TABLE copy_employees AS (SELECT * FROM employees); To verify and view the copy_tablename table, use the following SELECT statement: SELECT * FROM copy_employees; Page 36

41 Why Learn It? Why Learn It? Why Learn It? Use the graphic to review the structure of a subquery. Point out the IN operator. Explain that in this lesson students will use a new set of operators to process subqueries that return more than one value. Page 37

42 Begin this lesson with a review question. Why do we use ANY and ALL with subqueries? Answer: When the inner query is expected to return more than one row, IN, ANY, and ALL are used in the WHERE clause of the outer query. The statement WHERE id = multiple values doesn't make sense: ID can be equal to only one value. If multiple values are expected from the inner query, then IN, ANY, and ALL are appropriate. Page 38

43 Remind students that if they are unsure about the data type of a column, they can do a DESCRIBE tablename. This is important because number values should not be enclosed in single quotes. Implicit conversion may take place for numeric values assigned to NUMBER data type columns if single quotes are included. For example, although the literal string '10' has data type CHAR, Oracle automatically converts it to the NUMBER data type if it appears in a numeric expression. This conversion may not be what you wanted. You may want 10 to remain a CHAR data type. Page 39

44 Review the graphic with students. Briefly explain the Type column and the different data types. Point out the Length column and the Precision column for numbers: precision is the total number of decimal digits, and the scale is the number of digits to the right of the decimal place. Page 40

45 The example attempts to enter data into the table, but other columns that cannot have null values have been left out of the INSERT statement. Page 41

46 Ask students to insert the copy_employees data and then execute a SELECT * FROM copy_employees for employee_id 1001 only. Compare student results with the example shown in the graphic. Page 42

47 Discuss the graphic with students. Page 43

48 Explain syntax to students. Page 44

49 Explain syntax to students. Page 45

50 Try It / Solve It Try It / Solve It Try It / Solve It Students should execute DESC tablename before doing this INSERT to view the data types for each column. VARCHAR2 data-type entries need single quotation marks in the VALUES statement. 1. Students will enter the four new rows to the copy_d_cds table using an explicit INSERT statement. Demonstrate inserting the first CD using an explicit INSERT statement: INSERT INTO copy_d_cds(cd_number, title, producer, year) VALUES (97, 'Celebrate The Day', 'R&B Inc.', 2003); To verify the entry, SELECT* FROM copy_d_cds/ 2. Demonstrate inserting the first song using an implicit INSERT statement: INSERT INTO copy_d_songs VALUES(52, 'Surfing Summer', null, null, 12); 3. Demonstrate inserting a new client using: INSERT INTO copy_d_clients VALUES(6655, 'Ayako', 'Dahish', , 'dahisha@harbor.net'); Page 46

51 4. The COST column is mandatory, but the cost is not known at the time of insert. Zero (0) will have to be inserted as the default cost. Demonstrate inserting a new events using: INSERT INTO copy_d_events (ID, NAME, EVENT_DATE, DESCRIPTION, COST, VALUE_ID, PACKAGE_CODE, THEME_CODE, CLIENT_NUMBER) VALUES(110, 'Ayako Anniversary', TO_DATE('07-JUL-04','DD-MON-RR'), 'Party for 50, sixties dress, decorations', NULL, 0, 245,79,240,6655); Page 47

52 Try It / Solve It Try It / Solve It Try It / Solve It Students should execute DESC tablename before doing this INSERT to view the data types for each column. VARCHAR2 data-type entries need single quotation marks in the VALUES statement. 1. Students will enter the four new rows to the copy_d_cds table using an explicit INSERT statement. Demonstrate inserting the first CD using an explicit INSERT statement: INSERT INTO copy_d_cds(cd_number, title, producer, year) VALUES (97, 'Celebrate The Day', 'R&B Inc.', 2003); To verify the entry, SELECT* FROM copy_d_cds/ 2. Demonstrate inserting the first song using an implicit INSERT statement: INSERT INTO copy_d_songs VALUES(52, 'Surfing Summer', null, null, 12); 3. Demonstrate inserting a new client using: INSERT INTO copy_d_clients VALUES(6655, 'Ayako', 'Dahish', , 'dahisha@harbor.net'); Page 48

53 4. The COST column is mandatory, but the cost is not known at the time of insert. Zero (0) will have to be inserted as the default cost. Demonstrate inserting a new events using: INSERT INTO copy_d_events (ID, NAME, EVENT_DATE, DESCRIPTION, COST, VALUE_ID, PACKAGE_CODE, THEME_CODE, CLIENT_NUMBER) VALUES(110, 'Ayako Anniversary', TO_DATE('07-JUL-04','DD-MON-RR'), 'Party for 50, sixties dress, decorations', NULL, 0, 245,79,240,6655); Page 49

54 Lesson 5 - Updating Column Values and Deleting Rows Lesson 5 - Updating Column Values and Deleting Rows Lesson Preparation Any time you have extra time in class, have students work on the self-test software questions in the section called "Manipulating Data." Remind students to use the copy tables for the following practices. What to Watch For Differentiating between each of the DML statements that use subqueries to make database changes can be challenging. Do the practice problems and identify which type of subquery is needed: - Subquery to insert rows - Subquery in place of a table name - Subquery to copy rows from another table - Subquery to update rows based on another table - Subquery to delete rows based on another table Page 50

55 Connections Students can continue adding, updating, and deleting entries in their address-book table. Ask them to put you in as a teacher with your school address. Don't give all your information at one time. Students can do UPDATE statements as you add information. Page 51

56 What Will I Learn? What Will I Learn? What Will I Learn? Students are using copies of the original database tables. The foreign-key and primary-key integrity constraints were not carried over when the copies were made. Discuss what would occur in tables where the constraints were established. If the primary/foreign-key constraints were carried over, a value in a foreign-key column could not be inserted into a table if a corresponding primary-key value did not exist. Conversely, a primary-key value could not be deleted if foreign-key dependencies existed (except for foreign keys defined with ON DELETE CASCADE). Ask students why they think a primary-key value can't be deleted if foreign-key values are present. It would violate referential integrity. In Section 10, students will add primary and foreign-key constraints to the copied tables. At that point, they will do INSERT and DELETE statements that will have to take primary and foreign-key constraints into consideration. This section's objective is for students to be able to execute UPDATE and DELETE statements only. Page 52

57 Why Learn It? Why Learn It? Why Learn It? Encourage students to "think like a professional." This will help curb problems with students deliberately deleting tables in their schema and depending on you to help restore them. Also, remind them to use only their copy_tablename tables in all DML transactions. Page 53

58 Discuss the question: What do you predict would be updated in the table in the following transaction? UPDATE copy_f_customers SET phone_number=' '; Answer: All rows in the table will be changed! Ask students what is different between the INSERT statement and the UPDATE statement. Answers include: INSERT uses a VALUES list; UPDATE uses a SET statement Page 54

59 Step through the purpose of the subquery. The UPDATE statement is designed to change the salary and staff type of an employee (ID = 12) to the same information as another employee (ID = 9). The subquery retrieves the "other employee" information first, which is then used in the UPDATE and SET clauses. Ask students to write a query for the graphic. UPDATE copy_f_food_items SET price =1.20 WHERE food_item_number =90; UPDATE copy_f_food_items SET price = 3.85 WHERE food_item_number =93; Page 55

60 Page 56

61 Integrity constraints will be discussed in depth in subsequent sections. Page 57

62 What do you predict will be deleted if the WHERE clause is eliminated from the prior example? Answer: All rows in the table are deleted if you omit the WHERE clause. Page 58

63 Warn students of the power of the DELETE statement and the effect it can have on their schema tables and rows. Encourage students to make copies of each table for experimentation purposes. Page 59

64 Page 60

65 Try It / Solve It Try It / Solve It Try It / Solve It Answers: 1. UPDATE copy_f_food_items SET price = 3.75 WHERE description = 'Strawberry Shake'; UPDATE copy_f_food_items SET price =1.20 WHERE description = 'Fries'; 2. UPDATE copy_f_staffs SET overtime_rate = NVL(overtime_rate,0) +.75 WHERE id = (SELECT id FROM copy_f_staffs WHERE first_name = 'Bob' and last_name = 'Miller'); or Page 61

66 UPDATE copy_f_staffs SET overtime_rate = NVL(overtime_rate,0) WHERE last_name = 'Miller' AND first_name = 'Bob'; UPDATE copy_f_staffs SET overtime_rate = overtime_rate +.85 WHERE id = (SELECT id FROM copy_f_staffs WHERE first_name = 'Sue' and last_name = 'Doe'); UPDATE copy_f_staffs SET overtime_rate = overtime_rate +.85 WHERE last_name = 'Doe' AND first_name = 'Sue'; Page 62

67 Try It / Solve It Try It / Solve It Try It / Solve It 4. INSERT INTO copy_f_customers(id, first_name, last_name, address, city, state, zip, phone_number) VALUES (145, 'Katie', 'Hernandez', '92 Chico Way', 'Los Angeles', 'CA', 98008, ) INSERT INTO copy_f_customers(id, first_name, last_name, address, city, state, zip, phone_number) VALUES (225, 'Daniel', 'Spode', '1923 Silverado Street', 'Denver', 'CO', 98107, ) You cannot insert the Adam Zum because the zip cannot be null. 5. UPDATE copy_f_staffs SET salary = (SELECT salary FROM copy_f_staffs WHERE first_name = 'Bob' and last_name = 'Miller') WHERE first_name = 'Sue' and last_name ='Doe'; Page 63

68 6. INSERT INTO copy_f_staffs(id, first_name, last_name,birthdate,salary, overtime_rate, training, staff_type, manager_id, manager_budget, manager_target) VALUES (25, 'Kai', 'Kim', '03-NOV-88', 6.75, null, null, 'Order Taker', null, null, null) Page 64

69 Try It / Solve It Try It / Solve It Try It / Solve It 7. UPDATE copy_f_staffs SET manager_id = (SELECT manager_id FROM copy_f_staffs WHERE first_name = 'Sue' AND last_name = 'Doe') WHERE ID = 25; 8. Department 60 cannot be deleted because it contains a primary key that is used as a foreign key in another table. Explain: This is a violation of an integrity constraint. 9. DELETE from copy_f_staffs WHERE ID = 25; OR Page 65

70 DELETE FROM copy_f_staffs WHERE last_name = 'Kai' AND first_name = 'Kim' SELECT * FROM copy_f_staffs; Page 66

DUE: CD_NUMBER TITLE PRODUCER YEAR 97 Celebrate the Day R & B Inc Holiday Tunes for All Tunes are US 2004

DUE: CD_NUMBER TITLE PRODUCER YEAR 97 Celebrate the Day R & B Inc Holiday Tunes for All Tunes are US 2004 CIS 207 Oracle - Database Programming and SQL HOMEWORK: # 12 DUE: Run the following queries in Oracle Application Express. Paste a copy of each query Into this word document below the questions, save and

More information

Updating Column Values and Deleting Rows. Copyright 2008, Oracle. All rights reserved.

Updating Column Values and Deleting Rows. Copyright 2008, Oracle. All rights reserved. Updating Column Values and Deleting Rows What Will I Learn? In this lesson, you will learn to: Construct and execute an UPDATE statement Construct and execute a DELETE statement Construct and execute a

More information

CS 275 Winter 2011 Problem Set 3

CS 275 Winter 2011 Problem Set 3 CS 275 Winter 2011 Problem Set 3 Run the following quires in Oracle Application Express where appropriate. Cut and paste your query for each applicable question. For short answer or multiple choice type

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

Database Programming - Section 10. Instructor Guide

Database Programming - Section 10. Instructor Guide Database Programming - Section 10 Instructor Guide Table of Contents...1 Lesson 1 - Defining NOT NULL and UNIQUE Constraints...1 What Will I Learn?...2 Why Learn It?...3...4 Try It / Solve It...13 Lesson

More information

Database Programming - Section 11. Instructor Guide

Database Programming - Section 11. Instructor Guide Database Programming - Section 11 Instructor Guide Table of Contents...1 Lesson 1 - In-Class Interview...1 What Will I Learn?...3 Why Learn It?...4...5 Try It / Solve It...9 Lesson 2 - Creating Views...12

More information

CIS 207 Oracle - Database Programming and SQL HOMEWORK: # 13

CIS 207 Oracle - Database Programming and SQL HOMEWORK: # 13 CIS 207 Oracle - Database Programming and SQL HOMEWORK: # 13 DUE: Run the following queries in Oracle Application Express. Paste a copy of each query Into this word document below the questions or notepad.txt

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

Manipulating Data. Copyright 2004, Oracle. All rights reserved.

Manipulating Data. Copyright 2004, Oracle. All rights reserved. Manipulating Data Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Describe each data manipulation language (DML) statement

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

Database Programming - Section 3. Instructor Guide

Database Programming - Section 3. Instructor Guide Database Programming - Section 3 Instructor Guide Table of Contents...1 Lesson 1 - Destinations: What's in My Future?...1 What Will I Learn?...3 Why Learn It?...4 Tell Me / Show Me...5 Try It / Solve

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

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

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

DUE: 9. Create a query that will return the average order total for all Global Fast Foods orders from January 1, 2002, to December 21, 2002.

DUE: 9. Create a query that will return the average order total for all Global Fast Foods orders from January 1, 2002, to December 21, 2002. CIS 207 Oracle - Database Programming and SQL HOMEWORK: # 10 DUE: Run the following queries in Oracle Application Express. Paste a copy of each query Into this word document below the questions or notepad.txt

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

Retrieving Data from Multiple Tables

Retrieving Data from Multiple Tables Islamic University of Gaza Faculty of Engineering Computer Engineering Dept. Database Lab (ECOM 4113) Lab 5 Retrieving Data from Multiple Tables Eng. Mohammed Alokshiya November 2, 2014 An JOIN clause

More information

Additional Practice Solutions

Additional Practice Solutions Additional Practice Solutions Additional Practices Solutions The following exercises can be used for extra practice after you have discussed the data manipulation language (DML) and data definition language

More information

Limit Rows Selected. Copyright 2008, Oracle. All rights reserved.

Limit Rows Selected. Copyright 2008, Oracle. All rights reserved. What Will I Learn? In this lesson, you will learn to: Apply SQL syntax to restrict the rows returned from a query Demonstrate application of the WHERE clause syntax Explain why it is important, from a

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

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

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

Táblák tartalmának módosítása. Copyright 2004, Oracle. All rights reserved.

Táblák tartalmának módosítása. Copyright 2004, Oracle. All rights reserved. Táblák tartalmának módosítása Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Describe each data manipulation language (DML)

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

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

EXISTS NOT EXISTS WITH

EXISTS NOT EXISTS WITH Subquery II. Objectives After completing this lesson, you should be able to do the following: Write a multiple-column subquery Use scalar subqueries in SQL Solve problems with correlated subqueries Update

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

HR Database. Sample Output from TechWriter 2007 for Databases

HR Database. Sample Output from TechWriter 2007 for Databases Table of Contents...3 Tables... 4 COUNTRIES... 5 DEPARTMENTS... 6 EMPLOYEES... 7 JOBS... 9 JOB_HISTORY... 10 LOCATIONS...12 REGIONS...13 Views...14 EMP_DETAILS_VIEW... 15 Procedures...17 SECURE_DML...18

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

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

Working with Columns, Characters and Rows. Copyright 2008, Oracle. All rights reserved.

Working with Columns, Characters and Rows. Copyright 2008, Oracle. All rights reserved. Working with Columns, Characters and Rows What Will I Learn? In this lesson, you will learn to: Apply the concatenation operator to link columns to other columns, arithmetic expressions or constant values

More information

Institute of Aga. Microsoft SQL Server LECTURER NIYAZ M. SALIH

Institute of Aga. Microsoft SQL Server LECTURER NIYAZ M. SALIH Institute of Aga 2018 Microsoft SQL Server 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

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

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

Database Design - Section 18. Instructor Guide

Database Design - Section 18. Instructor Guide Instructor Guide Table of Contents...1 Lesson 1 - Logical Comparisons and Precedence Rules...1 What Will I Learn?...2 Why Learn It?...3 Tell Me / Show Me...4 Try It / Solve It...11 Lesson 2 - Sorting

More information

Database Programming - Section 8. Instructor Guide

Database Programming - Section 8. Instructor Guide Database Programming - Section 8 Instructor Guide Table of Contents...1 Lesson 1 - DEFAULT Values and the MERGE Statement...1 What Will I Learn?...3 Why Learn It?...4 Tell Me / Show Me...5 Try It / Solve

More information

School of Computing and Information Technology. Examination Paper Autumn Session 2017

School of Computing and Information Technology. Examination Paper Autumn Session 2017 School of Computing and Information Technology CSIT115 Data Management and Security Wollongong Campus Student to complete: Family name Other names Student number Table number Examination Paper Autumn Session

More information

Alkérdések II. Copyright 2004, Oracle. All rights reserved.

Alkérdések II. Copyright 2004, Oracle. All rights reserved. Alkérdések II. Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Write a multiple-column subquery Use scalar subqueries in SQL

More information

What Are Group Functions? Reporting Aggregated Data Using the Group Functions. Objectives. Types of Group Functions

What Are Group Functions? Reporting Aggregated Data Using the Group Functions. Objectives. Types of Group Functions What Are Group Functions? Group functions operate on sets of rows to give one result per group. Reporting Aggregated Data Using the Group Functions Maximum salary in table Copyright 2004, Oracle. All rights

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

Creating Other Schema Objects

Creating Other Schema Objects Creating Other Schema Objects Objectives After completing this lesson, you should be able to do the following: Create simple and complex views Retrieve data from views Database Objects Object Table View

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 Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Limit the rows that are retrieved by a query Sort

More information

Database Programming - Section 1. Instructor Guide

Database Programming - Section 1. Instructor Guide Database Programming - Section 1 Instructor Guide Table of Contents...1 Lesson 1 - Case and Character Manipulation...1 What Will I Learn?...2 Why Learn It?...3...4 Try It / Solve It...10 Lesson 2 - Number

More information

Assignment Grading Rubric

Assignment Grading Rubric Final Project Outcomes addressed in this activity: Overview and Directions: 1. Create a new Empty Database called Final 2. CREATE TABLES The create table statements should work without errors, have the

More information

RETRIEVING DATA USING THE SQL SELECT STATEMENT

RETRIEVING DATA USING THE SQL SELECT STATEMENT RETRIEVING DATA USING THE SQL SELECT STATEMENT Course Objectives List the capabilities of SQL SELECT statements Execute a basic SELECT statement Development Environments for SQL Lesson Agenda Basic SELECT

More information

School of Computing and Information Technology Session: Spring CSCI835 Database Systems (Bridging Subject) Sample class test 23 July 2018

School of Computing and Information Technology Session: Spring CSCI835 Database Systems (Bridging Subject) Sample class test 23 July 2018 School of Computing and Information Technology Session: Spring 2018 University of Wollongong Lecturer: Janusz R. Getta CSCI835 Database Systems (Bridging Subject) Sample class test 23 July 2018 THE QUESTIONS

More information

DEFAULT Values, MERGE, and Multi-Table Inserts. Copyright 2009, Oracle. All rights reserved.

DEFAULT Values, MERGE, and Multi-Table Inserts. Copyright 2009, Oracle. All rights reserved. DEFAULT Values, MERGE, and Multi-Table Inserts What Will I Learn? In this lesson, you will learn to: Understand when to specify a DEFAULT value Construct and execute a MERGE statement Construct and execute

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 Fundamentals I

Oracle Database 11g: SQL Fundamentals I Oracle Database 11g: SQL Fundamentals I Volume II Student Guide D49996GC20 Edition 2.0 October 2009 D63148 Authors Salome Clement Brian Pottle Puja Singh Technical Contributors and Reviewers Anjulaponni

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

QUETZALANDIA.COM. 5. Data Manipulation Language

QUETZALANDIA.COM. 5. Data Manipulation Language 5. Data Manipulation Language 5.1 OBJECTIVES This chapter involves SQL Data Manipulation Language Commands. At the end of this chapter, students should: Be familiar with the syntax of SQL DML commands

More information

Using the Set Operators. Copyright 2006, Oracle. All rights reserved.

Using the Set Operators. Copyright 2006, Oracle. All rights reserved. Using the Set Operators Objectives After completing this lesson, you should be able to do the following: Describe set operators Use a set operator to combine multiple queries into a single query Control

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

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

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

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

Série n 6 Bis : Ateliers SQL Data Modeler (Oracle)

Série n 6 Bis : Ateliers SQL Data Modeler (Oracle) Série n 6 Bis : Ateliers SQL Data Modeler (Oracle) Getting started with data Modeler Adding a Table to An Existing Database Purpose This tutorial shows you how to add a table to an existing database using

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

Conversion Functions

Conversion Functions Conversion Functions Data type conversion Implicit data type conversion Explicit data type conversion 3-1 Implicit Data Type Conversion For assignments, the Oracle server can automatically convert the

More information

RESTRICTING AND SORTING DATA

RESTRICTING AND SORTING DATA RESTRICTING AND SORTING DATA http://www.tutorialspoint.com/sql_certificate/restricting_and_sorting_data.htm Copyright tutorialspoint.com The essential capabilities of SELECT statement are Selection, Projection

More information

Oracle Database 10g: SQL Fundamentals II

Oracle Database 10g: SQL Fundamentals II D17111GC30 Edition 3.0 January 2009 D57874 Oracle Database 10g: SQL Fundamentals II Student Guide Volume 2 Authors Salome Clement Chaitanya Koratamaddi Priya Vennapusa Technical Contributors and Reviewers

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

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

Database Programming with SQL 5-1 Conversion Functions. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Database Programming with SQL 5-1 Conversion Functions. Copyright 2015, Oracle and/or its affiliates. All rights reserved. Database Programming with SQL 5-1 Objectives This lesson covers the following objectives: Provide an example of an explicit data-type conversion and an implicit data-type conversion Explain why it is important,

More information

Creating Other Schema Objects. Copyright 2004, Oracle. All rights reserved.

Creating Other Schema Objects. Copyright 2004, Oracle. All rights reserved. Creating Other Schema Objects Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Create simple and complex views Retrieve data

More information

Fravo.com. Certification Made Easy. World No1 Cert Guides. Introduction to Oracle9i: SQL Exam 1Z Edition 1.0

Fravo.com. Certification Made Easy. World No1 Cert Guides. Introduction to Oracle9i: SQL Exam 1Z Edition 1.0 Fravo.com Certification Made Easy M C S E, C C N A, C C N P, O C P, C I W, J A V A, S u n S o l a r i s, C h e c k p o i n t World No1 Cert Guides info@fravo.com Introduction to Oracle9i: SQL Exam 1Z0-007

More information

Bsc (Hons) Software Engineering. Examinations for / Semester 1. Resit Examinations for BSE/15A/FT & BSE/16A/FT

Bsc (Hons) Software Engineering. Examinations for / Semester 1. Resit Examinations for BSE/15A/FT & BSE/16A/FT Bsc (Hons) Software Engineering Cohort: BSE/16B/FT Examinations for 2017-2018 / Semester 1 Resit Examinations for BSE/15A/FT & BSE/16A/FT MODULE: DATABASE APPLICATION DEVELOPMENT MODULE CODE: DBT2113C

More information

Reporting Aggregated Data Using the Group Functions. Copyright 2004, Oracle. All rights reserved.

Reporting Aggregated Data Using the Group Functions. Copyright 2004, Oracle. All rights reserved. Reporting Aggregated Data Using the Group Functions Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Identify the available

More information

CBO SQL TRANSFORMER Document describes a few examples of transformations made by CBO.

CBO SQL TRANSFORMER Document describes a few examples of transformations made by CBO. 2013 CBO SQL TRANSFORMER Document describes a few examples of transformations made by CBO. Environment description OS - Oracle Linux Server release 6.3 x64 Database Oracle Database 11.2.0.3 EE with sample

More information

Introduction to Oracle9i: SQL

Introduction to Oracle9i: SQL Introduction to Oracle9i: SQL Additional Practices Volume 3 40049GC11 Production 1.1 October 2001 D33992 Authors Nancy Greenberg Priya Nathan Technical Contributors and Reviewers Josephine Turner Martin

More information

Lecture10: Data Manipulation in SQL, Advanced SQL queries

Lecture10: Data Manipulation in SQL, Advanced SQL queries IS220 / IS422 : Database Fundamentals : Data Manipulation in SQL, Advanced SQL queries Ref. Chapter5 Prepared by L. Nouf Almujally & Aisha AlArfaj College of Computer and Information Sciences - Information

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

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

CREATE TABLE COUNTRIES (COUNTRY_ID CHAR(2), COUNTRY_NAME VARCHAR2(40), REGION_ID NUMBER(4)); INSERT INTO COUNTRIES VALUES ('CA','Canada',2); INSERT INTO COUNTRIES VALUES ('DE','Germany',1); INSERT INTO

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

LECTURE10: DATA MANIPULATION IN SQL, ADVANCED SQL QUERIES

LECTURE10: DATA MANIPULATION IN SQL, ADVANCED SQL QUERIES LECTURE10: DATA MANIPULATION IN SQL, ADVANCED SQL QUERIES Ref. Chapter5 From Database Systems: A Practical Approach to Design, Implementation and Management. Thomas Connolly, Carolyn Begg. 1 IS220: D a

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

EE221 Databases Practicals Manual

EE221 Databases Practicals Manual EE221 Databases Practicals Manual Lab 1 An Introduction to SQL Lab 2 Database Creation and Querying using SQL Assignment Data Analysis, Database Design, Implementation and Relation Normalisation School

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

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

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

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

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

2. What privilege should a user be given to create tables? The CREATE TABLE privilege

2. What privilege should a user be given to create tables? The CREATE TABLE privilege Practice 1: Solutions To complete question 6 and the subsequent questions, you need to connect to the database using isql*plus. To do this, launch the Internet Explorer browser from the desktop of your

More information

Oracle Database 10g: SQL Fundamentals I

Oracle Database 10g: SQL Fundamentals I Oracle Database 10g: SQL Fundamentals I Electronic Presentation D17108GC11 Production 1.1 August 2004 D39769 Author Nancy Greenberg Technical Contributors and Reviewers Wayne Abbott Christian Bauwens Perry

More information

SQL: Concepts. Todd Bacastow IST 210: Organization of Data 2/17/ IST 210

SQL: Concepts. Todd Bacastow IST 210: Organization of Data 2/17/ IST 210 SQL: Concepts Todd Bacastow IST 210: Organization of Data 2/17/2004 1 Design questions How many entities are there? What are the major entities? What are the attributes of each entity? Is there a unique

More information

Subquery: There are basically three types of subqueries are:

Subquery: There are basically three types of subqueries are: Subquery: It is also known as Nested query. Sub queries are queries nested inside other queries, marked off with parentheses, and sometimes referred to as "inner" queries within "outer" queries. Subquery

More information

Database Programming with PL/SQL

Database Programming with PL/SQL Database Programming with PL/SQL 3-3 Objectives This lesson covers the following objectives: Construct and execute PL/SQL statements that manipulate data with DML statements Describe when to use implicit

More information

Using DbVisualizer Variables

Using DbVisualizer Variables Using DbVisualizer Variables DbVisualizer variables are used to build parameterized SQL statements and let DbVisualizer prompt you for the values when the SQL is executed. This is handy if you are executing

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

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

CS 327E Lecture 2. Shirley Cohen. January 27, 2016

CS 327E Lecture 2. Shirley Cohen. January 27, 2016 CS 327E Lecture 2 Shirley Cohen January 27, 2016 Agenda Announcements Homework for today Reading Quiz Concept Questions Homework for next time Announcements Lecture slides and notes will be posted on the

More information

Oracle Database 11g: PL/SQL Fundamentals

Oracle Database 11g: PL/SQL Fundamentals D49990GC20 Edition 2.0 September 2009 D62728 Oracle Database 11g: PL/SQL Fundamentals Student Guide Author Brian Pottle Technical Contributors and Reviewers Tom Best Christoph Burandt Yanti Chang Laszlo

More information

Oracle Database 10g: SQL Fundamentals I

Oracle Database 10g: SQL Fundamentals I Oracle Database 10g: SQL Fundamentals I Electronic Presentation D17108GC11 Production 1.1 August 2004 D39769 Author Nancy Greenberg Technical Contributors and Reviewers Wayne Abbott Christian Bauwens Perry

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

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

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9)

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 4 Professional Program: Data Administration and Management MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) AGENDA

More information

Oracle 1Z0-007 Introduction to Oracle9i: SQL 210 Q&A

Oracle 1Z0-007 Introduction to Oracle9i: SQL 210 Q&A Oracle 1Z0-007 Introduction to Oracle9i: SQL 210 Q&A Looking for Real Exam Questions for IT Certification Exams! We guarantee you can pass any IT certification exam at your first attempt with just 10-12

More information

Lab # 6. Data Manipulation Language (DML)

Lab # 6. Data Manipulation Language (DML) Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Lab # 6 Data Manipulation Language (DML) Eng. Haneen El-Masry December, 2014 2 Objective To be more familiar

More information