1 / 21

Homework Help On Oracle

Homework Help On Oracle, Need Homework, assignment help in database contact urgenthomework.com.

Download Presentation

Homework Help On Oracle

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Homework Help On Oracle

  2. What is Oracle ? • Oracle is a name of a organization which has developed many software, Operating Systems and Databases. • Here we are going to discuss about Oracle Database or Oracle DB. • Oracle database is a relational database management system in which data are treated as a unit. It is the most trusted and widely-used relational database engines. • The system of oracle database is built around a relational database framework in which data objects may be directly accessed by users through SQL (Structured Query Language).

  3. History of Oracle • 1979 Oracle Release 2 • 1986 client/server relational database • 1989 Oracle 6 • 1997 Oracle 8 (object relational) • 1999 Oracle 8i (Java Virtual Machine) • 2000 Oracle Application Server • 2001 Oracle 9i database server • 2004: Oracle 10g is released (the g stands for Grid). • 2007: Oracle 11g is released. • 2013: Oracle 12C is released which is capable of providing cloud services with Oracle Database.

  4. Oracle Family • Personal Oracle- for single users. Used to develop systems • Oracle Standard Edition- (Entry level Workgroup server) • Oracle Enterprise edition- Extended functionality • Oracle Lite- (Oracle mobile) single users using wireless devices.

  5. Developer Tools • Oracle Forms Developer • Oracle Reports Developer • Oracle Jdeveloper • Oracle Designer • OEPE , Oracle Enterprise Pack for Eclipse.

  6. Redo Log Buffer Shared SQL Area Database Buffer Cashe Server Data File Raw Device USER Oracle Architecture D000 SMON RECO S000 PMON P000 * Total SGA Size : 1700 Mbyte * Fixed Size : SGA 70 Kbyte * Variavle Size : 490 MByte TL-812 4,000,000 KByte KByte KByte KByte KByte 2,100 1,200,000 CKPT LGWR DBW0 ARCH Archive Log Mode(50M)

  7. Shared SQL Area PL/SQL Procedures and Package Control Structures for examples; Locks Library Cache handles and so on ... Memory Structure : Shared Pool Shared Pool Shared Pool Contents - Text of the SQL or PL/SQL statement - Parsed form of the SQL or PL/SQL statement - Execution plan for the SQL or PL/SQL statements - Data dictionary cache containing rows of data dictionary information Library Cache - shared SQL area - private SQL area - PL/SQL procedures and package - control structures : lock and library cache handles Dictionary Cache - names of all tables and views in the database - names and datatypes of columns in database tables - privileges of all Oracle users SHARED_POOL_SIZE Dictionary Cache Library Cache Control Structures for example: Character Set Conversion Memory Network Security Attributes and so on .. Reusable Runtime Memory

  8. TableSpaces • A database is divided into logical storage units called Tablespaces. • logical construct for arranging different types of data. • An Oracle database must have at least a system tablespace. • It is recommended to have different tablespaces for user and system data.

  9. Tablespaces • a logical structure Data1 Data2 Data1_01.dbf Data2_01.dbf Data2_02.dbf The DATA1 Tablespace = One datafile The DATA2 Tablespace = Two datafiles

  10. Create Tablespace CREATE TABLESPACE test DATAFILE '\oraserv\ORADATA\a.dbf' SIZE 10M AUTOEXTEND ON NEXT 10M MAXSIZE 100M; CREATE TABLE cust(id int,name varchar2(20)) TABLESPACE test;

  11. SQL(Structured Query Language) • SQL is a standard language for accessing databases. • Both an ANSI and ISO standard • Types of commands: • Data Definition Language (DDL) : Create, Alter, Drop, Rename, Truncate • Data Manipulation Language (DML): Insert, Delete, Update • Data Retrieval: Select • Transaction Control: Commit, Rollback, Savepoint • Data Control Language (DCL): Grant, Revoke

  12. STUDENT COURSE TAKES

  13. Data Definition Language: CREATE TABLE{table} ( {column datatype [DEFAULT expr] [column_constraint] ... | table_constraint} [, { column datatype [DEFAULT expr] [column_constraint] ... ) ALTER TABLE {table} [ADD|MODIFY {column datatype [DEFAULT expr] [column_constraint]} [DROPdrop_clause] DROP TABLE {table} [cascade constraints] DESC{table}

  14. Example : CREATE TABLE Students (sid INTEGER, name VARCHAR(20), age INTEGER); CREATE TABLE Courses ( courseid CHAR(6), department CHAR(20)); CREATE TABLE takes ( sid CHAR(9), courseid CHAR(6));

  15. Data Manipulation Language: INSERT INTO {table | view} [ (column [, column] ...) ] VALUES (expr,expr ...) UPDATE {table | view } SET { (column [, column] = { expr | } [WHERE condition] DELETE [FROM] {table | view} [WHERE condition]

  16. Example: • INSERT INTO Students VALUES (10,’Mark’,18); • INSERT INTO Students VALUES (20,’smith’,22); • INSERT INTO Students VALUES (30,’John’,19); • INSERT INTO Students VALUES (40,’Lee’,21);

  17. Data Retrieval: SELECT [DISTINCT | ALL] {table|view} FROM{table | view} [WHERE condition ] [GROUPBY expr [, expr]] [ORDERBY {expr} [ASC | DESC]]

  18. Example: select * from student; select name from student where sid='10'; select courseid from course where department=‘computer’; Select a.sid from takes a, student b where a.sid=b.sid;

  19. Transaction Control: COMMIT ROLLBACK[ to {savepoint}] SAVEPOINT{name} commit; savepointpoint5; rollback to point5;

  20. Data Control Language: GRANT[privileges] ONobject TOuser|public [WITHGRANTOPTION] REVOKE[privileges] ONobject TOuser|public [CASCADECONSTRAINTS] grant select,updateon student to XYZ ; revoke update on student to XYZ;

  21. For Further Informatiom: • Read more about oracle Database: http://www.urgenthomework.com/oracle-10g-and-11g.php

More Related