Database Programming - Section 11. Instructor Guide
|
|
- Scot Banks
- 6 years ago
- Views:
Transcription
1 Database Programming - Section 11 Instructor Guide
2
3 Table of Contents...1 Lesson 1 - In-Class Interview...1 What Will I Learn?...3 Why Learn It? Try It / Solve It...9 Lesson 2 - Creating Views...12 What Will I Learn?...13 Why Learn It? Try It / Solve It...24 Lesson 3 - DML Operations and Views...27 What Will I Learn?...29 Why Learn It? Try It / Solve It...36 Lesson 4 - Managing Views...44 What Will I Learn?...45 Why Learn It? Try It / Solve It...50 Lesson 5 - Practice Exercises and Review...52 What Will I Learn?...53 Why Learn It? Try It / Solve It...56 Page i
4
5 Lesson 1 - In-Class Interview Lesson 1 - In-Class Interview Lesson Preparation There are numerous Internet resources that highlight types of interviews and interviewing skills. Use the search keywords "interviewing skills." Excellent resources that explain the traditional versus the behavioral interview are: Ask someone at the school or in the community who is responsible for hiring employees to speak to the class about the interview process. Review the Interview Rubric. What to Watch For Most students do not like to be singled out in class. Evaluate the interview process, not individual students. Page 1
6 Connections After having had the opportunity to participate in the in-class interview, relate the experience to meeting with a client in the data-modeling process. Are the meetings with the client more than just what business processes they want modeled? Do clients form a first impression? Do clients evaluate your work based on your speaking and writing skills? Extension: Ask students to look for newspaper articles, magazine articles, or Internet news about jobs and the job market. Assist students to heighten their awareness of the types of skills they need to succeed in a job. Students often compartmentalize what they learn in school and don't associate what they learn in one class with anything beyond that class. Relate what students learn in other classes to skills relevant to the world of work. Have students find a job posting that they think would interest them. Write a "preparedness plan" for a first interview. Look for plans that include elements such as, "research company via the web; write three questions to ask the interviewer at the end of the interview; list my current qualifications that would make me an excellent candidate; what I'll say when asked why I feel I am the best candidate." Page 2
7 What Will I Learn? What Will I Learn? What Will I Learn? Read the "What Will I Learn" objectives to students. Explain that this lesson discusses different types of interviews and techniques to develop successful interview skills. Students will have an opportunity to practice interviewing skills. Page 3
8 Why Learn It? Why Learn It? Why Learn It? Relate your own experiences with job interviews. How did you prepare for the interview? What was the interview like? Page 4
9 Discuss the differences between a traditional interview and a behavioral interview. In Try It/ Solve It, students should be able to compare and contrast the differences between the two methods of interviewing based on their research about these types of interviews. Use the search-engine keywords: "traditional interview" and "behavioral interview." Or look into the following Internet resources: and the University of North Carolina site Traditional Interview: Focuses on what the candidate has accomplished such as completed college or worked as a graphic artist. Behavioral Interview: Focuses on past experiences and demonstrated competencies that relate to the job requirements, such as having been a team leader that completed an important project under extenuating circumstances. Page 5
10 Read and describe or role play each step in the interview process. Page 6
11 Depending on local customs, modify the list to meet your needs. Review the list of nonverbal communication skills that say "hire me" with the class. Page 7
12 - Establish an order for interviewing -- draw numbers or volunteer. - Tell students how the interview will be conducted, what they should wear, and what they should bring to the interview. - Review the Interview Rubric and how each student will be assessed. Let students know that evaluation is a means to make improvements, not a means to degrade them. Page 8
13 Try It / Solve It Try It / Solve It Try It / Solve It Using the Internet resources provided by the teacher, answer the following questions about interviews. 1. Traditional Interview: Focus on what the candidate has accomplished or wants to accomplish. Behavioral Interview: Focus on past experiences and demonstrated competencies that relate to the job requirements. 2. Rather then merely telling the interviewer what they would do in a situation, as in a regular interview, in a behavioral interview the candidate must describe, in detail, how they handled a situation in the past. 3. The purpose of any interview is to determine if the candidate can do the job and will fit into the business culture of the company. In both types of interview, there is always a process of introductions, company information, candidate response to questions, and closing comments. Page 9
14 Try It / Solve It Try It / Solve It Try It / Solve It Multipage: Choose a job description from the local newspaper or Internet or use the "IT Database Administrator Wanted" article. - Students will not be familiar with what the job may require. Discuss the details listed in the job description to understand what skills the company is looking for in a candidate. This may require research. The qualifications can be hard to figure out! - Share with students the concept that job descriptions are company "wish lists." A company cannot always hire someone with 3, 5, 10+ years experience, but it will accept a candidate with outstanding communication skills and a demonstrated technical background. - Review Section 9, Lesson 3, the kinds of questions that cannot be asked of a candidate. - Help students formulate traditional and behavioral questions that are appropriate for the job description chosen. Traditional Questions: Candidate is allowed to generalize and theorize. "What are your three major accomplishments?" "What have you disliked in your past jobs?" Page 10
15 "What kinds of people frustrate you?" "What is your ideal job?" "Tell me about your last job? Multipage: Behavioral Questions: Candidate must describe past experiences related to the question. "This job has deadlines that must be met. Describe a situation where you had an unexpected deadline and how you handled it." "Give an example of a situation where you were not supported by others when a job had to be done and describe how you accomplished the task and dealt with your fellow workers." - Use the questions generated by the students as the in-class interview questions. Choose 4-6 questions for each candidate. Change the questions so students don't prepare the same responses. - Explain to students they may not know the answers to the interview questions or, more likely, have not had work experience to answer them. They should, however, be able to relate a question to some other situation. For instance, Give an example of a deadline you had to meet as part of a team where not all members of the team helped or contributed." Most students have had these kinds of experiences through school or a job and can relate how they solved the problem. - Structure the interview to last approximately 5 minutes per student. Not all of the points on the Interview Rubric can be covered with each student. Choose one or two different points for each student. The interviews will need to be conducted over several days to accommodate an entire class of students. Other students can be working on the next lesson while interviews are being conducted. Discuss the Interview Rubric with students as a class. Use the rubric to provide each student with feedback about his or her interview. If time permits, discuss the rubric with individual students. If not, discuss the evaluation of the overall interview process with the class as a whole. Page 11
16 Lesson 2 - Creating Views Lesson 2 - Creating Views Lesson Preparation None. What to Watch For The idea of a view as a virtual representation of underlying table data may be difficult for students to understand. Use the window analogy. A view is a "window" into the database. The view presents data from one or more tables in one place. With simple views, DML statements can be used to make changes to the underlying base tables through the view. However, with complex views, DML statements are not always possible. Connections For review of previous material, ask students to create a table and a view based on that table. For example: - Table of holidays - name of the holiday, the date of the holiday, and the country that celebrates the holiday - Table of driving distances from their city to other cities - name of city, miles/kilometers to city, average driving time - Table of local eating places - name of business, address, phone number, type of food Page 12
17 What Will I Learn? What Will I Learn? Page 13
18 Why Learn It? Why Learn It? Why Learn It? Explain your school's access to information. Teachers, counselors, and secretaries use information stored in a database as part of their job. A guidance counselor has access to student grades; a teacher accesses the database to record daily class attendance; secretaries use information stored in the database for correspondence and office functions. But everyone does not have the same privileges to update, insert, or remove information stored in the database. A manager of the assembly line of a manufacturing plant has access to information needed to do his/her job. The manager doesn't have access to financial records or personal information for his/her employees. In business today, the objective is for people to see what they need to see to do their jobs, and not much more! Page 14
19 Use the graphic to give students a mental picture of a view being a window through which they can see a custom view of the underlying data tables. Use the graphic to compare what columns the view is able to see compared to the underlying table. Point out in the syntax example that the view was created using a subquery. Page 15
20 Begin this lesson with a review question. "How do you add a constraint to a table if the table has already been created?" ALTER TABLE table_name ADD CONSTRAINT constraint_name Page 16
21 Page 17
22 Read aloud the syntax for a view. Use the graphic to explain the difference between a simple view and a complex view. Page 18
23 Read aloud the syntax for a view. Use the graphic to explain the difference between a simple view and a complex view. Page 19
24 To prevent frivolous examples, review with students your preference for naming views. The NOFORCE option will not execute in HTML DB. Page 20
25 To prevent frivolous examples, review with students your preference for naming views. The NOFORCE option will not execute in HTML DB. Page 21
26 Review the GROUP BY rules and functions. All columns in the SELECT statement that are not group functions must be listed in the GROUP BY clause. Complex views use join statements. Students may need to DESCRIBE tables to identify the primary and foreign key relationships between the database tables in order to identify the primary key foreign key relationships for joins. Page 22
27 Page 23
28 Try It / Solve It Try It / Solve It Try It / Solve It Demonstrate naming conventions for views to avoid frivolous examples. In this section, views have been named view_copy_tablename. The copied tables will be used to practice DML statements without changing the original table structures. 1. CREATE VIEW view_d_songs AS SELECT id, title AS "Song Title", artist FROM d_songs WHERE type_code = 77; 2. SELECT * FROM view_d_songs; Page 24
29 3. CREATE OR REPLACE VIEW view_d_songs AS SELECT id AS "Identification", title AS "Song Title", artist AS "Recording Artist", type_code AS "Type Code" FROM d_songs WHERE type_code = 77; or use alias after the CREATE statement as shown. CREATE OR REPLACE VIEW view_d_songs(identification, Song, Singer, Type Code ) AS SELECT id, title, artist, type_code FROM d_songs Page 25
30 Try It / Solve It Try It / Solve It Try It / Solve It Answers: 4. Modify answer to 4: CREATE OR REPLACE VIEW view_events_dj ("Name of Event", "Event Date", "Theme Code", "Description") AS SELECT e.name, e.event_date, e.theme_code, t.description FROM d_events e, d_themes t WHERE e.theme_code = t.code; 5. CREATE VIEW dept_sum_vu (name, minsal, maxsal, avgsal) AS SELECT d.department_name, MIN(e.salary), MAX(e.salary),AVG(e.salary) FROM employees e, departments d WHERE e.department_id = d.department_id GROUP BY d.department_name; Page 26
31 Lesson 3 - DML Operations and Views Lesson 3 - DML Operations and Views Lesson Preparation SQL queries using DML statements will execute. Only rows that meet the WITH CHECK OPTION will be deleted. Using the CREATE or REPLACE syntax is the most efficient way for students to re-create a view if they have made a mistake. What to Watch For None. Page 27
32 Connections Relate creating views to the other kinds of restraints set for databases, such as primary and foreign keys, unique constraints, and not null constraints. Where does the necessity for constraints originate? How are constraints related to relational database integrity? Successful database development and management are created out of the blend of business needs, data, and daily business processes. Ensuring data integrity and database security is the job of the database administrator. Constraints serve to balance the needs of business while maintaining the integrity of the database. Is it a business rule that all employees must be assigned an identification number before being entered into the database? Can anyone view the company salary table or the profit and loss information? Can data be entered into the database that is incomplete for some columns? Is it possible to delete data from a table that has related data in another table? Page 28
33 What Will I Learn? What Will I Learn? What Will I Learn? Verify access to Internet resources for the "What's Next in Computing" activity in Try It/ Solve It. Page 29
34 Why Learn It? Why Learn It? Page 30
35 Begin this lesson with a review question. How do you make changes to a view that already exists? CREATE or REPLACE VIEW viewname Explain the CREATE VIEW syntax and the WHERE clause statement that restricted what department data can be seen in the view. Page 31
36 Explain that the WHERE clause restricted the view and now the WITH CHECK OPTION restricts changes only to the department 50. Page 32
37 Explain the WITH READ ONLY syntax. Are there folders or resources on the school network that are READ ONLY? Page 33
38 Demonstrate the ROWNUM using the query shown in the graphic. Explain that ROWNUM is just a number value given to each row in the result set. Page 34
39 Discuss with students why it would be impossible to insert data through a view if the NOT NULL columns were missing from the view. NOT NULL means that the base columns must have a value. The user of a view will not see all the columns in the table and wouldn't know which columns in the base tables must have a value. Adding a new row must include data for all the NOT NULL columns for that row. Page 35
40 Try It / Solve It Try It / Solve It Try It / Solve It Assign or let students choose a topic. Assist them in finding Internet resources to explore the topic. Groups could report their findings to the class. Internet resources for this activity: (search-engine keywords: Moore's Law) - Wireless technologies -- when can we pull the plug? (search-engine keywords: future of wireless technologies, wireless technologies) - How big is big? What technologies are being developed to store large quantities of information? (search-engine keywords: big databases) - How much is too much? What are the trends in storing personal data and what are the issues being addressed related to personal privacy? (search-engine keywords: personal privacy and technology) - What new technologies are being developed to ensure personal identification? (search-engine keywords: biometric identification) - What is data mining? How can businesses target product advertising gleaned from data stored about your buying habits or Internet browsing preferences? (search-engine keywords: data mining) Page 36
41 - How can we make computers know how we see and feel? (search-engine keywords: IBM Project Blue Eyes "How Computers Know How We Feel") What technologies are being developed to protect copyrighted material? (search-engine keywords: digital copyright protection) How small is small? What are the limits to miniaturizing computer technologies? Can a phone, computer, and camera be integrated into a wrist watch? (search-engine keywords: miniaturizing computer technologies) Page 37
42 Try It / Solve It Try It / Solve It Try It / Solve It Assign or let students choose a topic. Assist them in finding Internet resources to explore the topic. Groups could report their findings to the class. Internet resources for this activity: (search-engine keywords: Moore's Law) - Wireless technologies -- when can we pull the plug? (search-engine keywords: future of wireless technologies, wireless technologies) - How big is big? What technologies are being developed to store large quantities of information? (search-engine keywords: big databases) - How much is too much? What are the trends in storing personal data and what are the issues being addressed related to personal privacy? (search-engine keywords: personal privacy and technology) - What new technologies are being developed to ensure personal identification? (search-engine keywords: biometric identification) - What is data mining? How can businesses target product advertising gleaned from data stored about your buying habits or Internet browsing preferences? (search-engine keywords: data mining) Page 38
43 - How can we make computers know how we see and feel? (search-engine keywords: IBM Project Blue Eyes "How Computers Know How We Feel") What technologies are being developed to protect copyrighted material? (search-engine keywords: digital copyright protection) How small is small? What are the limits to miniaturizing computer technologies? Can a phone, computer, and camera be integrated into a wrist watch? (search-engine keywords: miniaturizing computer technologies) Page 39
44 Try It / Solve It Try It / Solve It Try It / Solve It Demonstrate a SELECT statement to view USER_UPDATABLE_COLUMNS in the data dictionary or use the "Browse Data Dictionary" feature in HTML DB. Note that the tablenames are stored as uppercase letters. SELECT * FROM USER_UPDATABLE_COLUMNS WHERE table_name = 'COPY_D_SONGS'; Use the DESCRIBE statement to verify that you have tables named copy_d_songs, copy_d_events, copy_d_cds, and copy_d_clients in your schema. If you don't, use a subquery to create a copy of each. CREATE TABLE copy_tablename AS SELECT * FROM basetable_name; Page 40
45 Answers: 1. SELECT * FROM USER_UPDATABLE_COLUMNS WHERE table_name = 'COPY_D_SONGS'; Use the same syntax but change table_name for the other tables. 2. CREATE VIEW view_copy_d_songs AS SELECT * FROM copy_d_songs; 3. INSERT INTO view_copy_d_songs(id, title, duration, artist, type_code) VALUES(88, 'Mellow Jello', '2', 'The What', 4); SELECT * FROM view_copy_d_songs; SELECT * FROM copy_d_songs; Page 41
46 Try It / Solve It Try It / Solve It Try It / Solve It 4. CREATE VIEW read_copy_d_cds AS SELECT * FROM copy_d_cds WHERE year = 2000 WITH READ ONLY; 5. DELETE FROM read_copy_d_cds WHERE cd_number = 90; **fail to execute as view is read only ORA-01752: cannot delete from view without exactly one key-preserved table 6. CREATE OR REPLACE VIEW read_copy_d_cds AS SELECT * FROM copy_d_cds WHERE year = 2000 WITH CHECK OPTION CONSTRAINT ck_read_copy_d_cds; Page 42
47 Try It / Solve It Try It / Solve It Try It / Solve It 7. DELETE FROM read_copy_d_cds WHERE year = 2000; **executes as it meets the CHECK OPTION criteria 8. DELETE FROM read_copy_d_cds WHERE cd_number = 90; **query executes with 0 rows deleted 9. DELETE FROM read_copy_d_cds WHERE year = 2001; **query executes with 0 rows deleted 10. The base tables should have all original rows with no year 2000 data. Page 43
48 Lesson 4 - Managing Views Lesson 4 - Managing Views Lesson Preparation None. What to Watch For Inline views are complicated. Break down the subquery and its result set. Show how the outer query uses the data in the result set. Connections Inline subqueries can be used to reinforce students' understanding of subqueries in general. Relate top-n-analysis to a simple ORDER BY clause. The outcome of both expressions is to order data. The top-n-analysis specifically numbers each row returned and can limit the number of rankings displayed. Page 44
49 What Will I Learn? What Will I Learn? Page 45
50 Why Learn It? Why Learn It? Page 46
51 Ask students to query the data dictionary for a view they created in the previous lesson. Ask them to issue a DROP VIEW statement. In HTML DB, query the data dictionary to confirm that the view was deleted. If students don t have a view, use the following: CREATE VIEW view_employees AS SELECT first_name, last_name, FROM employees WHERE employee_id BETWEEN 100 and 124; DROP VIEW view_employees; Page 47
52 Explain the inline query in two steps: - The subquery in the FROM clause and the result set it returns. Students could execute this query (omit the aliases) to verify the result that it returns. - The outer query and its use of the subquery information in the join statement. Page 48
53 Use the graphic to explain top-n-analysis by first showing what the subquery is designed to return. The ROWNUM uses the subquery ordered result set to assign a sequential value starting with 1 to each of the rows returned by the subquery. The outer WHERE clause is used to restrict the number of rows returned and must use a < or <= operator. Page 49
54 Try It / Solve It Try It / Solve It Try It / Solve It 1. CREATE OR REPLACE VIEW view_copy_d_songs AS SELECT title, artist FROM copy_d_songs; SELECT * FROM view_copy_d_songs; 2. DROP VIEW view_copy_d_songs; SELECT * FROM view_copy_d_songs; 3. SELECT ROWNUM as RANK, last_name, salary FROM (SELECT last_name,salary FROM employees ORDER BY salary DESC) WHERE ROWNUM <= 3; Page 50
55 Try It / Solve It Try It / Solve It Try It / Solve It 4. SELECT a.last_name, a.salary, a.department_id, b.maxsal FROM employees a, (SELECT department_id, max(salary) maxsal FROM employees GROUP BY department_id) b WHERE a.department_id = b.department_id AND a.salary < b.maxsal; 5. SELECT ROWNUM as RANK, last_name, salary FROM (SELECT last_name,salary FROM f_staffs ORDER BY salary ) WHERE ROWNUM <= 3; Page 51
56 Lesson 5 - Practice Exercises and Review Lesson 5 - Practice Exercises and Review Lesson Preparation None. What to Watch For Students can "get lost" and frustrated in sequential processes. Check to make sure students complete practice 1 correctly before proceeding to the next question. Discuss briefly the errors generated by the queries. Understanding the errors is as important as understanding when code works. Connections None. Page 52
57 What Will I Learn? What Will I Learn? Page 53
58 Why Learn It? Why Learn It? Page 54
59 Page 55
60 Try It / Solve It Try It / Solve It Try It / Solve It Students should complete each practice exercise in the order presented. Each subsequent exercise is an extension of the prior exercise. If students make a mistake, a view can be recreated easily with a CREATE or REPLACE VIEW statement. If students have difficulty, do one question at a time and review the process for setting up the query and the result set. Review with students the Study Guide and Vocabulary. 1. CREATE TABLE my_departments AS SELECT * FROM departments; SELECT * FROM my_departments; 2. DESCRIBE my_departments; **department_name is NOT NULL, constraint name is SYS_C (this name could vary) ALTER TABLE my_departments DISABLE CONSTRAINT SYS_C ; Page 56
61 3. CREATE VIEW view_my_departments AS SELECT department_id, department_name FROM my_departments; Page 57
62 Try It / Solve It Try It / Solve It Try It / Solve It 4. INSERT INTO view_my_departments(department_id, department_name) VALUES(105, 'Advertising'); INSERT INTO view_my_departments(department_id, department_name) VALUES(120, Custodial'); INSERT INTO view_my_departments(department_id, department_name) VALUES(130, 'Planning'); 5. ALTER TABLE my_departments ADD CONSTRAINT my_department_id_pk PRIMARY KEY (department_id); 6. INSERT INTO view_my_departments (department_name) VALUES('Human Resources'); ORA-01400: cannot insert NULL into ("USWA_SKHS_SQL01_T01"."DEPARTMENTS"."DEPARTMENT_ID") Page 58
63 Try It / Solve It Try It / Solve It Try It / Solve It 7. INSERT INTO view_my_departments (department_name, department_id) VALUES('Human Resources', 220); 8. SELECT * FROM view_my_departments; 9. CREATE OR REPLACE VIEW view_my_departments(department_name, department_id, location_id, manager_id) AS SELECT department_name, department_id, location_id, manager_id FROM my_departments; Page 59
64 Try It / Solve It Try It / Solve It Try It / Solve It 10. ALTER TABLE my_departments ADD CONSTRAINT loc_id_my_dept_nn CHECK (location_id IS NOT NULL); ORA-02293: cannot validate (USCA_ORACLE_SQL01_S01.LOC_ID_MY_DEPT_NN) - check constraint violated ** adding the three new columns to the my_departments table inserted null values in the location_id column. A NOT NULL constraint can only be added to a column if the table is empty or if the column has a value for every row. 11. CREATE VIEW view_dept_locations AS SELECT d.department_name, l.street_address, l.city, l.state_province FROM departments d, locations l WHERE d.location_id = l.location_id AND l.country_id LIKE 'US'; SELECT * From view_dept_locations; Page 60
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 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 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 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 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 informationGIFT 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 informationDisplaying 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 informationDatabase 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 informationDUE: 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 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 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 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 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 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 informationUpdating 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 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 informationEXISTS 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 informationJoin, 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 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 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 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 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 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 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 informationDatabase 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 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 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 informationAlké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 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 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 informationIntroduction to Oracle9i: SQL
Introduction to Oracle9i: SQL Student Guide Volume 2 40049GC11 Production 1.1 October 2001 D33991 Authors Nancy Greenberg Priya Nathan Technical Contributors and Reviewers Josephine Turner Martin Alvarez
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 informationORACLE VIEWS ORACLE VIEWS. Techgoeasy.com
ORACLE VIEWS ORACLE VIEWS Techgoeasy.com 1 Oracle VIEWS WHAT IS ORACLE VIEWS? -A view is a representation of data from one or more tables or views. -A view is a named and validated SQL query which is stored
More informationDatabase Design & Programming with SQL: Part 1 Learning Objectives
Database Design & Programming with SQL: Part 1 Learning Objectives This is the first portion of the Database Design and Programming with SQL course. In this portion, students learn to analyze complex business
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 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 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 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 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 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 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 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 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 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 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 informationObjectives. After completing this lesson, you should be able to do the following:
Objectives After completing this lesson, you should be able to do the following: Describe the types of problems that subqueries can solve Define subqueries List the types of subqueries Write single-row
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 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 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 information13: MOODLE WIKIS. Oklahoma Department of CareerTech WELCOME TO THE MOODLE WIKIS TUTORIAL! In this tutorial, you will learn:
Oklahoma Department of CareerTech www.okcareertech.org 13: MOODLE WIKIS WELCOME TO THE MOODLE WIKIS TUTORIAL! In this tutorial, you will learn: What a wiki is Some ways to use a wiki with students How
More informationInstructor: Craig Duckett. Lecture 03: Tuesday, April 3, 2018 SQL Sorting, Aggregates and Joining Tables
Instructor: Craig Duckett Lecture 03: Tuesday, April 3, 2018 SQL Sorting, Aggregates and Joining Tables 1 Assignment 1 is due LECTURE 5, Tuesday, April 10 th, 2018 in StudentTracker by MIDNIGHT MID-TERM
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 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 informationExam 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 informationThree types of sub queries are supported in SQL are Scalar, Row and Table sub queries.
SQL Sub-Queries What are Sub queries? SQL Sub queries are the queries which are embedded inside another query. The embedded queries are called as INNER query & container query is called as OUTER query.
More informationBsc (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 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 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 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 informationExam : 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 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 informationRelational Database Development
Instructor s Relational Database Development Views, Indexes & Security Relational Database Development 152-156 Views, Indexes & Security Quick Links & Text References View Description Pages 182 183 187
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 informationHarlan County Public Schools. NTI Days Web Design, Advanced Multimedia. Grades 9-12, HCHS
Harlan County Public Schools NTI Days 1-10 Web Design, Advanced Multimedia Grades 9-12, HCHS Introduction: On any days designated as Non-Traditional Instruction (NTI) days, students will be required to
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 informationData Management Lecture Outline 2 Part 2. Instructor: Trevor Nadeau
Data Management Lecture Outline 2 Part 2 Instructor: Trevor Nadeau Data Entities, Attributes, and Items Entity: Things we store information about. (i.e. persons, places, objects, events, etc.) Have relationships
More informationIntroduction to Explicit Cursors. Copyright 2008, Oracle. All rights reserved.
Introduction to Explicit Cursors Introduction to Explicit Cursors 2 What Will I Learn? In this lesson, you will learn to: Distinguish between an implicit and an explicit cursor Describe why and when to
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 informationMANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9)
Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 6 Professional Program: Data Administration and Management MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) AGENDA
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 informationLesson Guides PRE-INTERMEDIATE
Lesson Guides PRE-INTERMEDIATE British Council 2018 The British Council is the United Kingdom s international organisation for cultural relations and educational opportunities. PRE-INTERMEDIATE LESSON
More informationLesson Plan. Course Title: Principles of Information Technology Session Title: Intro to Databases Lesson Duration: Varies dependent upon instructor
Lesson Plan Course Title: Principles of Information Technology Session Title: Intro to Databases Lesson Duration: Varies dependent upon instructor Performance Objective: Upon completion of this lesson,
More informationDatabase Programming with SQL
Database Programming with SQL 18-1 Objectives In this lesson, you will learn to: Define the terms COMMIT, ROLLBACK, and SAVEPOINT as they relate to data transactions List three advantages of the COMMIT,
More informationITCertMaster. 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 informationSTUDENT USER GUIDE FOR
STUDENT USER GUIDE FOR Contents Registering on Handshake... p. 2 Adjusting Public/Private settings...p. 3 Setting Notification Preferences p. 4 Uploading Documents. p. 4 Editing Documents... p. 5 Searching
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 informationCourse Overview. Copyright 2010, Oracle and/or its affiliates. All rights reserved.
Course Overview Course Objectives After completing this course, you should be able to do the following: Manage application navigation by using hierarchical lists with images, database-driven navigation,
More informationTop 6 SQL Query Interview Questions and Answers
Just my little additions, remarks and corrections to Top 6 SQL Query Interview Questions and Answers as published on http://javarevisited.blogspot.co.nz/2017/02/top-6-sqlquery-interview-questions-and-answers.html
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 informationQuerying Microsoft SQL Server 2014
Querying Microsoft SQL Server 2014 Course: 20461 Course Details Audience(s): IT Professional(s) Technology: Microsoft SQL Server 2014 Duration: 40 Hours ABOUT THIS COURSE This forty hours of instructor-led
More informationAdvance Database Systems. Joining Concepts in Advanced SQL Lecture# 4
Advance Database Systems Joining Concepts in Advanced SQL Lecture# 4 Lecture 4: Joining Concepts in Advanced SQL Join Cross Join Inner Join Outer Join 3 Join 4 Join A SQL join clause combines records from
More informationOut for Shopping-Understanding Linear Data Structures English
Out for Shopping-Understanding Linear Data Structures English [MUSIC PLAYING] [MUSIC PLAYING] TANZEELA ALI: Hi, it's Tanzeela Ali. I'm a software engineer, and also a teacher at Superior University, which
More informationDATA Data and information are used in our daily life. Each type of data has its own importance that contribute toward useful information.
INFORMATION SYSTEM LESSON 41 DATA, INFORMATION AND INFORMATION SYSTEM SMK Sultan Yahya Petra 1 DATA Data and information are used in our daily life. Each type of data has its own importance that contribute
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 information2018 Delegate Assembly
2018 Rookie of the Year Award Nominations for this award are based on the nominee s first full year of service. Thus, nominees to be honored in April 2018 must have been in their first year of teaching
More informationDatabase Management Systems,
Database Management Systems SQL Query Language (2) 1 Topics Update Query Delete Query Integrity Constraint Cascade Deletes Deleting a Table Join in Queries Table variables More Options in Select Queries
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 informationLab # 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 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 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 informationSql Server Check If Global Temporary Table Exists
Sql Server Check If Global Temporary Table Exists I am trying to create a temp table from the a select statement so that I can get the schema information from the temp I have yet to see a valid justification
More informationContent-Based Assessments. Project 12H Grand Opening
Content-Based Assessments GO! Fix It Project 12H Grand Opening For Project 12H, you will need the following files: w12h_grand_opening w12h_safety w12h_science w12h_opening_bullet You will save your file
More informationReference: W3School -
Language SQL SQL Adv Reference: W3School - http://www.w3schools.com/sql/default.asp http://www.tomjewett.com/dbdesign/dbdesign.php?page=recursive.php Recursive Associations/Relationship A recursive association
More informationMANAGING 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 informationRochester Institute of Technology Golisano College of Computing and Information Sciences Department of Information Sciences and Technologies
Rochester Institute of Technology Golisano College of Computing and Information Sciences Department of Information Sciences and Technologies 4002-360.01 ~ Introduction to Database & Data Modeling ~ Spring
More informationLesson Guides ELEMENTARY
Lesson Guides ELEMENTARY British Council 2018 The British Council is the United Kingdom s international organisation for cultural relations and educational opportunities. ELEMENTARY LESSON GUIDE WORK and
More informationEE221 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 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 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 information