Oracle for Software Developers. What is a relational database? Data is represented as a set of two- dimensional tables. (rows and columns) One or more.

Slides:



Advertisements
Similar presentations
The Architecture of Oracle
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.
Introduction to Structured Query Language (SQL)
SQL components In Oracle. SQL in Oracle SQL is made up of 4 components: –DDL Data Definition Language CREATE, ALTER, DROP, TRUNCATE. Creates / Alters.
MI807: Database Systems for Managers Introduction –Course Goals & Schedule –Logistics –Syllabus Review Relational DBMS Basics –RDBMS Role in Applications.
Managing Schema Objects
Harvard University Oracle Database Administration Session 2 System Level.
Introduction to Structured Query Language (SQL)
Using SQL Queries to Insert, Update, Delete, and View Data © Abdou Illia MIS Spring 2015 Wednesday 1/28/2015 Chapter 3A.
MD807: Relational Database Management Systems Introduction –Course Goals & Schedule –Logistics –Syllabus Review RDBMS Basics –RDBMS Role in Applications.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
Your Oracle Account UserName is the same as your UWP username Followed Not case sensitive Initial Password: UWPstudent Password is case sensitive.
Oracle Data Definition Language (DDL)
Advance Computer Programming Java Database Connectivity (JDBC) – In order to connect a Java application to a database, you need to use a JDBC driver. –
Oracle Database Administration
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
ASP.NET Programming with C# and SQL Server First Edition
Oracle Database Architecture An Oracle server: –Is a database management system that provides an open, comprehensive, integrated approach to information.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Chapter 6 Additional Database Objects
Database Technical Session By: Prof. Adarsh Patel.
Constraints  Constraints are used to enforce rules at table level.  Constraints prevent the deletion of a table if there is dependencies.  The following.
CS 3630 Database Design and Implementation. Your Oracle Account UserName is the same as your UWP username Followed Not case sensitive Initial.
ABC Insurance Co. Paul Barry Steve Randolph Jing Zhou CSC8490 Database Systems & File Management Dr. Goelman Villanova University August 2, 2004.
Introduction to SEQUEL. What is SEQUEL? Acronym for Structural English Query Language Acronym for Structural English Query Language Standard language.
Oracle Data Definition Language (DDL) Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
Oracle Database Administration
Chapter 6 Additional Database Objects Oracle 10g: SQL.
1 Copyright © 2006, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables.
1 Structured Query Language (SQL). 2 Contents SQL – I SQL – II SQL – III SQL – IV.
7 1 Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Nitin Singh/AAO RTI ALLAHABAD 1 SQL Nitin Singh/AAO RTI ALLAHABAD 2 OBJECTIVES §What is SQL? §Types of SQL commands and their function §Query §Index.
6 1 Lecture 8: Introduction to Structured Query Language (SQL) J. S. Chou, P.E., Ph.D.
ITBIS373 Database Development Lecture 3a - Chapter 3: Using SQL Queries to Insert, Update, Delete, and View Data.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
Oracle 11g: SQL Chapter 4 Constraints.
Database Lab Lecture 1. Database Languages Data definition language ( DDL ) Data definition language –defines data types and the relationships among them.
Chapter 4 Constraints Oracle 10g: SQL. Oracle 10g: SQL 2 Objectives Explain the purpose of constraints in a table Distinguish among PRIMARY KEY, FOREIGN.
6 Copyright © 2005, Oracle. All rights reserved. Managing Schema Objects.
8 Copyright © 2007, Oracle. All rights reserved. Managing Schema Objects.
Lecture5: SQL Overview, Oracle Data Type, DDL and Constraints Ref. Chapter6 Lecture4 1.
8 Copyright © 2004, Oracle. All rights reserved. Managing Schema Objects.
9 Copyright © Oracle Corporation, All rights reserved. Creating and Managing Tables.
SQL CREATING AND MANAGING TABLES lecture4 1. Database Objects ObjectDescription TableBasic unit of storage; composed of rows and columns ViewLogically.
Session 1 Module 1: Introduction to Data Integrity
Week 4 Lecture Part 2 of 3 Structured Query Language (SQL) Samuel ConnSamuel Conn, Faculty Suggestions for using the Lecture Slides.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Chapter 9 Designing Databases 9.1.
Transactions, Roles & Privileges Oracle and ANSI Standard SQL Lecture 11.
Altering Tables and Constraints Database Systems Objectives Add and modify columns. Add, enable, disable, or remove constraints. Drop a table. Remove.
Object storage and object interoperability
Relational Database Management System(RDBMS) Structured Query Language(SQL)
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 Chapters 21, 22, 23, 37  Ch. 21: SQL*Loader  Ch. 22: Database Links, Oracle Net  Ch. 23: Materialized Views (aka Snapshots)  Ch. 37: Data Dictionary.
2) Database System Concepts and Architecture. Slide 2- 2 Outline Data Models and Their Categories Schemas, Instances, and States Three-Schema Architecture.
Lecture # 24 Introduction to SQL Muhammad Emran Database Systems.
LM 5 Introduction to SQL MISM 4135 Instructor: Dr. Lei Li.
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
8 Copyright © 2005, Oracle. All rights reserved. Managing Schema Objects.
Creating and Managing Tables. Database Objects ObjectDescription TableBasic unit of storage; composed of rows and columns ViewLogically represents subsets.
7 Copyright © 2004, Oracle. All rights reserved. Managing Schema Objects.
Relational Databases and SQL The relational model and the most common SQL commands.
Chapter 2 Database System Concepts and Architecture
ORACLE SQL Developer & SQLPLUS Statements
STRUCTURED QUERY LANGUAGE
Managing Objects with Data Dictionary Views
ORACLE I 2 Salim Phone : YM : talim_bansal.
Managing Objects with Data Dictionary Views
Session - 6 Sequence - 1 SQL: The Structured Query Language:
INTRODUCTION A Database system is basically a computer based record keeping system. The collection of data, usually referred to as the database, contains.
Presentation transcript:

Oracle for Software Developers

What is a relational database? Data is represented as a set of two- dimensional tables. (rows and columns) One or more of the columns is defined as a primary key and this column or combination of columns will uniquely define the row. Tables are related by the shared column values.

What is a relational database? (continued) Operations in a relational database are processed in groups of data. The output of the operation is itself a table (or relation or result set), which can be processed further by relational operations.

Relational Tables vacioc1 vacioc2 psioc2 ioc1Test 1Bldg A ioc2Test 2Bldg A ioc3Test 3Bldg A

Oracle database Two basic concepts must be understood in order to make sense of the Oracle architecture: databases and instances. A database is a set of data as defined previously. A database instance is a set of memory structures and background processes shared by all users that access a database. You access the Oracle database through the instance.

SQL - Interface to the database SQL is a data sub-language: the purpose of SQL is to provide an interface to a relational database such as Oracle. All SQL statements are instructions to the database.

SQL*PLUS Oracle utility that allows SQL execution against an Oracle database. Useful for database administrators, software developers and end-users. Available as a client tool on the desktop or accessible at the OS command line interface for both Unix an NT.

Oracle Architecture USERS and SCHEMAS TABLE INDEX VIEW PACKAGE PACKAGE BODY PROCEDURE SEQUENCE SYNONYM TYPE

Users and Schemas User - A user account is not a physical structure in the database, but it does have important relationships to the objects in the database; users own database objects. Schema - The set of objects owned by a user account.

Tables, Columns, and Datatypes Table – The storage mechanism for data within an Oracle database that represents a set of records of the same structure, also called rows. Column - A table contains columns which are descriptive attributes and have a defined data type.

Tables, Columns, and Datatypes (continued) VARCHAR2(size) Variable-length character string having maximum length size bytes. Maximum size is NUMBER( p,s) Number having precision p and scale s. The precision p can range from 1 to 38. The scale s can range from -84 to 127. DATE Valid date range from January 1, 4712 BC to December 31, 9999 AD.

Constraints A constraint ensures that a specific condition is meet by all rows in a table. PRIMARY KEY - Specifies that column(s) are the table prime key and must have unique values. Index is automatically generated for column. NULL/NOT NULL - NOT NULL specifies that a column must have some value. NULL (default) allows NULL values in the column.

Constraints (continued) UNIQUE - Specifies that column(s) must have unique values FOREIGN KEY - Specifies that column(s) are a table foreign key and will use referential uniqueness of parent table. Index is automatically generated for column. Foreign keys allow deletion cascades and table / business rule validation.

Constraints (continued) DEFAULT - Specifies some default value if no value entered by user. DISABLE - You may suffix DISABLE to any other constraint to make Oracle ignore the constraint, the constraint will still be available to applications/tools and you can enable the constraint later if required.

Indexes An index is a database structure used to quickly find a row in a table. An index entry consists of a key value and a RowId. The key value is the value of a column or columns in a row.

Synonyms Mask the underlying complexity of the path to an object. Can be used to provide pointers for tables, views, procedures, functions, packages, and sequences.

Views A view appears to be a table containing columns and is queried in the same manner that a table is queried. Conceptually, a view can be thought of as a mask overlaying one or more tables, such that the columns in the view are found in one or more underlying tables.

User views USER_TABLES USER_TAB_COLUMNS USER_INDEXES USER_SYNONYMS USER_VIEWS USER_SEQUENCES

DDL Create table Alter table Drop table Create index Create synonym Create sequence

SQL Commands SELECT UPDATE INSERT DELETE

Data Consistency Rollback Commit Set Transaction

Connecting to the database Net8 – Oracle transparent protocol network layer.

Connecting to the database (continued) Client configuration via tnsnames.ora file. iroquoisdbprod = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (COMMUNITY = tcp.world) (PROTOCOL = TCP) (Host = IROQUOISDB) (Port = 1521) ) (CONNECT_DATA = (SID = PROD) (GLOBAL_NAME = PROD.world) )

Connecting to the database (continued) Future plans are to go to a LDAP model for SQL*NET name resolution.

Embedded SQL C/C++ - Pro*C Java – JDBC SQLJ PERL - DBI FORTRAN – Pro*Fortran OCI Oracle Tools (Developer 2000,PL/SQL) ODBC

Resources cle/sqlplus/tutorial.html cle/sqlplus/tutorial.html ain.htm ain.htm

Resources (continued) Jeff Patton (865)