Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright  Oracle Corporation, 1999. All rights reserved. I Introduction.

Similar presentations


Presentation on theme: "Copyright  Oracle Corporation, 1999. All rights reserved. I Introduction."— Presentation transcript:

1 Copyright  Oracle Corporation, 1999. All rights reserved. I Introduction

2 I-2 Copyright  Oracle Corporation, 1999. All rights reserved. Objectives After completing this lesson, you should be able to do the following: List the features of Oracle 11g. Discuss the theoretical and physical aspects of a relational database. Describe the Oracle implementation of the RDBMS and ORDBMS. Understand the goals of the course. After completing this lesson, you should be able to do the following: List the features of Oracle 11g. Discuss the theoretical and physical aspects of a relational database. Describe the Oracle implementation of the RDBMS and ORDBMS. Understand the goals of the course.

3 I-3 Copyright  Oracle Corporation, 1999. All rights reserved. Goals of the Course After completing this course, you should be able to do the following: Retrieve row and column data from tables with the SELECT statement.Retrieve row and column data from tables with the SELECT statement. Create reports of sorted and restricted data.Create reports of sorted and restricted data. Employ SQL functions to generate and retrieve customized data.Employ SQL functions to generate and retrieve customized data. Run data manipulation language (DML) statement to update data in Oracle.Run data manipulation language (DML) statement to update data in Oracle. Obtain metadata by querying the dictionary views.Obtain metadata by querying the dictionary views. After completing this course, you should be able to do the following: Retrieve row and column data from tables with the SELECT statement.Retrieve row and column data from tables with the SELECT statement. Create reports of sorted and restricted data.Create reports of sorted and restricted data. Employ SQL functions to generate and retrieve customized data.Employ SQL functions to generate and retrieve customized data. Run data manipulation language (DML) statement to update data in Oracle.Run data manipulation language (DML) statement to update data in Oracle. Obtain metadata by querying the dictionary views.Obtain metadata by querying the dictionary views.

4 I-4 Copyright  Oracle Corporation, 1999. All rights reserved. Relational and Object Relational Database Management Systems Relational model and object relationalRelational model and object relational model, both supported by Oracle. model, both supported by Oracle. User-defined data types and objects.User-defined data types and objects. Fully compatible with relational databaseFully compatible with relational database Support of multimedia and large objectsSupport of multimedia and large objects High-quality database server features.High-quality database server features. Relational model and object relationalRelational model and object relational model, both supported by Oracle. model, both supported by Oracle. User-defined data types and objects.User-defined data types and objects. Fully compatible with relational databaseFully compatible with relational database Support of multimedia and large objectsSupport of multimedia and large objects High-quality database server features.High-quality database server features.

5 I-5 Copyright  Oracle Corporation, 1999. All rights reserved. System Development Life Cycle StrategyandAnalysis Design BuildandDocument Transition Production

6 I-6 Copyright  Oracle Corporation, 1999. All rights reserved. Data Storage on Different Media Electronic spreadsheet Filing cabinet Database SALGRADE SALGRADE GRADE LOSAL HISAL --------- --------- --------- 1 700 1200 2 1201 1400 3 1401 2000 4 2001 3000 5 3001 9999 SALGRADE SALGRADE GRADE LOSAL HISAL --------- --------- --------- 1 700 1200 2 1201 1400 3 1401 2000 4 2001 3000 5 3001 9999 DEPT DEPTNO DNAME LOC --------- -------------- ---------- 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON DEPT DEPTNO DNAME LOC --------- -------------- ---------- 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON

7 I-7 Copyright  Oracle Corporation, 1999. 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 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

8 I-8 Copyright  Oracle Corporation, 1999. All rights reserved. Definition of a Relational Database A relational database is a collection of relations or two-dimensional tables. Database EMPNO ENAME JOB DEPTNO 7839 KING PRESIDENT 10 7698 BLAKE MANAGER 30 7782 CLARK MANAGER 10 7566 JONES MANAGER 20 EMPNO ENAME JOB DEPTNO 7839 KING PRESIDENT 10 7698 BLAKE MANAGER 30 7782 CLARK MANAGER 10 7566 JONES MANAGER 20 Table Name: EMPLOYEES DEPTNO DNAME LOC 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON DEPTNO DNAME LOC 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON Table Name: DEPARTMENTS

9 I-9 Copyright  Oracle Corporation, 1999. All rights reserved. Data Models Model of system in client’s mind Entity model of client’s model Table model of entity model Tables on disk Server

10 I-10 Copyright  Oracle Corporation, 1999. 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 EMPLOYEE #* number *name ojob title EMPLOYEE #* number *name ojob title DEPARTMENT #* number *name olocation DEPARTMENT #* number *name olocation assigned to composed of

11 I-11 Copyright  Oracle Corporation, 1999. All rights reserved. Entity Relationship Modeling Conventions Entity Soft box Singular, unique name Uppercase Synonym in parentheses Attribute Singular name Lowercase Mandatory marked with “*” Optional marked with “o” Unique Identifier (UID) Primary marked with “#” Secondary marked with “(#)” EMPLOYEE #* number *name ojob title EMPLOYEE #* number *name ojob title DEPARTMENT #* number *name olocation DEPARTMENT #* number *name olocation assigned to composed of

12 I-12 Copyright  Oracle Corporation, 1999. All rights reserved. Entity Relationship Modeling Conventions Entity Soft box Singular, unique name Uppercase Synonym in parentheses Attribute Singular name Lowercase Mandatory marked with “*” Optional marked with “o” Unique Identifier (UID) Primary marked with “#” Secondary marked with “(#)” EMPLOYEE #* number *name ojob title EMPLOYEE #* number *name ojob title DEPARTMENT #* number *name olocation DEPARTMENT #* number *name olocation assigned to composed of

13 I-13 Copyright  Oracle Corporation, 1999. All rights reserved. Relational Database Terminology 1 234 5 EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ------------- --------------------------------- -------- ---------------- ----------- -------------- ----------- 7839 KING PRESIDENT 17-NOV-815000 10 7698 BLAKEMANAGER 7839 01-MAY-81 2850 30 7782 CLARK MANAGER7839 09-JUN-81 2450 10 7566 JONES MANAGER7839 02-APR-81 2975 20 7654 MARTINSALESMAN 7698 28-SEP-81 1250 1400 30 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30 7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30 7900 JAMES CLERK 7698 03-DEC-81 950 30 7521 WARDSALESMAN 7698 22-FEB-81 1250 500 30 7902 FORDANALYST 7566 03-DEC-81 3000 20 7369 SMITH CLERK 7902 17-DEC-80 800 20 7788 SCOTTANALYST 7566 09-DEC-82 3000 20 7876 ADAMS CLERK 7788 12-JAN-83 1100 20 7934 MILLER CLERK 7782 23-JAN-82 1300 10 6

14 I-14 Copyright  Oracle Corporation, 1999. All rights reserved. Relating Multiple Tables Each row of data in a table is uniquely identified by a primary key (PK). Table Name: EMP Table Name: DEPT Primary key You can logically relate data from multiple tables using foreign keys (FK). Foreign key EMPNO ENAME JOB DEPTNO 7839 KING PRESIDENT 10 7698 BLAKE MANAGER 30 7782 CLARK MANAGER 10 7566 JONES MANAGER 20 DEPTNO DNAME LOC 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON

15 I-15 Copyright  Oracle Corporation, 1999. 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 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

16 I-16 Copyright  Oracle Corporation, 1999. All rights reserved. Communicating with a RDBMS Using SQL SQL> SELECT loc 2 FROM dept; SQL> SELECT loc 2 FROM dept; SQL statement is entered Database Statement is sent to database LOC ------------- NEW YORK DALLAS CHICAGO BOSTON LOC ------------- NEW YORK DALLAS CHICAGO BOSTON Data is displayed

17 I-17 Copyright  Oracle Corporation, 1999. All rights reserved. Relational Database Management System User tables Datadictionary Server

18 I-18 Copyright  Oracle Corporation, 1999. All rights reserved. Oracle Internet Platform Clients System management Network services Databases Application servers Development tools Internet applications Presentation and business logic Business logic and data Any browser Any FTP client Any mail client Java SQLSQL PL/SQLPL/SQL

19 I-19 Copyright  Oracle Corporation, 1999. All rights reserved. SQL Statements SELECT INSERTUPDATEDELETECREATEALTERDROPRENAMETRUNCATECOMMITROLLBACKSAVEPOINTGRANTREVOKESELECT INSERTUPDATEDELETECREATEALTERDROPRENAMETRUNCATECOMMITROLLBACKSAVEPOINTGRANTREVOKE Data manipulation language (DML) Data definition language (DDL) Transaction control Data control language (DCL)

20 I-20 Copyright  Oracle Corporation, 1999. All rights reserved. Tables Used in the Course EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO --------- ---------- --------- --------- --------- --------- --------- --------- 7839 KING PRESIDENT 17-NOV-81 5000 10 7698 BLAKE MANAGER 7839 01-MAY-81 2850 30 7782 CLARK MANAGER 7839 09-JUN-81 2450 10 7566 JONES MANAGER 7839 02-APR-81 2975 20 7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30 7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30 7900 JAMES CLERK 7698 03-DEC-81 950 30 7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30 7902 FORD ANALYST 7566 03-DEC-81 3000 20 7369 SMITH CLERK 7902 17-DEC-80 800 20 7788 SCOTT ANALYST 7566 09-DEC-82 3000 20 7876 ADAMS CLERK 7788 12-JAN-83 1100 20 7934 MILLER CLERK 7782 23-JAN-82 1300 10 EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO --------- ---------- --------- --------- --------- --------- --------- --------- 7839 KING PRESIDENT 17-NOV-81 5000 10 7698 BLAKE MANAGER 7839 01-MAY-81 2850 30 7782 CLARK MANAGER 7839 09-JUN-81 2450 10 7566 JONES MANAGER 7839 02-APR-81 2975 20 7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30 7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30 7900 JAMES CLERK 7698 03-DEC-81 950 30 7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30 7902 FORD ANALYST 7566 03-DEC-81 3000 20 7369 SMITH CLERK 7902 17-DEC-80 800 20 7788 SCOTT ANALYST 7566 09-DEC-82 3000 20 7876 ADAMS CLERK 7788 12-JAN-83 1100 20 7934 MILLER CLERK 7782 23-JAN-82 1300 10 EMPLOYEES DEPARTMENTS DEPTNO DNAME LOC --------- -------------- ---------- 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON DEPTNO DNAME LOC --------- -------------- ---------- 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON GRADE LOSAL HISAL --------- --------- --------- 1 700 1200 2 1201 1400 3 1401 2000 4 2001 3000 5 3001 9999 GRADE LOSAL HISAL --------- --------- --------- 1 700 1200 2 1201 1400 3 1401 2000 4 2001 3000 5 3001 9999 JOB_GRADES

21 I-21 Copyright  Oracle Corporation, 1999. All rights reserved. Summary The database 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. The Oracle Server allows you to store and manage information by using the SQL language and PL/SQL engine. The database 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. The Oracle Server allows you to store and manage information by using the SQL language and PL/SQL engine.


Download ppt "Copyright  Oracle Corporation, 1999. All rights reserved. I Introduction."

Similar presentations


Ads by Google