Oracle SQL - Basic: 3 Days 70% Lecture, 30% Lab Basic Level
Oracle SQL - Basic: 3 Days 70% Lecture, 30% Lab Basic Level
3 days 70% Lecture, 30% Lab Basic Level Overview SQL (Structured Query Language) is the universal language used to interact with all commercial relational database management systems (RDBMSs). The Oracle SQL - Basic course incorporates lecture, labs and practical exercises to teach students relational database fundamentals and Oracle SQL programming skills. Topics covered include RDBMS clientserver operations, data tables, referential integrity, and the Oracle SQL language to include simple and complex data definition and data manipulation language. The course shows the general syntax of each statement according to Oracle SQL and follows with numerous examples of various uses of each statement. Each example is shown in the standard ANSI SQL format and Oracle format to show that most of the language is completely portable but that there are some proprietary differences. Benefits Upon successful completion of this course, students should be able to understand and use Oracle SQL to: create new tables insert new data into the tables modify or delete existing data retrieve data according to specified selection criteria retrieve related data from several tables in a single query. Intended Audience This course is recommended for database application programmers and system administrators, database designers and system architects, programmers, data analysts, power end users, and managers interested in gaining an ability to create Oracle SQL queries. Prerequisites Students should have general computer programming background. Developer The course was developed by Deac Lancaster. Deac has over 36 years of teaching experience and is the author of Transact-SQL Desk Reference, Prentice Hall, 2003.
On-site System Requirements White or Black board with markers Projector (connectable to laptop) and screen Each student (or pair) needs a computer with Windows 2000 Workstation or Server or Windows XP Pro, each with Oracle 9i installed. All computers should be networked together or have Internet access. The student machines may have a different operating system than mentioned above if a system administrator is available if needed. Suggested Follow-On Courses Oracle SQL -Advanced Training Approach This is an intensive, interactive course, which is approximately 70% lecture and 30% lab. Questions are highly encouraged. Recommended Texts (if desired, as additional resource): SQL Fundamentals, 2nd edition, John Patrick, Prentice-Hall. Transact-SQL Desk Reference: For Microsoft SQL Server, Deac Lancaster, Prentice-Hall. Outline Day 1 Chapter 1Introduction to RDBMS and SQL Using a commercial RDBMS to model business data. Oracle SQL and the ANSI SQL standard. Client-Server Architecture Organizing and accessing collections of tables. The SQL Language o SQL Data Types - 1st look o SQL Comments o Data and Metadata o Identifiers o Data Definition Language (DDL) o Data Manipulation Language (DML) o DDL Syntax & Examples - CREATE TABLE, ALTER TABLE, DROP TABLE Commercial RDBMS Utilities to Show Table Structure DML Syntax & Examples - INSERT, UPDATE, DELETE, SELECT Capitalization In Sql Statements Complete Simple Example of DDL and DML Operations
Day 2 Chapter 2 SQL Data Types and Basic Queries Uses of an RDBMS: OLTP and DSS o OLTP Online Transaction Processing - focus of this class o DSS Decision Support Systems, Data Warehousing Expressions in SQL Column Aliases dual - Oracle STRING CONCATENATION ANSI SQL Data Types o ANSI SQL Types compared with Oracle Automatically Generated Primary Key Values o Oracle SEQUENCE to generate Integer values Domain Values and NULL Literals (Constants) o CHARACTER and VARCHAR Literals: o Number Literals: INT, DEC, NUMERIC, FLOAT, o DATE and TIME Literals: o Oracle DATE literals ANSI SQL Symbolic Constants CAST o Oracle functions to convert among data types Queries: SELECT Statement - 2d look SQL is Free Form DISTINCT ORDER BY Aggregate Functions - Count, SUM, AVG, MIN, MAX Relational Operators, NULL Values and Logical Operators o Comparing VARCHAR and CHAR Values for Equality o NULL and Three Way Boolean Logic in SQL o Comparing a column to a domain value vs being NULL o Using IS NULL in a query o Updating a Value to NULL Compound WHERE clauses Truth Tables with NULL LIKE Pattern Matching Operator ANSI SQL Functions - overview Other Functions in Oracle
Day 3 Chapter 3 Schemas, Views, Joins Schema and Catalog o Database Diagram Views Table Aliases (correlation names) Joins Inner Joins - The essence of RDBMSs o Inner Join Examples: o Self-Join o Outer Joins Left Outer Join Right Outer Join Full Outer Join Relationships o Keys, Primary Keys and Foreign Keys o Database Diagram or Schema Diagram o M:1 and 1:1 Relationships o Many to Many Relationships ANSI SQL Transaction Control o Starting and Ending a Transaction
Lab Exercises - Chapter 3 For more information, contact: Tom Wille tw@tm-associates.com TM Associates, Inc. 503-656-4457 www.tm-associates.com