210 likes | 340 Views
Homework Help On Oracle, Need Homework, assignment help in database contact urgenthomework.com.
E N D
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).
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.
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.
Developer Tools • Oracle Forms Developer • Oracle Reports Developer • Oracle Jdeveloper • Oracle Designer • OEPE , Oracle Enterprise Pack for Eclipse.
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)
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
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.
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
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;
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
STUDENT COURSE TAKES
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}
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));
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]
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);
Data Retrieval: SELECT [DISTINCT | ALL] {table|view} FROM{table | view} [WHERE condition ] [GROUPBY expr [, expr]] [ORDERBY {expr} [ASC | DESC]]
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;
Transaction Control: COMMIT ROLLBACK[ to {savepoint}] SAVEPOINT{name} commit; savepointpoint5; rollback to point5;
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;
For Further Informatiom: • Read more about oracle Database: http://www.urgenthomework.com/oracle-10g-and-11g.php