Database Programming - Section 8. Instructor Guide
|
|
- Diane Laura Blankenship
- 6 years ago
- Views:
Transcription
1 Database Programming - Section 8 Instructor Guide
2
3 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 It...9 Lesson 2 - Practice Exercises...12 What Will I Learn?...13 Why Learn It?...14 Tell Me / Show Me...15 Try It / Solve It...16 Lesson 3 - Practice Exercises and Quiz...18 What Will I Learn?...19 Why Learn It?...20 Tell Me / Show Me...21 Try It / Solve It...22 Lesson 4 - Creating Tables...24 What Will I Learn?...25 Why Learn It?...26 Tell Me / Show Me...27 Try It / Solve It...33 Lesson 5 - Using Data Types...36 What Will I Learn?...37 Why Learn It?...38 Tell Me / Show Me...39 Try It / Solve It...40 Page i
4
5 Lesson 1 - DEFAULT Values and the MERGE Statement Lesson 1 - DEFAULT Values and the MERGE Statement Lesson Preparation Explain the term "schema" as a collection of database objects, such as tables, constraints, and privileges. Each student's work will be stored in his/her own schema. In order for others to view or alter objects in a user's schema, the owner must grant permissions. Tell students that permissions will be studied in an upcoming section. The Try It / Solve It activity is an extension of the history of the Internet from data modeling. Page 1
6 What to Watch For The MERGE statement is challenging for students. Students will understand the concept of UPDATE or INSERT but the syntax structure is difficult. Break the statement into a description that has to tell what and where, a join, and an INSERT statement. MERGE INTO what table USING what table/view/subquery ON what join condition WHEN MATCHED THEN UPDATE SET col1 = col2 value... WHEN NOT MATCHED THEN INSERT(column_list) VALUES(column_values) Connections Extension Activity In the past few years, there has been increased legislation by governments related to issues of the Internet. In the United States, the website provides an up-todate guide of current legislation related to the Internet. Topics such as spam, security, piracy, and privacy, are current interests. In Europe, the search keywords "internet legislation Europe" or "internet legislation Asia" provide a more global picture of current legislation on a worldwide scale. Assign students to investigate what is being done by government to control crime and misconduct on the Internet. Page 2
7 What Will I Learn? What Will I Learn? Page 3
8 Why Learn It? Why Learn It? Why Learn It? A data warehouse is a collection of data designed to support business-management decision making. Data warehouses contain a wide variety of data, such as sales data, customer data, payroll, accounting, and personnel data, that presents a coherent picture of business conditions at a single point in time. Typically, a data warehouse is housed on an enterprise mainframe server. Page 4
9 Tell Me / Show Me Tell Me / Show Me Tell Me / Show Me Students will need to do execute a DESCRIBE tablename to view column attributes in HTML DB. Column attributes can also be accessed by clicking the "Browse " tab on the top right of the main page. Select the tablename under "Database Object Results." If a column in a table does not have DEFAULT specified under the column attribute "Default," students will have to make changes to the column attributes before being able to set a default value. Practice 1 in Try It/Solve It steps through the process for the COPY_PROMOTIONAL_MENUS table. Do this practice before going on. **CURRVAL and NEXTVAL will be explained in Section 12. Page 5
10 Tell Me / Show Me Tell Me / Show Me Tell Me / Show Me Students will need to do execute a DESCRIBE tablename to view column attributes in HTML DB. Column attributes can also be accessed by clicking the "Browse " tab on the top right of the main page. Select the tablename under "Database Object Results." If a column in a table does not have DEFAULT specified under the column attribute "Default," students will have to make changes to the column attributes before being able to set a default value. Practice 1 in Try It/Solve It steps through the process for the COPY_PROMOTIONAL_MENUS table. Do this practice before going on. **CURRVAL and NEXTVAL will be explained in Section 12. Page 6
11 Tell Me / Show Me Tell Me / Show Me Tell Me / Show Me Explain the MERGE syntax and the use of aliases. Page 7
12 Tell Me / Show Me Tell Me / Show Me Tell Me / Show Me Explain the MERGE syntax and the use of aliases. Page 8
13 Try It / Solve It Try It / Solve It Try It / Solve It 1c. INSERT INTO copy_f_promotional_menus (code, name, start_date, end_date, give_away) VALUES( 120, 'New Customer', DEFAULT, '01-JUN-05', '10% discount coupon') 2b. CREATE TABLE manager_copy_d_cds AS (SELECT * FROM d_cds) 2c. INSERT INTO copy_d_cds (cd_number, title, producer, year) VALUES( 120, 'Hello World Here I Am', 'Middle Earth Records', '1998') 2d. MERGE INTO manager_copy_d_cds c USING d_cds d ON (c.cd_number = d.cd_number) WHEN MATCHED THEN UPDATE SET c.year = d.year, c.title = d.title, c.producer = d.producer WHEN NOT MATCHED THEN INSERT VALUES (d.cd_number, d.title, d.producer, d.year); Page 9
14 Try It / Solve It Try It / Solve It Try It / Solve It 1c. INSERT INTO copy_f_promotional_menus (code, name, start_date, end_date, give_away) VALUES( 120, 'New Customer', DEFAULT, '01-JUN-05', '10% discount coupon') 2b. CREATE TABLE manager_copy_d_cds AS (SELECT * FROM d_cds) 2c. INSERT INTO copy_d_cds (cd_number, title, producer, year) VALUES( 120, 'Hello World Here I Am', 'Middle Earth Records', '1998') 2d. MERGE INTO manager_copy_d_cds c USING d_cds d ON (c.cd_number = d.cd_number) WHEN MATCHED THEN UPDATE SET c.year = d.year, c.title = d.title, c.producer = d.producer WHEN NOT MATCHED THEN INSERT VALUES (d.cd_number, d.title, d.producer, d.year); Page 10
15 Try It / Solve It Try It / Solve It Try It / Solve It The list of different things one can do using the Internet should not be duplicates of the same task. For example, buying a book from Amazon.com is the same as buying a book from Borders. Encourage students to think of different things such as: enable world market for business, communicate with their friends, send homework to their teacher, find information without having to leave the house, visit places around the world such as the Cairo Museum, see the Eiffel Tower, check the traffic on the Golden Gate Bridge, use virtual auctions such as ebay, search airline ticket fares, see live new clips from around the world, instant news, etc. Negative effects of the Internet include: wasting time, crime, pornography, exploitation, hacking databases, ability to outsource jobs to other countries, identity theft, privacy invasion. Page 11
16 Lesson 2 - Practice Exercises Lesson 2 - Practice Exercises Lesson Preparation Make copies of the database tables for Try It / Solve It problem 1 to use to discuss the practice exercises. What to Watch For If students have issues adding this data, they may not have done a DESCRIBE tablename to verify what data types go into each column. Keep in mind that the copied tables have no constraints at this point. It is not important what order the data is added to the three tables. Constraints will be added in Section 10. Connections None. Page 12
17 What Will I Learn? What Will I Learn? Page 13
18 Why Learn It? Why Learn It? Page 14
19 Tell Me / Show Me Tell Me / Show Me Page 15
20 Try It / Solve It Try It / Solve It Try It / Solve It Answers: 1. Create the three o_tables, jobs, employees and departments using the syntax: CREATE TABLE o_jobs AS (SELECT * FROM jobs); 2. Add the Human Resources job to the jobs table: INSERT INTO o_jobs (job_id, job_title, min_salary, max_salary) VALUES('HR_MAN', 'Human Resources Manager', 4500, 5500); Don't accept this assignment until the correct output is produced. Students should have added three employees to the o_employees table, added the 'HR_MAN' job to the o_jobs table, and added the 'Human Resources department to the o_departments table. Verify that students were successful in producing the correct output (ask them to print or show you their output) Changes to these tables will be done in Lesson 3. Page 16
21 Try It / Solve It Try It / Solve It Try It / Solve It Answers: 3. INSERT INTO o_employees (employee_id, first_name, last_name, , hire_date, job_id) VALUES(210, 'Ramon', 'Sanchez', 'RSANCHEZ', SYSDATE, 'HR_MAN'); INSERT INTO o_employees (employee_id, first_name, last_name, , hire_date, job_id) VALUES(211, 'Tai', 'Sugita', 'TSUGITA', SYSDATE, 'HR_MAN'); INSERT INTO o_employees (employee_id, first_name, last_name, , hire_date, job_id) VALUES(212, 'Alina', 'Arcos', 'AARCOS', SYSDATE, 'HR_MAN'); 4. INSERT INTO o_departments(department_id, department_name) VALUES (210,'Human Resources'); Don't accept this assignment until the correct output is produced. Students should have added three employees to the o_employees table, added the 'HR_MAN' job to the o_jobs table, and added the 'Human Resources department to the o_departments table. Verify that students were successful in producing the correct output (ask them to print or show you their output). Changes to these tables will be done in Lesson 3. Page 17
22 Lesson 3 - Practice Exercises and Quiz Lesson 3 - Practice Exercises and Quiz Lesson Preparation None. What to Watch For Students should achieve 70% or better on the quiz. 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 Tell Me / Show Me Tell Me / Show Me Page 21
26 Try It / Solve It Try It / Solve It Try It / Solve It Answers: UPDATE o_employees SET phone_number = ' ' WHERE employee_id = 210; UPDATE o_departments SET location_id = 1700 WHERE department_id= 210; UPDATE o_employees SET department_id = 210 WHERE employee_id in (210,211,212); UPDATE o_employees SET salary = 5000 WHERE employee_id = 210; UPDATE o_employees SET salary = 5100 Page 22
27 WHERE employee_id = 211; DELETE FROM o_employees WHERE employee_id = 212; Additional information: Verify that the new changes have been made to the o_tables as specified. Explain that DML statements should be made to primary-key values such as employee ID instead of last name or first name just in case two employees have the same name. Two employees won't have the same ID. For example, in a large company, two employees may be named Jennifer James, but each employee will have a different employee identification number. When changes are made to Jennifer James's address, it is best to use the query shown on the left in the following example rather than the query shown on the right. UPDATE o_employees SET ='jjames@charter.net' WHERE employee_id = 210; UPDATE o_employees SET ='jjames@charter.net' WHERE last_name = 'James'; Page 23
28 Lesson 4 - Creating Tables Lesson 4 - Creating Tables Lesson Preparation The practice exercises for this section are based on tables that students create exclusively for this lesson. Tell students to be careful not to alter the other tables in their schema. Students should preface each new table they create with their name or initials -- for example, "gg_emp" or "marie_dept. What to Watch For Encourage students to use naming conventions. Demonstrate your requirements. Students will want to create all kinds of tables. Encourage appropriate business applications. Give extra credit for tables such as Personal CD Collection, Addresses, Rental Car Company, Collections, or tables noted in "Connections. Connections Using examples from data modeling, students should be able to create individual tables, add data, and execute queries. Suggested examples include: Entity Animals from Animal Shelter Activity, Entity Movies from Video Store, or Entity Members from International Oracle User's Group. There are endless examples of tables that students could make that can be found on the Internet. Ask students to bring in examples. This is a great way to practice DML, DCL, and DDL statements. Encourage students to bring in interesting table ideas. Page 24
29 What Will I Learn? What Will I Learn? Page 25
30 Why Learn It? Why Learn It? Page 26
31 Tell Me / Show Me Tell Me / Show Me Tell Me / Show Me When students begin creating their own tables, it is important to reinforce naming conventions in SQL. Responsible programmers use best practices by keeping quality, performance, and maintainability in mind. It helps make code more readable and understandable by others. To prevent frivolous examples, demonstrate to students your policy for proper naming. Page 27
32 Tell Me / Show Me Tell Me / Show Me Tell Me / Show Me Explain to students that they will learn more about data types in the next lesson. Read and briefly review CHAR (fixed-length character data), VARCHAR2 (variable-length character data), DATE, and NUMBER Page 28
33 Tell Me / Show Me Tell Me / Show Me Tell Me / Show Me Point out to students the need to create a column alias for those columns in the subquery that contain expressions. This subquery syntax provides an easy way for students to create copies of the database tables. Ask students why they think only the data-type definitions are passed on to the new table from a subquery. Suggested answer: The new table could be being used in a different context without association to existing PK -FK relationships. Point out that in this class, students will use copies of the original database tables so they retain the integrity of the original tables. Page 29
34 Tell Me / Show Me Tell Me / Show Me Tell Me / Show Me Explain that the graphic is only a small part of the data dictionary. Ask students to access the data dictionary in HTML DB to view its extensive listings. Page 30
35 Tell Me / Show Me Tell Me / Show Me Tell Me / Show Me Metadata is a component of data that describes the data. It is "data about data." Metadata describes the content, quality, condition, and other characteristics of data. Without proper documentation, a data set is incomplete. sparc.ecology.uga.edu/webdocs/1/glossary.htm Page 31
36 Tell Me / Show Me Tell Me / Show Me Tell Me / Show Me Before continuing with this lesson, ask students to query the data dictionary using the SQL query syntax. Also, use the HTML DB application to view the data dictionary. From the SQL Workshop screen, click the Browse menu tab, and click "Browse Data Dictionary" in the Tasks box on the right. Page 32
37 Try It / Solve It Try It / Solve It Try It / Solve It Answers: CREATE TABLE grad_candidates (student_id NUMBER(6), last_name VARCHAR2(15), first_name VARCHAR2(15), credits NUMBER (3), graduation_date DATE); Page 33
38 3. DESCRIBE grad_candidates; 4. CREATE TABLE smith_table AS (SELECT student_id,last_name, first_name, credits, graduation_date FROM grad_candidates); Page 34
39 Try It / Solve It Try It / Solve It Try It / Solve It Answers: 5. Make these questions that the students must answer, i.e. what code would you use to see the names of all tables owned by you? To see the names of tables owned by the user (you): SELECT table_name FROM user_tables To view distinct object types owned by the user: SELECT DISTINCT object_type FROM user_objects; To view all objects owned by the user: SELECT* FROM user_catalog; 6. INSERT INTO smith_table (student_id,last_name,first_name,credits,graduation_date) VALUES ( ANSWERS WILL VARY...) Page 35
40 Lesson 5 - Using Data Types Lesson 5 - Using Data Types Lesson Preparation Review the Internet resources listed in the Try It/Solve It "What's in Your Future?" activity. What to Watch For The time stamp and time zone data type needs strong emphasis and repetition in coding because the concept is confusing to some students. Connections Relate data types to data-modeling entities. Ask students to identify the data types that would be associated with the attributes, if these attributes were those defined in a table. Use the Internet resource for examples of many different ERDs. Note the examples in the graphic. Page 36
41 What Will I Learn? What Will I Learn? Page 37
42 Why Learn It? Why Learn It? Page 38
43 Tell Me / Show Me Tell Me / Show Me Tell Me / Show Me Begin this lesson with a question from previous material: How do you create a table called "MyTable" with the following columns: Id, Name, Hobbies, Favorite Book, Favorite Song, and Lucky Number? Answer: CREATE TABLE mytable (id NUMBER (4), name VARCHAR2 (15), hobbies VARCHAR2(30), favorite_book VARCHAR2(15), favorite_song VARCHAR2(15), lucky_num NUMBER (3)); The list of data types may be overwhelming. Briefly review them with students. Concentrate on the most common ones: VARCHAR2, NUMBER, and DATE. The TIMESTAMP data types will be discussed in depth with code examples provided to explain them. Page 39
44 Try It / Solve It Try It / Solve It Page 40
45 Try It / Solve It Try It / Solve It Page 41
46 Try It / Solve It Try It / Solve It Page 42
47 Try It / Solve It Try It / Solve It Tell Me / Show Me Discuss with students how an organization might use time stamps and time zones. Ask students the following questions to pique their thinking about time and its significance in business transactions. Give extra credit to students who can find a definitive answer to any one of the questions. When do banks apply interest to your savings account? How do airlines schedule international flights across time zones? How do stock transactions take place in Hawaii at the New York Stock Exchange? Who or what determines the time that stock is bought or sold? If a baby is born on a ship somewhere on the ocean, how is the time recorded in an official birth database? If you are in a rocket traveling at the speed of light, what time is it on your watch? What time is it on earth? (Possible answer: Your space clock will slow down; the earth clock remains the same.) When is time important and when is time not important? Page 43
48 Try It / Solve It Try It / Solve It Try It / Solve It Use the examples in Tell Me/Show Me for practice exercise 1. Syntax for Question 1. Answers will vary. 1a. CREATE TABLE time_example (order_date TIMESTAMP WITH LOCAL TIME ZONE); INSERT INTO time_example VALUES('15-NOV-03 09:34:28 AM'); SELECT * FROM time_example; 1b. CREATE TABLE time_example2 (loan_duration INTERVAL YEAR (3) TO MONTH); INSERT INTO time_example2 (loan_duration) VALUES (INTERVAL '120' month(3)); SELECT TO_CHAR(sysdate+loan_duration, 'dd-mon-yyyy') FROM time_example2; Page 44
49 1c. CREATE TABLE time_example3 (day_duration INTERVAL DAY (3) TO SECOND); INSERT INTO time_example3 (day_duration) VALUES (INTERVAL '180' day(3)); SELECT sysdate + day_duration "Half Year" FROM time_example3; Page 45
50 Try It / Solve It Try It / Solve It Try It / Solve It In this activity, students take a futuristic view of technology and the jobs predicted over the next 20 years. How many times will they have changed jobs in 20 years? Is there a future job for their skills today? Explain that many of the jobs of the future haven't been invented yet. Keeping up with the rapidly changing workforce demands and requirements is a lifelong process. The Internet resources include: A dozen jobs with NO future: by Susan Aaron The Learning Coach Type "a dozen jobs with no future" in a search engine to find this article. It appears on several sites. "Half of the hottest jobs of the future don t even exist yet." Page 46
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 informationUsing 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 informationManipulating 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 informationDatabase Programming with SQL
Database Programming with SQL 13-1 Objectives In this lesson, you will learn to: List and categorize the main database objects Review a table structure Describe how schema objects are used by the Oracle
More informationDatabase 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 informationData 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 informationDatabase 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 informationDatabase Programming - Section 7. Instructor Guide
Database Programming - Section 7 Instructor Guide Table of Contents...1 Lesson 1 - Multiple-Row Subqueries...1 What Will I Learn?...3 Why Learn It?...4...5 Try It / Solve It...12 Lesson 2 - Practice Exercises
More informationDatabase 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 informationCreating 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 informationSELF 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 informationUsing 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 informationIntroduction to Oracle9i: SQL Basics
Introduction to Oracle9i: SQL Basics Student Guide Volume 2 40057GC11 Production 1.1 November 2001 D34043 Authors Nancy Greenberg Priya Nathan Technical Contributors and Reviewers Josephine Turner Martin
More informationDatabase 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 informationRetrieving 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 informationUsing 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 informationAdditional 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 informationCreating 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 informationTá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 informationDatabase 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 informationCIS 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 informationCS 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 informationSchool 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 informationOracle Database 10g: SQL Fundamentals I. Oracle Internal & Oracle Academy Use Only. Student Guide Volume 2. D17108GC30 Edition 3.0 January 2009 D57871
D17108GC30 Edition 3.0 January 2009 D57871 Oracle Database 10g: SQL Fundamentals I Student Guide Volume 2 Authors Salome Clement Chaitanya Koratamaddi Nancy Greenberg Technical Contributors and Reviewers
More informationAssignment 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 informationUsing 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 informationCreating 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 informationCourse 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 informationDatabase 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 informationRetrieving 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 informationDEFAULT 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 informationDatabase 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 informationDatabase Programming - Section 18. Instructor Guide
Database Programming - Section 18 Instructor Guide Table of Contents...1 Lesson 1 - Certification Exam Preparation...1 What Will I Learn?...2 Why Learn It?...3 Tell Me / Show Me...4 Try It / Solve It...5
More informationData 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 informationIntroduction 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 informationRETRIEVING 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 informationSYSTEM CODE COURSE NAME DESCRIPTION SEM
Course: CS691- Database Management System Lab PROGRAMME: COMPUTER SCIENCE & ENGINEERING DEGREE:B. TECH COURSE: Database Management System Lab SEMESTER: VI CREDITS: 2 COURSECODE: CS691 COURSE TYPE: Practical
More informationDUE: 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 informationOracle 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 informationHR 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 information1 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 informationDatabase 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 informationDatabase 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 informationKORA. 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 informationIntroduction 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 informationVendor: 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 informationInstitute 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 informationCREATE 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 informationOracle 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 informationSchool 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 informationUsing the Set Operators. Copyright 2004, Oracle. All rights reserved.
Using the Set Operators Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Describe set operators Use a set operator to combine
More informationAppendix A Practices and Solutions
Appendix A Practices and Solutions Table of Contents Practices and Solutions for Lesson I... 3 Practice I-1: Accessing SQL Developer Resources... 4 Practice I-2: Using SQL Developer... 5 Practice Solutions
More informationDatabase Foundations. 6-1 Introduction to Oracle Application Express. Copyright 2015, Oracle and/or its affiliates. All rights reserved.
Database Foundations 6-1 Introduction to Oracle Application Express Roadmap Introduction to Oracle Application Express You are here Structured Query Language (SQL) Data Definition Language (DDL) Data Manipulation
More informationSelf-Demo Guide. Oracle ilearning and HTML DB
2003-2004 Self-Demo Guide Oracle ilearning and HTML DB The Oracle Academy allows a school to offer advanced Database and Java programming courses through the use of Oracle s infrastructure. The school
More informationOracle 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 informationG64DBS Database Systems. G64DBS Module. Recommended Textbook. Assessment. Recommended Textbook. Recommended Textbook.
G64DBS Database Systems Tim Brailsford G64DBS Module Lectures Mondays, 3pm in LT2 Fridays, 4pm in LT3 Labs - TBA Will NOT start until approximately Week 4 Wednesdays, 2-4pm in A32 Tim Brailsford (tjb@cs.nott.ac.uk)
More informationLimit 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 informationOracle 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 informationINDEX. 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 informationLab # 4. Data Definition Language (DDL)
Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Lab # 4 Data Definition Language (DDL) Eng. Haneen El-Masry November, 2014 2 Objective To be familiar with
More informationSé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 informationOracle MOOC: SQL Fundamentals
Week 4 Homework for Lesson 4 Homework is your chance to put what you've learned in this lesson into practice. This homework is not "graded" and you are encouraged to write additional code beyond what is
More informationnormalization 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 informationDatabase Design. 9-2 Basic Mapping: The Transformation Process. Copyright 2015, Oracle and/or its affiliates. All rights reserved.
Database Design 9-2 Objectives This lesson covers the following objectives: Distinguish between a conceptual model and a physical model Apply terminology mapping between the two models Understand and apply
More informationÇ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 informationInstitute 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 informationGIFT 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 informationRetrieving 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 informationBasic Mapping: The Transformation Process. Copyright 2011, Oracle. All rights reserved.
Basic Mapping: The Transformation Process Copyright 2011, Oracle. All rights reserved. What Will I Learn? Objectives In this lesson, you will learn to: Distinguish entity relationship models from database
More informationMisc. Triggers Views Roles Sequences - Synonyms. Eng. Mohammed Alokshiya. Islamic University of Gaza. Faculty of Engineering
Islamic University of Gaza Faculty of Engineering Computer Engineering Dept. Database Lab (ECOM 4113) Lab 9 Misc. Triggers Views Roles Sequences - Synonyms Eng. Mohammed Alokshiya December 7, 2014 Views
More informationOracle 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 informationDatabase 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 informationVendor: 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 information0. Database Systems 1.1 Introduction to DBMS Information is one of the most valuable resources in this information age! How do we effectively and efficiently manage this information? - How does Wal-Mart
More informationOracle Database: Introduction to SQL Ed 2
Oracle University Contact Us: +40 21 3678820 Oracle Database: Introduction to SQL Ed 2 Duration: 5 Days What you will learn This Oracle Database 12c: Introduction to SQL training helps you write subqueries,
More informationWorking 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 informationExam: 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 informationOracle 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 informationTesting Masters Technologies
1. What is Data warehouse ETL TESTING Q&A Ans: A Data warehouse is a subject oriented, integrated,time variant, non volatile collection of data in support of management's decision making process. Subject
More informationIntermediate 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 informationCS 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 informationOracle Introduction to PL/SQL
Oracle Introduction to PL/SQL 1. For which column would you create an index? a. a column that is small b. a column that is updated frequently c. a column containing a wide range of values d. a column with
More informationDatabase Programming with SQL
Database Programming with SQL 4-3 Objectives This lesson covers the following objectives: Demonstrate the use of SYSDATE and date functions State the implications for world businesses to be able to easily
More informationStructured Query Language (SQL)
Structured Query Language (SQL) SQL Chapters 6 & 7 (7 th edition) Chapters 4 & 5 (6 th edition) PostgreSQL on acsmysql1.acs.uwinnipeg.ca Each student has a userid and initial password acs!
More informationLab # 2. Data Definition Language (DDL) Eng. Alaa O Shama
The Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Database Lab Lab # 2 Data Definition Language (DDL) Eng. Alaa O Shama October, 2015 Objective To be familiar
More informationOracle Database: Introduction to SQL
Oracle University Contact Us: +27 (0)11 319-4111 Oracle Database: Introduction to SQL Duration: 5 Days What you will learn This Oracle Database: Introduction to SQL training helps you write subqueries,
More informationOracle Internal & Oracle Academy
D49990GC11 Edition 1.1 April 2009 D59428 Oracle Database 11g: PL/SQL Fundamentals Student Guide Authors Tulika Srivastava Lauran K. Serhal Technical Contributors and Reviewers Tom Best Christoph Burandt
More informationLECTURE10: 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 informationBraindumpsVCE. 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 informationChapter 1 SQL and Data
Chapter 1 SQL and Data What is SQL? Structured Query Language An industry-standard language used to access & manipulate data stored in a relational database E. F. Codd, 1970 s IBM 2 What is Oracle? A relational
More informationDC62 Database management system JUNE 2013
Q2 (a) Explain the differences between conceptual & external schema. Ans2 a. Page Number 24 of textbook. Q2 (b) Describe the four components of a database system. A database system is composed of four
More informationVendor: IBM. Exam Code: C Exam Name: DB Fundamentals. Version: Demo
Vendor: IBM Exam Code: C2090-610 Exam Name: DB2 10.1 Fundamentals Version: Demo QUESTION 1 If the following command is executed: CREATE DATABASE test What is the page size (in kilobytes) of the database?
More informationRetrieving 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 informationc r e at i N g yo u r F i r S t d ata b a S e a N d ta b l e
1 Creating Your First Database and Table SQL is more than just a means for extracting knowledge from data. It s also a language for defining the structures that hold data so we can organize relationships
More informationOracle Database 11g: Introduction to SQLRelease 2
Oracle University Contact Us: 0180 2000 526 / +49 89 14301200 Oracle Database 11g: Introduction to SQLRelease 2 Duration: 5 Days What you will learn In this course students learn the concepts of relational
More informationGetting 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 informationConsistency The DBMS must ensure the database will always be in a consistent state. Whenever data is modified, the database will change from one
Data Management We start our studies of Computer Science with the problem of data storage and organization. Nowadays, we are inundated by data from all over. To name a few data sources in our lives, we
More information1Z0-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 informationFravo.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 informationOracle Internal & Oracle Academy
D64258GC11 Edition 1.1 March 2012 D76182 Oracle Database: SQL Fundamentals I Student Guide - Volume I Authors Supriya Ananth Salome Clement Brian Pottle Technical Contributors and Reviewers Diganta Choudhury
More information