Premium Essay

Chapter 8 Advanced Sql

In:

Submitted By carlosweed
Words 2100
Pages 9
Chapter 8 Advanced SQL

Chapter Objectives

This chapter continues what was covered in Chapter 7. While Chapter 7 dealt with single table queries, Chapter 8 discusses joins. Other topics are also included, such as triggers, stored procedures, functions, Embedded SQL, Dynamic SQL, and Persistent Stored Modules. This chapter also contains a detailed discussion of transaction integrity as well as the SQL-99 enhancements and extensions to SQL. An overview of data dictionaries is also included. Chapter 7 is obviously a prerequisite for this chapter. Specific student learning objectives are included at the beginning of the chapter. From an instructor's point of view, the objectives of this chapter are:
1. To provide many examples of relational queries from SQL, which show such capabilities as multiple-table data retrieval (join and other operators such as difference, union, and intersection), explicit and implicit joining, and built-in functions.
2. To illustrate the differences between the joining and subquery approaches to manipulating multiple tables in SQL.
3. To introduce the transaction and concurrency control features of relational DBMSs.
4. To discuss the SQL-99 enhancements to SQL.
5. To briefly discuss the data dictionary facilities available in Oracle.
6. To discuss triggers and stored procedures and provide examples of how these might be used.
7. To briefly discuss dynamic and embedded SQL.

Classroom Ideas

1. Have students program in some system that supports SQL along with this chapter. The nuances of joining multiple tables, nesting subqueries, properly qualifying built-in functions, and so forth are really only learned by writing a wide variety of non-trivial queries. There are exercises at the end of the chapter that will provide such practice for students.
2. If students have access to Oracle 8i, have them take a look at the

Similar Documents

Premium Essay

My Essay

...CECS 6605 Advanced Database Systems Assignment 1 Deadline: September 8, 2013 Part I. Entity Relationship Diagrams (ERD) Database Design Using Entity-Relationship Diagrams (2003) by Sikha Bagui and Richard Earp Auerbach Publications ISBN:0849315484 Chapter 1 (Database Design Using Entity-Relationship Diagrams) * Checkpoint 1.1, Problem 1; pp. 13-14 * Checkpoint 1.3, Problem 1, 3; pp. 25 Chapter 2 (Database Design Using Entity-Relationship Diagrams) * Checkpoint 2.1, Problems 1, 3, 5, 7; pp. 39 * Checkpoint 2.3, Problems 1, 3; pp. 61 Chapter 3 (Database Design Using Entity-Relationship Diagrams) * Checkpoint 3.1, Problems 1, 3, 5; pp. 78 Chapter 4 (Database Design Using Entity-Relationship Diagrams) * Checkpoint 4.1, Problems 1, 3, 5; pp. 99 * Checkpoint 4.3, Problems 1, 3; pp. 117 Part II. SQL A Guide to SQL (2008) by Philip J. Pratt and Mary Z. Last Use only Oracle for this part. Please show the complete question, query used, and print the query results. Do the exercises from the Henry Books Database. Chapter 1 (A Guide to SQL, Henry Books) * Exercises - odd numbers Chapter 2 (A Guide to SQL, Henry Books) * Exercises - odd numbers Chapter 3 (A Guide to SQL, Henry Books) * Exercises - odd numbers Chapter 4 (A Guide to SQL, Henry Books) * Exercises - odd numbers Part III. Database System Fundamentals Fundamentals of Database Systems (2011) by Ramez Elmasri; Shamkant B. Navathe ...

Words: 352 - Pages: 2

Premium Essay

Online Register

...Management Systems’ (21st – 31st May, 2013) Course Coordinator: Prof. S. Sudarshan Day / Date Tue 21 May 2013 09:00 – 10:30 Inaugural remarks (15 mins) Relational Model, SQL Part 1: Relations and Relational Algebra, Basic SQL, Joins, Set operations (Chapters 1, 2 and 3) SQL Part 2: Aggregate functions, Nested Subqueries, Database modification (Chapters 3 and 4) Tea Break 11:00 – 13:00 Session Continues.. (last 30 min discussion/quiz) Lunch 14:00-17:00 Tea Break 5:15-6:00 10:30 – 11:00 13:00 – 14:00 Lab 1: Basic SQL Installing, administering and using PostgreSQL and pgAdmin3; Basic SQL queries Lab 2: Intermediate SQL Aggregation, nested subqueries, database modification 17:0017:15 No Session Wed 22 May 2013 Session 10:30 – Continues.. 11:00 (last 30 min discussion/quiz) 13:00– 14:00 17:0017:15 Linux System Admin. (IITB CSE Sysadms) Thu 23 May 2013 Fri 24 May 2013 Sat 25 May 2013 Sun 26 May 2013 SQL Part 3: Session Outerjoins, Transactions, Integrity 10:30 – Continues.. constraints, Triggers, 11:00 (last 30 min Authorization, JDBC discussion/quiz) (Chapters 4 and 5) ER Design (Chapter 7) Session 10:30 – Continues.. 11:00 (last 30 min discussion/quiz) 10:30 – 11:00 Session Continues.. (last 30 min discussion/quiz) 13:00 – 14:00 Lab 3: Advanced SQL Outerjoins, DDL: integrity constraints, authorization Lab 4: ER Design Tutorial (Last 45 mins for solutions discussion, broadcast) Lab 5: Normalization Tutorial (Last 45 mins...

Words: 591 - Pages: 3

Premium Essay

Sql Database

...dwqwdlqkdmqwkldnqwkldnwkdnwqdldkwd Solutions To Workshop Exercises Chapter 1: SQL and Data 4 Chapter 2: SQL: The Basics 13 Chapter 3: The WHERE and ORDER BY Clauses 20 Chapter 4: Character, Number, and Miscellaneous Functions 27 Chapter 5: Date and Conversion Functions 42 Chapter 6: Aggregate Functions, GROUP BY and HAVING 57 Chapter 7: Equijoins 73 Chapter 8: Subqueries 108 Chapter 9: Set Operators 126 Chapter 10: Complex Joins 137 Chapter 11: Insert, Update, and Delete 164 Chapter 12: Create, Alter, and Drop Tables 178 Chapter 13: Indexes, Sequences, and Views 188 Chapter 14: The Data Dictionary, Scripting, and Reporting 197 Chapter 15: Security 213 Chapter 16: Regular Expressions and Hierarchical Queries 222 Chapter 17: Exploring Data Warehousing Features 235 Chapter 18: SQL Optimization 248 Chapter 1: SQL and Data In this chapter, you learned about data, how data is organized in tables, and how the relationships among the tables are depicted in a schema diagram. Based on your newly acquired knowledge, design a schema diagram based on the fictional ACME Construction Company. Draw on your own work experience to design the following components. 1. Draw boxes for these three tables: EMPLOYEE, POSITION, and DEPARTMENT. Solution: See the solution for Exercise 3. 2. Create at least three columns for each of the tables and designate a primary key for each table. Solution: See the solution for Exercise 3. 3. Create relationships among the...

Words: 6586 - Pages: 27

Premium Essay

Syllabus

...Design and Implementation for Business This course uses the latest database tools and techniques for persistent data and object-modeling and management. Students gain extensive hands-on experience with exercises and a term project using Oracle, SQL Server, and other leading database management systems. Students learn to model persistent data using the standard Entity-Relationship model (ERM) and how to diagram those models using EntityRelationship Diagrams (ERDs), Extended Entity-Relationship Diagrams (EERDs), and UML diagrams. Students learn the standards-based Structured Query Language (SQL) and the extensions to the SQL standards implemented in Oracle and SQL Server. Students learn the basics of database programming, and write simple stored procedures and triggers. The Role of this Course in the MSCIS Online Curriculum This is a core course in the MSCIS online curriculum. It provides students with an understanding and experience with database technology, database design, SQL, and the roles of databases in enterprises. This course is a prerequisite for the three additional database courses in the MSCIS online curriculum, which are CS674 Database Security, CS699 Data Mining and Business Intelligence and CS779 Advanced Database Management. By taking these three courses you can obtain the Concentration in Database Management and Business Intelligence. CS674 Database Security also satisfies an elective requirement for the...

Words: 10777 - Pages: 44

Premium Essay

Asignment

...Oracle® Database Concepts 10g Release 2 (10.2) B14220-02 October 2005 Oracle Database Concepts, 10g Release 2 (10.2) B14220-02 Copyright © 1993, 2005, Oracle. All rights reserved. Primary Author: Michele Cyran Contributing Author: Paul Lane, JP Polk Contributor: Omar Alonso, Penny Avril, Hermann Baer, Sandeepan Banerjee, Mark Bauer, Bill Bridge, Sandra Cheevers, Carol Colrain, Vira Goorah, Mike Hartstein, John Haydu, Wei Hu, Ramkumar Krishnan, Vasudha Krishnaswamy, Bill Lee, Bryn Llewellyn, Rich Long, Diana Lorentz, Paul Manning, Valarie Moore, Mughees Minhas, Gopal Mulagund, Muthu Olagappan, Jennifer Polk, Kathy Rich, John Russell, Viv Schupmann, Bob Thome, Randy Urbano, Michael Verheij, Ron Weiss, Steve Wertheimer The Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited. The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. This document is not warranted to be error-free. Except as may be expressly permitted in your license agreement...

Words: 199783 - Pages: 800

Free Essay

Oracle for Dummies

...™ Everything Easier! Making cle 11g Ora ® Learn to: • Set up and manage an Oracle database • Maintain and protect your data • Understand Oracle database architecture • Troubleshoot your database and keep it running smoothly Chris Zeis Chris Ruel Michael Wessler www.it-ebooks.info www.it-ebooks.info Oracle 11g ® FOR DUMmIES ‰ www.it-ebooks.info www.it-ebooks.info Oracle 11g ® FOR DUMmIES by Chris Zeis, Chris Ruel, and Michael Wessler ‰ www.it-ebooks.info Oracle® 11g For Dummies® Published by Wiley Publishing, Inc. 111 River Street Hoboken, NJ 07030-5774 www.wiley.com Copyright © 2009 by Wiley Publishing, Inc., Indianapolis, Indiana Published by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online...

Words: 106399 - Pages: 426

Free Essay

Is562 – Database Applications and Programming

...IS562 – Database Applications and Programming 4 points for the first 19 - 2 points for the questions 20 through 31 Chapter 1 1. List all employee information in department 30. select * from emp where deptno = 30; EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30 7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30 7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30 7698 BLAKE MANAGER 7839 01-MAY-81 2850 30 7844 TURNER SALESMAN 7698 08-SEP-81 ...

Words: 1973 - Pages: 8

Free Essay

Hci Storyboard

...2011 Install SharePoint Server 2010 Installation and configuration for development This tutorial helps you to install SharePoint Server 2010. It shows you step-by-step how to setup requirements like Windows Server 2008 R2 including roles and features, administrative and service accounts as well as SQL Server 2008 R2. With these requirements installed you are able to deploy SharePoint Server 2010. Get more tutorials at http://sharepoint-tutorial.net/ Need a SharePoint book? http://sharepoint-book.net/ SharePoint resources http://andreasglaser.net/ Disclaimer THIS INFORMATION IS PROVIDED “AS IS” WITHOUT ANY WARRANTY OF ANY KIND. All trademarks are property of their respective owners. © Copyright 2011 Andreas Glaser Software Engineering GmbH Version: 1.1, 3/9/2011 Overview 1 Table of contents 1. Overview .............................................................................................................................. 2 1.1. 1.2. 2. 2.1. 2.2. 2.3. Hardware requirements .......................................................................................................... 3 Software requirements ........................................................................................................... 4 Installation ............................................................................................................................... 5 Updates ...............................................................................................

Words: 4069 - Pages: 17

Premium Essay

Computer Tricks

...certification and education. EC-Council certifications are viewed as the essential certifications needed where standard configuration and security policy courses fall short. Providing a true, hands-on, tactical approach to security, individuals armed with the knowledge disseminated by EC-Council programs are securing networks around the world and beating the hackers at their own game. The Solution: EC-Council Press The EC-Council | Press marks an innovation in academic text books and courses of study in information security, computer forensics, disaster recovery, and end-user security. By repurposing the essential content of EC-Council’s world class professional certification programs to fit academic programs, the EC-Council | Press was formed. With 8 Full Series, comprised of 27 different books, the EC-Council | Press is set to revolutionize global information security programs and ultimately create a new breed of practitioners capable of combating this growing epidemic of cybercrime and the rising threat of cyber war. This Certification: C|EH – Certified Ethical Hacker Certified Ethical Hacker is a certification designed to immerse the learner in an interactive environment where they will learn how to scan, test, hack and secure information systems. Ideal candidates for the C|EH program are security professionals, site administrators, security officers, auditors or anyone who is concerned with the integrity of a network infrastructure. The goal of the Ethical Hacker is to help the organization...

Words: 61838 - Pages: 248

Premium Essay

B2B Advantages and Disadvantages

...This page intentionally left blank Te n t h E d i t i o n MODERN DATABASE MANAGEMENT Editorial Director: Sally Yagan Editor in Chief: Eric Svendsen Executive Editor: Bob Horan Editorial Project Manager: Kelly Loftus Editorial Assistant: Jason Calcano Director of Marketing: Patrice Lumumba Jones Marketing Manager: Anne Fahlgren Marketing Assistant: Melinda Jensen Senior Managing Editor: Judy Leale Project Manager: Becca Richter Senior Operations Supervisor: Arnold Vila Operations Specialist: Ilene Kahn Senior Art Director: Jayne Conte Cover Designer: Suzanne Behnke Cover Art: Fotolia © vuifah Manager, Visual Research: Karen Sanatar Permissions Project Manager: Shannon Barbe Media Project Manager, Editorial: Denise Vaughn Media Project Manager, Production: Lisa Rinaldi Supplements Editor: Kelly Loftus Full-Service Project Management: PreMediaGlobal Composition: PreMediaGlobal Printer/Binder: Edwards Brothers Cover Printer: Lehigh-Phoenix Color/Hagerstown Text Font: Palatino Credits and acknowledgments borrowed from other sources and reproduced, with permission, in this textbook appear on appropriate page within text. Microsoft® and Windows® are registered trademarks of the Microsoft Corporation in the U.S.A. and other countries. Screen shots and icons reprinted with permission from the Microsoft Corporation. This book is not sponsored or endorsed by or affiliated with the Microsoft Corporation. Copyright © 2011, 2009, 2007, 2005, 2002...

Words: 193467 - Pages: 774

Free Essay

Biometrics

...Biometrics Presented by Ratna Sudha.R CONTENTS 1. Introduction 2. Security and authentication 3. Methods of verification a. Psychological verification i. Finger Print. ii. Hand Print. iii. Face Measurement. iv. Retinal Scanning. v. DNA Analysis. b. Behavioral verification i. Typing. ii. Signature. iii. Voice. 4. Identification. 5. Verification. 6. Advantages 7. Limitations 8. Conclusion. 9. References Introduction Biometrics is an advanced technology for superb security and authentication .The very term "biometric” it represent that "bio" means related to the biological study and "metric " means something, which is related to measurement. In network environment security is a crucial factor. Provide security to pages in the network is to difficulty. Password is not a good measurement for security. Good security mechanism is necessary on the Internet. Security in different levels applies to various documents. Security is depends how security assign to documents. Security depends on following categories. 1. Confidential 2. Secret 3. Non-secret 4. Public Confidential pages over the network provide full security...

Words: 1911 - Pages: 8

Premium Essay

Mr. 893723974

...CHAPTER 6 Introduction to SQL LEARNING OBJECTIVES After studying this chapter, you should be able to: ■ Concisely define each of the following key terms: relational DBMS (RDBMS), catalog, schema, data definition language (DDL), data manipulation language (DML), data control language (DCL), scalar aggregate, vector aggregate, base table, virtual table, dynamic view, and materialized view. ■ ■ ■ ■ ■ Visit www.pearsonhighered.com/ hoffer to view the accompanying video for this chapter. Interpret the history and role of SQL in database development. Define a database using the SQL data definition language. Write single-table queries using SQL commands. Establish referential integrity using SQL. Discuss the SQL:1999 and SQL:2008 standards. INTRODUCTION Pronounced “S-Q-L” by some and “sequel” by others, SQL has become the de facto standard language for creating and querying relational databases. (Can the next standard be the sequel to SQL?) The primary purpose of this chapter is to introduce SQL, the most common language for relational systems. It has been accepted as a U.S. standard by the American National Standards Institute (ANSI) and is a Federal Information Processing Standard (FIPS). It is also an international standard recognized by the International Organization for Standardization (ISO). ANSI has accredited the International Committee for Information Technology Standards (INCITS) as a standards development organization; INCITS is working on the next version...

Words: 22483 - Pages: 90

Premium Essay

Information Processing

...DATABASE MODELING AND DESIGN The Morgan Kaufmann Series in Data Management Systems (Selected Titles) Joe Celko’s Data, Measurements and Standards in SQL Joe Celko Information Modeling and Relational Databases, 2nd Edition Terry Halpin, Tony Morgan Joe Celko’s Thinking in Sets Joe Celko Business Metadata Bill Inmon, Bonnie O’Neil, Lowell Fryman Unleashing Web 2.0 Gottfried Vossen, Stephan Hagemann Enterprise Knowledge Management David Loshin Business Process Change, 2nd Edition Paul Harmon IT Manager’s Handbook, 2nd Edition Bill Holtsnider & Brian Jaffe Joe Celko’s Puzzles and Answers, 2 Joe Celko nd Location-Based Services ` Jochen Schiller and Agnes Voisard Managing Time in Relational Databases: How to Design, Update and Query Temporal Data Tom Johnston and Randall Weis Database Modeling with MicrosoftW Visio for Enterprise Architects Terry Halpin, Ken Evans, Patrick Hallock, Bill Maclean Designing Data-Intensive Web Applications Stephano Ceri, Piero Fraternali, Aldo Bongio, Marco Brambilla, Sara Comai, Maristella Matera Mining the Web: Discovering Knowledge from Hypertext Data Soumen Chakrabarti Advanced SQL: 1999—Understanding Object-Relational and Other Advanced Features Jim Melton Database Tuning: Principles, Experiments, and Troubleshooting Techniques Dennis Shasha, Philippe Bonnet SQL: 1999—Understanding Relational Language Components Jim Melton, Alan R. Simon Information Visualization in Data Mining and Knowledge Discovery Edited by Usama Fayyad, Georges G. Grinstein...

Words: 89336 - Pages: 358

Premium Essay

Doc Remove Delibitablement

...| 40 | TOEIC 1 | 2,5 | 32 | Advanced Maintenance | 2,5 | 32 | Numerical Analysis | 2,5 | 32 | Operations Research | 2,5 | 32 | Servo (Tuto) | 2,5 | 32 | Servo (Courses) | 2,5 | 32 | Algorithm (Data Structure) | 2,5 | 32 | Algorithm oriented object (Tuto, C++ Language) | 3 | 40 | Operating System (Theories and Fundamental) | 2,5 | 32 | WAN (courses + Tuto) | 4,5 | 60 | Method of Analysis 1 | 3 | 40 | Programming Workshop C | 2,5 | 32 | Software Engineering workshop (Access, VB) | 3 | 40 | Management Workshop for Science Engineer | 2 | 24 | Entrepreneurship | 1,5 | 20 |   |   |   | TOTAL | 63,5 | 832 | ------------------------------------------------- OBJECT ORIENTED ALGORITHM ------------------------------------------------- (Hands-On in Language C + +) CHAPTER I: GENERAL ON CLASS I. Notion of class • Generality of P.O.O • Incompatibility C / C + + II. Property of the member functions • Defaults • Member functions in-line • Transmission of object as argument III. Object assignment IV. Object Constructors and Destructors V. Object initialization VI. The copy constructor VII. Tables to Objects CHAPTER II: THE OPERATOR SURDEFINITION I. The mechanism surdéfinition II. The possibilities and limits of surdéfinition CHAIPTRE III: FUNCTIONS FRIENDS I. Principle of Friendship II. Independent functions of a class friends III. Other situations of Friendship CHAPTER IV: THE LEGACY I. Definition...

Words: 2262 - Pages: 10

Premium Essay

Research

...MOBILE STORE MANAGEMENT SYSTEM _______________ A Thesis Presented to the Faculty of San Diego State University _______________ In Partial Fulfillment of the Requirements for the Degree Master of Science in Computer Science _______________ by Park B. Patel Fall 2012 iii Copyright © 2012 by Park B. Patel All Rights Reserved iv DEDICATION Dedicated to My Mother Chetna Patel, Father Bharat Patel, Wife Komal Trivedi And Brother Jatan Patel v ABSTRACT OF THE THESIS Mobile Store Management System by Park B. Patel Master of Science in Computer Science San Diego State University, 2012 The Mobile Store Management System is software which can become the backbone for a billing and inventory system for small organizations. This software provides an uncomplicated system to run mobile stores. This application could be very useful to small organizations. This application is inspired from current pen and paper based store management systems. It will provide an easy and attractive interface so that the user can easily manage and utilize the application. Various other approaches were considered for this application. This application is designed in a way that it will only require a minimum amount of information from the user. The goal was to look for the minimum amount of information that will meet needed requirements. vi TABLE OF CONTENTS PAGE ABSTRACT ................................................................

Words: 10507 - Pages: 43