Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Semestr2 / 1 - Oracle / 0-introduction(LifeCycle+DataModels+SQL+PLSQL).ppt
Скачиваний:
21
Добавлен:
12.05.2015
Размер:
424 Кб
Скачать
☆

Relatingl i Multiplel i le Tablesl

•• Each rowr off datata inin a tablet le isis uniquelyi ly identifiedi tifi by a primaryri ry key (PK)( )..

•• You can logicallyl i lly relater l te datata fromfr multiplelti le tablest l usingi foreignf r i keys (FK)( )..

Table Name: EMP

 

 

 

 

 

 

Table Name: DEPT

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

EMPNO

ENAME

 

JOB

DEPTNO

 

 

 

DEPTNO

DNAME

 

LOC

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7839

KING

 

PRESIDENT

10

 

 

 

 

 

 

 

10

ACCOUNTING

 

NEW YORK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7698

BLAKE

 

MANAGER

30

 

 

 

 

 

20

RESEARCH

 

DALLAS

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7782

CLARK

 

MANAGER

10

 

 

 

 

 

30

SALES

 

CHICAGO

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7566

JONES

 

MANAGER

20

 

 

 

 

 

40

OPERATIONS

 

BOSTON

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Primary key

Foreign key

Primary key

I-13

Relationall i l Database Propertiesi

A relational database

•• Can be accessed and modifiedifi by executingti structuredtr t r queryry languagel (SQL)( ) statementst t ts

•• Containst i a collectionll ti off tablest l withith no physicali l pointersi t rs

•• Uses a sett off operatorsr t rs

I-14

Communicatingi i withi a RDBMS Usingi SQL

SQL statement is entered

SQL> SELECT loc

2 FROM dept;

Data is displayed

LOC

-------------

NEW YORK DALLAS CHICAGO BOSTON

Statement is sent to database

Database

I-15

Relationall i l Database

Management System

Server

User tables

 

Data

 

 

 

 

 

 

 

dictionary

 

 

I-16

Oracle8:l Objectj Relationall i l

Database Management System

•• Userr--definedfi datata typest and objectsj ts

•• Fullylly relationalr l ti l compatibleti le

•• Supportrt off multimedialti ia and largel r objectsj ts

•• Highi --qualitylity databaset serverr r featuresf t r

I-17

Definingi i an Objectj

An object

•• IsIs a person,r , place,l , orr thingt i

•• Knows thingst i aboutt itselfit lf and performsrf r actionsti

•• Has an identityi tity

I am a clock. I know my time zone, and I can display time.

I-18

Usingi an Objectj Modell

•• Objectsj ts modell a problemr l toto solvel ..

•• The modell isis statedt t inin termst r off thet interactionsi t r ti betweent objectsj ts..

•• Objectj t modelsls closelyl ly resembler le thet realr l worldrld..

Buy

Sell

Customers

Business

I-19

Characteristicsi i of Objectj systems

•• Presentr t informationi f r ti inin objectj t formf rm

•• Classifyl ify objectsj ts intoi to objectj t typest

•• InheritI rit attributesttri t and code

•• Hidei data,t , code,, and attributesttri t

•• InteractI t r t withith othert r objectsj ts

•• Recognizei differentiff r t objectsj ts withoutit t analysisl is

•• InterpretI t r r t thet same command inin differentiff r t ways

I-20

Oraclele Completel Solutionl i

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Applications

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Applications

 

 

 

 

 

Developer 2000

 

 

 

 

 

 

HR

 

 

 

 

 

Developer 2000

 

 

 

 

 

 

HR

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Financials

 

 

 

 

 

 

 

 

 

Discoverer

 

 

Financials

 

 

 

 

 

 

 

 

 

Discoverer

 

 

Manufacturing

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Manufacturing

 

 

 

 

 

Designer 2000

 

 

 

 

 

 

 

 

 

 

 

 

 

 

...

 

 

 

 

 

Designer 2000

 

 

 

 

 

 

...

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SQL

S L

PL/SQL

PL/S L

SQL*SQL*PlusPlus

Oracle7/8

Database

 

 

Data

 

 

 

dictionary

 

 

 

 

 

 

 

 

Data tables

 

 

 

 

 

 

 

 

I-21

SQL Statements

SELECT

Data retrieval

INSERT

Data manipulation language (DML)

UPDATE

DELETE

 

CREATE

 

ALTER

Data definition language (DDL)

DROP

RENAME

 

TRUNCATE

 

COMMIT

Transaction control

ROLLBACK

 

SAVEPOINT

 

GRANT

Data control language (DCL)

REVOKE

 

I-22

Соседние файлы в папке 1 - Oracle