Discover millions of ebooks, audiobooks, and so much more with a free trial

From $11.99/month after trial. Cancel anytime.

Oracle Quick Guides: Part 3 - Coding in Oracle: SQL and PL/SQL
Oracle Quick Guides: Part 3 - Coding in Oracle: SQL and PL/SQL
Oracle Quick Guides: Part 3 - Coding in Oracle: SQL and PL/SQL
Ebook150 pages2 hours

Oracle Quick Guides: Part 3 - Coding in Oracle: SQL and PL/SQL

Rating: 0 out of 5 stars

()

Read preview

About this ebook

This is Part 3 of a series of quick learning guides for Oracle designers, developers and managers. Part 3 introduces completely new entrants to the main concepts of the SQL language and to the use and development of Oracle's PL/SQL procedural version of SQL.

The guide includes details of how to install and use a SQL*Plus client and the basic use of Oracle's SQL Developer tool. The guide also provides a foundation in coding practise in SQL and PL/SQL with some basic guidelines for good practise in coding and managing SQL and PL/SQL software performance issues. Part 3 also contains a glossary of Oracle terminology related to SQL and PL/SQL with clear explanations of the terms used.

These guides are designed to rapidly deliver key information about Oracle to the following audience groups:

- Project Managers, Team Leaders, and Testers who are new to Oracle and need rapid access to strategic information about the Oracle development environment.

- Business Analysts, Designers and Software developers who are new to Oracle and need to make a first step in gaining a detailed understanding of the design and development issues involved in Oracle.

Part 3 assumes that the reader has read Parts 1 and 2 of the Oracle Quick Guides or their equivalent content. The contents of Part 3 include the following subject headings:

1. What are SQL, SQL*Plus and PL/SQL?
2. Basic Components of SQL.
3. Basic SQL Language Syntax.
3.1 SQL Language Elements.
3.2 SQL Operators
3.3 SQL Expressions
3.4 SQL Functions
3.5 SQL Clauses
3.6 SQL Query syntax.
3.7 SQL Data Modification Language syntax (DML).
3.8 SQL Data Definition Language syntax (DDL).
3.9 SQL Data Command Language syntax (DCL).
3.10 SQL Data Types in Oracle
4. Complex SQL constructs: Understanding Joins.
5. Understanding Commit and Rollback.
6. Basic architecture PL/SQL Procedures, Functions and Triggers.
7. Basic PL/SQL Language syntax.
8. PL/SQL Exception handling.
9. SQL and PL/SQL: some standards for good coding appearance.
10. Performance issues when coding in SQL
11. Installing and using a SQL*Plus client
12. SQL - PL/SQL Development Tools
13. Glossary of Terms.

LanguageEnglish
Release dateAug 11, 2013
ISBN9788494085383
Oracle Quick Guides: Part 3 - Coding in Oracle: SQL and PL/SQL
Author

Malcolm Coxall

Malcolm Coxall is a management consultant, systems analyst, organic farmer and author, with more than 30 years experience working for many of the world's largest corporate and institutional organisations, starting in the field of dispute arbitration for the ILO. These experiences have provided him a ringside view of the management methodologies used by medium and large businesses in areas as diverse as banking, oil, defence, telecoms, insurance, manufacturing, mining, food, agriculture, aerospace, textiles, and heavy engineering. Malcolm has published articles on political science, sociology, human design, sustainable agriculture, organic food production, technology in organic farming, biodiversity, forest management, environmental protection and environmental economics. He is active in European environmental politics and was a successful private complainant in the European Court of Justice in several cases of national breaches of European environmental law. He now lives in Southern Spain from where he continues his IT and system consultancy work, writing and managing the family's organic olive farm.

Read more from Malcolm Coxall

Related to Oracle Quick Guides

Titles in the series (4)

View More

Related ebooks

Programming For You

View More

Related articles

Reviews for Oracle Quick Guides

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Oracle Quick Guides - Malcolm Coxall

    Oracle Quick Guides Part 3 - Coding in Oracle: SQL and PL/SQL

    Oracle Quick Guides - Part 3 Coding in Oracle:

    SQL and PL/SQL

    Malcolm Coxall

    Edited by Guy Caswell

    Published by M.Coxall - Cornelio Books

    Copyright 2013 Malcolm Coxall

    First Published in Spain , United Kingdom 2013

    ISBN : 978-84-940853-8-3

    "Space does not exist unless there are objects in it

    Nor does time exist without events."

    Contents

    Preface and Audience .

    1. What are SQL, SQL*Plus and PL/ S QL?

    2. B a sic C omponents of SQL.

    3. Basic SQL Language S yntax.

    3.1 SQL Language Elements.

    3.2 SQL Operators .

    3.3 SQL Expressions .

    3.4 SQL Functions .

    3.5 SQL Clauses .

    3 .6 SQL Query syntax .

    3.7 SQL Data M odification Language syntax (DML) .

    3.8 SQL Data Definition Language syntax (DDL) .

    3.9 SQL Data C ommand Language syntax (DCL) .

    3.10 SQL Data Types in Oracle .

    4. Complex SQL constructs: Understanding Joins .

    5. Understanding Commit and R ollback .

    6 . Basic architecture PL/SQL Procedures, Functions and Triggers .

    7 . Basic PL/SQL Language syntax .

    8 . PL/SQL Exception handling .

    9 . SQL and PL/SQL : some standards for good coding appearance .

    10 . Performance issues when coding in SQL .

    11 . Installing a nd using a SQL*Plus client .

    12 . SQL - PL/SQL Development Tools .

    13 . Glossary of Terms.

    About the Author

    Preface and Audience

    Oracle Quick Guides: Welcome to Oracle Quick Guides, a series of quick learning guides for Oracle designers, developers and managers.

    Guide Audience: These guides are designed to rapidly deliver key information about Oracle to the following audience groups:

    - Project Managers, Team Leaders and Testers who are new to Oracle and need rapid access to strategic information about the Oracle development environment.

    - Business Analysts, Designers and Software Developers who are new to Oracle and need to make a first step in gaining a detailed understanding of the design and development issues involved in Oracle.

    Guide Contents: These guides have been divided by subject matter. They become increasingly complex and more specific the later the volume. Thus, volume 1 is quite general but later volumes are quite technical and specific.

    Our Objective: There are plenty of Oracle textbooks and user manuals on the market. Most of them are huge and only partly relevant to a particular group of readers. Therefore, we decided to divide the subject into smaller, more targeted volumes in order that you only get the information YOU need.

    For example, a Project Manager doesn't need to know some of the more esoteric programming tips, but will need to know some of the strategic issues affecting design and testing. In a similar way, a Programmer is much more interested in the syntactic details of a piece of software than in the strategic issues affecting the choice of an Oracle upgrade path.

    And so we have target ed these guides at particular groups with specific interests whilst try ing to avoid overloading reader s with too much detail or extraneous material.

    Assumptions: We assume that the reader will be using Oracle 9i, 10g or 11g, although most of the material will apply equally to earlier versions of the Oracle RDBMS.

    1. What are SQL, SQL*Plus and PL/SQL?

    SQL stands for Structured Query Language. It is the language most used to communicate with a relational database.

    According to ANSI (the American National Standards Institute), SQL is the standard language for relational database management systems. ANSI provides a standard for SQL , which is the basis for many commercial versions of the language.

    SQL statements are used to perform fundamental database tasks , such as to enter and update data on a database, or retrieve data from a database. Some common relational database management systems th at use SQL are: Oracle, SQL Server, Access, etc.

    Is SQL standard? Yes and No. Although most database systems use SQL, most also have their own additional proprietary extensions that are usually only used on their system s . However, the (ANSI) standard SQL commands such as Select, Insert, Update, Delete, Create, and Drop can be used to accomplish almost everything that o ne needs to do with a database. This means that SQL is very po rtable between database systems , even if you don't happen to be familiar with the local variant of SQL in a different database environment.

    How to pronounce SQL? The first version of SQL was in fact called Structured English Query Language and had the acronym SEQUEL. Due to trademark violations on the acronym, the name was changed to Standard Query Language and abbreviated as SQL. So at first it was intended to be pronounced as SEQUEL . Nowadays it's a matter of preference. The cognoscenti tend to call it SEQUEL.

    A little history of SQL : SQL was initially developed at IBM by Chamberlin and Boyce during the early 1970s. This original version (initially called SEQUEL ) was designed to manipulate and retrieve data stored in IBM's original quasi-relational database management system known as System R .

    In the late 1970s, Relational Software, Inc. (now Oracle Corporation) saw the potential of the concept s described by Codd, Chamberlin, and Boyce and decided to develop their own SQL-based RDBMS. In June 1979, Relational Software, Inc. introduced the first commercially available implementation of SQL, Oracle V2 (Version2) for VAX computers. Around the same time IBM continued their own development of what later became known as DB2 - their own proprietary relational database - also using SQL.

    SQL became a standard of the American National Standards Institute (ANSI) in 1986, and of the International organization for Standards (ISO) in 1987. Since then, the standard has been enhanced several times with added features. But code is not completely portable among different database systems, which can lead to vendor lock-in. The different makers do not perfectly follow the standard, they add extensions, and the standard is sometimes ambiguous. On the other hand, differences in SQL implementations are quite obvious and manageable.

    Why is SQL so important? These days SQL is ubiquitous. Although few end-users are aware of what drives most of their daily software systems, generally at the most fundamental level it is almost always SQL , which is the powerhouse of most commercial software applications in current use these days.

    So, w henever there is a relational database involved (which is almost always), then the core software will eventually use SQL as the lowest level language for the retrieval and manipulation of data from the database . Whatever layers of software are built on top of a database , such as smart html web front ends, java, .NET etc. , when it comes to interaction with the database it will be small tracts of SQL code that actually insert, extract and manipulate the data at the database level. SQL is the foundation of modern commercial software systems.

    SQL and PL/SQL is used in all Oracle application software product s. Oracle Forms and Reports , for example , both rely on SQL , as does Oracle APEX. Oracle Applications are based on software entirely dependent on SQL and PL/SQL. Even Oracle's own utility software systems like Enterprise Manager use SQL to interrogate the Oracle data dictionary.

    Therefore, at a software engineering level, an understanding of SQL is immensely important to a fundamental understanding of the design and working of a lot of commonly used commercial software. I t is therefore really worth putting an effort into acquiring a thorough understanding of the SQL language.

    What is SQL*Plus? SQL*Plus is basically a working environment for a developer ( or user ) to cr eate and execute SQL commands when using an Oracle database . SQL*Plus is the main interface to an Oracle Database server and it is

    Enjoying the preview?
    Page 1 of 1