1 Copyright © Oracle Corporation, 2001. All rights reserved. Writing Basic SQL SELECT Statements.
I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.
-
Upload
osborne-terry -
Category
Documents
-
view
216 -
download
1
Transcript of I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.
![Page 1: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/1.jpg)
ICopyright © Oracle Corporation, 2001. All rights reserved.
Introduction
![Page 2: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/2.jpg)
I-2 Copyright © Oracle Corporation, 2001. All rights reserved.
Objectives
After completing this lesson, you should be able to do the following:
• List the features of Oracle9i
• Discuss the theoretical and physical aspects of a relational database
• Describe the Oracle implementation of the RDBMS and ORDBMS
![Page 3: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/3.jpg)
I-3 Copyright © Oracle Corporation, 2001. All rights reserved.
Oracle9i
Scalability
Reliability
Single development
modelCommonskill sets
One management
interface
Onevendor
![Page 4: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/4.jpg)
I-4 Copyright © Oracle Corporation, 2001. All rights reserved.
Oracle9i
![Page 5: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/5.jpg)
I-5 Copyright © Oracle Corporation, 2001. All rights reserved.
Oracle9i Application Server
Business IntelligenceBusiness intelligence
Transactional AppsTransactional Apps
PortalsPortals
APACHE
IntegrationIntegration
![Page 6: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/6.jpg)
I-6 Copyright © Oracle Corporation, 2001. All rights reserved.
Oracle9i Database
MultimediaMultimedia
Object Relational DataObject Relational Data
MessagesMessages
Documents
XML
Documents
XML
![Page 7: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/7.jpg)
I-7 Copyright © Oracle Corporation, 2001. All rights reserved.
Relational and Object Relational Database Management System
• Relational model and object relational model
• User-defined data types and objects
• Fully compatible with relational database
• Support of multimedia and large objects
• High-quality database server features
![Page 8: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/8.jpg)
I-8 Copyright © Oracle Corporation, 2001. All rights reserved.
Oracle Internet Platform
ClientsS
yste
m m
anag
emen
t
Network services
DatabasesApplication
servers
Develo
pm
ent to
ols
Internet applications
Presentation andbusiness logic
Business logicand data
Any browser Any FTP clientAny mailclient
JavaJava
SQLSQLSQLSQL
PL/SQLPL/SQLPL/SQLPL/SQL
![Page 9: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/9.jpg)
I-9 Copyright © Oracle Corporation, 2001. All rights reserved.
System Development Life Cycle
Strategyand
analysisDesign
Buildand
document
Transition
Production
![Page 10: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/10.jpg)
I-11 Copyright © Oracle Corporation, 2001. All rights reserved.
Data Storage on Different Media
Electronic spreadsheet
Filing cabinet
Database
![Page 11: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/11.jpg)
I-12 Copyright © Oracle Corporation, 2001. All rights reserved.
Relational Database Concept
• Dr. E.F. Codd proposed the relational model for database systems in 1970.
• It is the basis for the relational database management system (RDBMS).
• The relational model consists of the following:
– Collection of objects or relations
– Set of operators to act on the relations
– Data integrity for accuracy and consistency
![Page 12: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/12.jpg)
I-13 Copyright © Oracle Corporation, 2001. All rights reserved.
Definition of a Relational Database
A relational database is a collection of relations or two-dimensional tables.
OracleOracleserverserver
Table Name: EMPLOYEES Table Name: DEPARTMENTS
… …
![Page 13: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/13.jpg)
I-14 Copyright © Oracle Corporation, 2001. All rights reserved.
Data Models
Model ofsystem
in client’smind
Entity model ofclient’s model
Table modelof entity model
Tables on disk
Oracleserver
![Page 14: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/14.jpg)
I-15 Copyright © Oracle Corporation, 2001. All rights reserved.
• Create an entity relationship diagram from business specifications or narratives
• Scenario– “. . . Assign one or more employees to a
department . . .”– “. . . Some departments do not yet have assigned
employees . . .”
• Create an entity relationship diagram from business specifications or narratives
• Scenario– “. . . Assign one or more employees to a
department . . .”– “. . . Some departments do not yet have assigned
employees . . .”
Entity Relationship Model
EMPLOYEEEMPLOYEE#* #* numbernumber** namenameoo job titlejob title
DEPARTMENTDEPARTMENT#* #* numbernumber** namenameoo locationlocation
assigned to
composed of
![Page 15: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/15.jpg)
I-16 Copyright © Oracle Corporation, 2001. All rights reserved.
Entity Relationship Modeling Conventions
EntitySoft boxSingular, unique nameUppercaseSynonym in parentheses
AttributeSingular nameLowercaseMandatory marked with “*”Optional marked with “o”
Unique Identifier (UID)Primary marked with “#”Secondary marked with “(#)”
EMPLOYEEEMPLOYEE#* #* numbernumber** namenameoo job titlejob title
DEPARTMENTDEPARTMENT#* #* numbernumber** namenameoo locationlocation
assigned to
composed of
![Page 16: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/16.jpg)
I-18 Copyright © Oracle Corporation, 2001. All rights reserved.
Relating Multiple Tables
• Each row of data in a table is uniquely identified by a primary key (PK).
• You can logically relate data from multiple tables using foreign keys (FK).
Table Name: EMPLOYEESTable Name: DEPARTMENTS
Primary key Primary keyForeign key
…
![Page 17: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/17.jpg)
I-19 Copyright © Oracle Corporation, 2001. All rights reserved.
Relational Database Terminology
1
23 4
5
6
![Page 18: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/18.jpg)
I-20 Copyright © Oracle Corporation, 2001. All rights reserved.
Relational Database Properties
A relational database:
• Can be accessed and modified by executing structured query language (SQL) statements
• Contains a collection of tables with no physical pointers
• Uses a set of operators
![Page 19: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/19.jpg)
I-21 Copyright © Oracle Corporation, 2001. All rights reserved.
Communicating with a RDBMS Using SQL
SELECT department_name FROM departments;
SELECT department_name FROM departments;
SQL statementis entered.
Oracleserver
Statement is sent to Oracle Server.
![Page 20: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/20.jpg)
I-22 Copyright © Oracle Corporation, 2001. All rights reserved.
Relational Database Management System
User tables Data dictionary
Oracleserver
![Page 21: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/21.jpg)
I-23 Copyright © Oracle Corporation, 2001. All rights reserved.
SQL Statements
SELECT INSERTUPDATEDELETEMERGE
CREATEALTERDROPRENAMETRUNCATE
COMMITROLLBACKSAVEPOINT
GRANTREVOKE
Data retrieval
Data manipulation language (DML)
Data definition language (DDL)
Transaction control
Data control language (DCL)
![Page 22: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/22.jpg)
I-24 Copyright © Oracle Corporation, 2001. All rights reserved.
Tables Used in the CourseEMPLOYEES
DEPARTMENTS JOB_GRADES
![Page 23: I Copyright © Oracle Corporation, 2001. All rights reserved. Introduction.](https://reader035.fdocuments.us/reader035/viewer/2022062802/56649e905503460f94b95a99/html5/thumbnails/23.jpg)
I-25 Copyright © Oracle Corporation, 2001. All rights reserved.
Summary
• The Oracle9i Server is the database for Internet computing.
• Oracle9i is based on the object relational database management system.
• Relational databases are composed of relations, managed by relational operations, and governed by data integrity constraints.
• With the Oracle Server, you can store and manage information by using the SQL language and PL/SQL engine.