Oracle SQL*plus John Ortiz. Lecture 10SQL: Overview2 Overview  SQL: Structured Query Language, pronounced S. Q. L. or sequel.  A standard language for.

Slides:



Advertisements
Similar presentations
PL/SQL. Introduction to PL/SQL PL/SQL is the procedure extension to Oracle SQL. It is used to access an Oracle database from various environments (e.g.
Advertisements

Let’s try Oracle. Accessing Oracle The Oracle system, like the SQL Server system, is client / server. For SQL Server, –the client is the Query Analyser.
Embedded SQL John Ortiz. Lecture 15Embedded SQL2 Why Isn’t Interactive SQL Enough?  How to do this using interactive SQL?  Print a well-formatted transcript.
Database Administration ISQA 436 Fall 2006 Mark Freeman
CS34311 CS3431 – Database Systems I Project Overview Elke A. Rundensteiner.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 1.
A Guide to SQL, Seventh Edition. Objectives Understand the concepts and terminology associated with relational databases Create and run SQL commands in.
CS34311 CS3431 – Database Systems I Project Overview Murali Mani.
7/2/2015Murali Mani -- CS5421 Database Management Systems DB Application Development Project Statement + Introduction to Oracle.
A Guide to MySQL 3. 2 Objectives Start MySQL and learn how to use the MySQL Reference Manual Create a database Change (activate) a database Create tables.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Overview of Database Languages and Architectures.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
Database Management Systems (DBMS)
1 ORACLE SQL iSQLPlus & SQLPLUS Statements. 1-2 iSQLPlus is a application software layer that allows programmers to utilize SQL to make changes to the.
Chapter 2 Database System Concepts and Architecture
Advance Computer Programming Java Database Connectivity (JDBC) – In order to connect a Java application to a database, you need to use a JDBC driver. –
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
A Guide to SQL, Eighth Edition Chapter Three Creating Tables.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 7-1 David M. Kroenke’s Chapter Seven: SQL for Database Construction and.
SQL: Overview and DDL Ch John Ortiz.
ASP.NET Programming with C# and SQL Server First Edition
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
The Relational Model. Review Why use a DBMS? OS provides RAM and disk.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 1 Chapter 2: Database System Concepts and Architecture - Outline Data Models and Their.
Announcements Read JDBC Project Step 5, due Monday.
Database Technical Session By: Prof. Adarsh Patel.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
CS 3630 Database Design and Implementation. Your Oracle Account UserName is the same as your UWP username Followed Not case sensitive Initial.
Introduction to SEQUEL. What is SEQUEL? Acronym for Structural English Query Language Acronym for Structural English Query Language Standard language.
Oracle 10g Database Administrator: Implementation and Administration Chapter 2 Tools and Architecture.
Database control Introduction. The Database control is a tool that used by the database administrator to control the database. To enter to Database control.
Kirkwood Center for Continuing Education Introduction to PHP and MySQL By Fred McClurg, Copyright © 2015, Fred McClurg, All Rights.
Database System Concepts and Architecture. Relational Model Concepts relational model represents the database as a collection of relations. Each relation.
7 1 Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
CERN - IT Department CH-1211 Genève 23 Switzerland t DB Development Tools Benthic SQL Developer Application Express WLCG Service Reliability.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
Creating and Maintaining Geographic Databases. Outline Definitions Characteristics of DBMS Types of database Relational model SQL Spatial databases.
1 More basics on DB access Elke A. Rundensteiner.
Visual Programing SQL Overview Section 1.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
1 Very basics on DB access Elke A. Rundensteiner.
SQL Overview Structured Query Language. Description  When Codd first described the theory of relational databases, he asserted that there should be a.
DBMS_Week 3-4 DBMS. Three-Schema Architecture – Internal schema (one view) describes physical storage structures access paths, indexes used Typically.
CP476 Internet Computing Perl CGI and MySql 1 Relational Databases –A database is a collection of data organized to allow relatively easy access for retrievals,
© 2007 by Prentice Hall2-1 Introduction to Oracle 10g Chapter 2 Overview of SQL and SQL*Plus James Perry and Gerald Post.
Starting with Oracle SQL Plus. Today in the lab… Connect to SQL Plus – your schema. Set up two tables. Find the tables in the catalog. Insert four rows.
1 Introduction to SQL *Plus Oracle SQL Interface MIS309 Database Systems.
2) Database System Concepts and Architecture. Slide 2- 2 Outline Data Models and Their Categories Schemas, Instances, and States Three-Schema Architecture.
CS 440 Database Management Systems Stored procedures & OR mapping 1.
CS320 Web and Internet Programming SQL and MySQL Chengyu Sun California State University, Los Angeles.
ISC321 Database Systems I Chapter 2: Overview of Database Languages and Architectures Fall 2015 Dr. Abdullah Almutairi.
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
Introduction to Database Programming with Python Gary Stewart
D Copyright © 2009, Oracle. All rights reserved. Using SQL*Plus.
Fundamental of Databases
Databases (CS507) CHAPTER 2.
CS 3630 Database Design and Implementation
CS320 Web and Internet Programming SQL and MySQL
Advanced Accounting Information Systems
Chapter 2 Database System Concepts and Architecture
SQL and SQL*Plus Interaction
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
DATABASE MANAGEMENT SYSTEM
CS3220 Web and Internet Programming SQL and MySQL
SQLPLUS: Oracle SQL Interface
CS3220 Web and Internet Programming SQL and MySQL
Presentation transcript:

Oracle SQL*plus John Ortiz

Lecture 10SQL: Overview2 Overview  SQL: Structured Query Language, pronounced S. Q. L. or sequel.  A standard language for relational, object- relational databases: SQL-86 by ANSI, SQL1 by ISO (87), SQL-89, SQL2 (92), SQL Web site:  Implemented by all commercial R/OR DBMSs: Oracle, Sybase, Ingres, Informix, DB2, SQL Server, … (with various degree of conformity)  We focus on SQL2 & SQL-1999 features and also Oracle SQL.

Lecture 10SQL: Overview3 Components of SQL  Have statements for  Schema definition & update  tables, indexes, views, …  Data Manipulation  query, insertion, deletion, update, …  Data integrity  constraints, …  System administration  users, data security, performance tuning, …  Application development  procedures, transaction, embedded SQL, …  …

Lecture 10SQL: Overview4 SQL: A Simple Example  Create a Students table create table Students ( SSN char(9) not null, Name varchar2(20), GPA number(3,2), Age number(2), primary key (SSN));  Insert a Student tuple insert into Students values ( , ‘John Smith’, 3.25, 29);

Lecture 10SQL: Overview5 SQL: A Simple Example (cont.)  Retrieve names of students whose GPA is higher than 3.0 and Age is less than 30. select Name from Students where GPA > 3.0 and Age < 30;  What data types are supported?  What constraints can be expressed? How?  What if I want to change the schema?  How to change data?  How to express more complex queries?

Lecture 10SQL: Overview6 Outline  Oracle SQL interface: sqlplus  SQL DDL  Interactive SQL queries, update, view  PL/SQL for procedures, constraints, triggers  Embedded SQL (Oracle Pro*C/C++, JDBC)  Oracle SQL  Standard SQL  Oracle manual: Oracle SQL Reference Manual (on-line).

Lecture 10SQL: Overview7 Oracle DBMS  A major commercial DBMS from Oracle (Object-Relational), supporting SQL.  Components: Oracle server, SQL*Plus, Precompilers (Pro*C/C++, …), JDBC driver, SQLJ, WebDB, Forms, Report, …  Platforms: Client-server, PC, Unix or Windows, Distributed, Parallel, …  Multiuser, Security, Transactions, Recovery,  We use it for course project and homework assignments.

Lecture 10SQL: Overview8 Oracle DB User Account  Needed for every DB user. Has separate user id & password.  Access through CSLan UNIX accounts.  Environment variables for Oracle access:  Oracle_BASE, Oracle_HOME, PATH, LD_PATH, CLASS_PATH, …  On-line Instructions for using Oracle.  “Using Oracle in CSLab” on course web page.  On-line Oracle manuals (URL is given in the previous article).

Lecture 10SQL: Overview9 Oracle SQL*Plus  Interactive user environment.  Runs SQL statements, PL/SQL statements, and other SQL*Plus commands  Allow simple command editing  Documentation:  On-line “help” command within sqlplus  On-line manual.  User login: Unix$sqlplus SQL> exit

Lecture 10SQL: Overview10 Use SQL*Plus to Run SQL  SQL*plus understands only Oracle SQL.  An SQL statement must end with semicolon ; a slash / on a line by itself, or a blank line.  An SQL statement can be typed in, or loaded from a.sql file (get filename).  An SQL can be executed from the command buffer (run), or from a.sql file  SQL statement in buffer can be written to a.sql file (save filename)

Lecture 10SQL: Overview11 Common SQL*Plus Commands  Display schema: describe table_name  Run Unix commands: !command  Run editor on.sql file: edit filename  Set host editor: define_editor=vi  Save a journal file: spool filename spool off  Customize environment: set option  Options: echo on, pause on, pagesize 30, …  View current settings: show all  Configuration file: login.sql

Lecture 10SQL: Overview12 SQL*Plus Command Editing  Show command in buffer: list  A set of simple line editing commands.  Better use external editor, say, vi or emacs.