O R A C L E A C A D E M Y

Size: px
Start display at page:

Download "O R A C L E A C A D E M Y"

Transcription

1 Kenneth Mix Oracle SQL and PL/SQL notes : Passaic County Technical Institute Computer Science and Web Design National Academy Foundation Academy of Information Technology Kenneth Mix PCTI 2015 / 2016 SQL - and PL/SQL O R A C L E A C A D E M Y 1

2 Data - Data Model - ENTITY - Instance - Attribute - Relationship - Collection of facts. Identify and Organize data How data relates Conceptual Model- Idea -- blueprint Physical Model Implementation -- actual entity A named thing with known data Entities have Instances Entities have Attributes An occurrence of an Entity Describe an Entity # UNIQUE * Required Optional Association between Entities Types of Databases - Heirarchial Network Relational Business Rule - Structural Rule - Historical data - Specific Behavior of the business Types of data and their relationships Data over time Audit Trail Attributes may change UID Unique Identifier - the value that enables the user to identify an entity Simple ID - 1 Attribute Dept #code *name Artificial ID - Not real world Just to keep entities unique Social Security Number Composite ID - Made up of several parts #id #name Secondary ID - In addition to UID Allows alternative access #... # (#).. (#1). (#2). 2

3 Mutually Exclusive - Exclusive XOR If one, then NOT the other A or B, NOT BOTH One advertisement at a time. ARC EVEN T HOME Public Volatile - Mandatory - NULL - May change Required optional SORTING ASC ascending DESC descending ORDER BY Numeric Date Char NULL NULL, char, date, numeric Must be LAST clause! Can sort by ALIAS or # 3

4 Entity Relationship Diagram Capture Information NO redundant data NO derivable data ENTITY Optionality Cardinality (how many) MUST BE MAY BE ONE ONE or MORE relationship ATTRIBUTES # Unique * Required optional ERDISH EACH ENTITY A Optionality Relationship Name Cardinality ENTITY B Relationships : 1:1 Rare Common Common 1:M Rare Rare Common Common M:M Rare Common Must Resolve Common 4

5 INTERSECTION ENTITY Eliminates M:M Keep original relationships! Borrowed attribute No attribute required Hierarchical Relationship Organizational chart Family tree EMPLOYER MANAGER #emp_id #mgr_id #dir_id #mgr_id #dir_id DIRECTOR #dir_id Recursive Relationship - Between the Entity and itself EMPLOYEE #number *name *job salary bonus NOT USED OFTEN except for EMPLOYEE managed by manager of Transferability -- Cannot change! 5

6 NORMALIZATION - remove redundant data and gain efficiency 1NF 2NF 3NF eliminates repeating groups place each in a new table with a 1:M relationship. NO multi-valued attributes. eliminates dependencies on a partial key place in another table Put data in best place. eliminates dependencies on non-key fields place in another table (All non-key fields are now dependent on the key!) 2NF - TAPE MOVIE #t_num #m_id VIOLATION of 2NF! *format *title *rating *category TAPE MOVIE #t_num #m-id 2NF OK #m_id *title *format *category The m_id is borrowed *rating from MOVIE 3NF CITY #c_id *name *size *pop CITY STATE *mayor #c_id #s_id *state *name *name *flower *size *flower *pop *mayor Now in 3NF!! All attributes are now dependent on the whole key. 6

7 SDLC System Development Life Cycle Process of developing system from start to finish Relational Databases Tables can be related by a common field More than 1 table Table - Column - Primary Key - Foreign Key - Row - Field - basic storage structure with rows and columns one kind of data in a table UID for each row column that refers to a primary-key column in another table data for one table instance intersection of row and column 6 Properties : 1- entries in columns are single valued 2- entries in columns are same kind 3- each row is unique 4- column sequences is insignificant 5- row sequence is insignificant 6- each column has own names RDBMS relational data base management system Organizing data into row and columns SQL structured query language used to access data SQL Database Request processed 7

8 DML Data Manipulation Language Change the contents of a table Insert - add new row INSERT INTO table1(c1, c2, c3, c4) VALUES(123, abc,sysdate, ); Update - modify existing row UPDATE table1 SET a = b WHERE c = d if no WHERE then ALL rows updated Delete - remove existing row DELETE FROM table1 WHERE x = y; if no WHERE then ALL rows! Merge - SELECT - insert or update extract data MERGE conditionally update or insert MERGE INTO T1 USING T2 ON(C1 = V1) WHEN MATCHED THEN UPDATE SET C1 = V1 WHERE C2 = V2 WHEN NOT MATCHED THEN INSERT (C1, C2) VALUES(123, abc ); 8

9 DDL Data Definition Language define or delete db objects Create - Alter - create new table or index change structure of existing table Add / change / delect cols and constraints ALTER TABLE T1 ADD cols MODIFY cols RENAME col old to new DROP cols Constraints : DROP ENABLE DISABLE OUT OF LINE Constraint IN-LINE Constraint in column definition **USE constraint names so you can find to enable, disable or drop! Drop - Privileges required to drop NO Rollback Recycle Bin PURGE to empty DROP T1; Rename - change name of table RENAME old TO new; Truncate - deletes all rows from a table Indexes and privileges are SAVED! TRUNC T1; DROP STORAGE REUSE STORAGE 9

10 TCL Transaction Control Language All DML changes are PENDING and not available to users Close transactions Commit - KEEP IT Rollback - CANCEL IT Savepoint - interim points to rollback to LOCKING : row level released at commit! READERS Select WRITERS - Insert, Update, Delete AUTO COMMIT in PL/SQL SET AUTO COMMIT ON/OFF SHOW AUTO COMMIT DCL Data Control Language used to give or remove access rights to a database. Grant Revoke - give system privileges take away privileges ALIAS - change column name SELECT fn AS First, ln AS Last FROM table1; FIRST Last AS is optional DISTINCT returns one of each In alphabetical order Must follow SELECT DESCRIBE DESC Concatination - describes structure of a table connect strings with same data type SELECT fn x ln FROM table1; JohnxSmith 10

11 SQL RDBMS STATEMENT CLAUSE - Structured Query Language Interactive see results Embedded in a program Is NOT case sensitive SELECT and FROM required 2 or more clauses relational data base management system a set of 2 or more clauses part of an SQL statement TYPES OF SQL CALLS : Projection - Selection - Join - columns rows 2 or more tables Precedence Order of operations () 2 */+- Concatination IN( ) = comparison NOT IN( ) LIKE %_ NULL LIKE IN IS NULL BETWEEN AND IS NOT NULL BETWEEN AND NOT NOT BETWEEN AND AND OR SQL FORMAT SELECT * FROM table1; statement CLAUSE semi-colon KEYWORD 11

12 WHERE - restricts information Comparison operators : = <> < <= > >=!= ^= LOGICAL OPERATORS : AND both OR one of NOT none SELECT * FORM table1 WHERE age > 45; WHERE literal text -or- 53 numeric BETWEEN AND - a range WHERE age BETWEEN 45 AND 49; IN - membership condition A LIST WHERE type_code IN (77, 33, 56); LIKE - character pattern Wildcards % any sequence _ 1 single character WHERE ln LIKE _i% ; Mix Minkus Escape Option \ LIKE TRA\_% ; finds TRA_84 TRA_34 12

13 DUAL table - Case Functions : LOWER( s1 ) UPPER( s1 ) - INITCAP( s1 ) - one row one column To select with no table SELECT (5 * 4) FROM DUAL; convert to lower case convert to upper case convert first character (for names) SELECT fn FROM empl WHERE LOWER(fn) = John ; Character Functions : LENGTH( s1 ) INSTR( s1, c ) SUBSTR( s1, start, len) TRIM( c FROM s1 ) CONCAT( s1, s2 ) REPLACE( s1, old, new ) RPAD( s1, tot-len, s2 ) LPAD( s1, tot-len, s2 ) returns length of string returns position of x extracts specific string removes leading, trailing characters joins two strings replaces a sequence of pads right side pads left side Number Functions : ROUND(val, num) TRUNC(val, num) MOD(x, y) rounds numbers terminates a string NO rounding returns remainder Date Functions : dd 01-JAN-99 MONTHS_BETWEEN(SYSDATE, dd ) ADD_MONTHS( dd, n) NEXT_DAY( dd, Saturday ) LAST_DAY( dd ) ROUND(TO_DATE( dd ), year ) TRUNC(TO_DATE( dd ), month ) number of months between adds months to date gets the next day gets last day of month rounds to nearest year truncates to current month Date format DD-MON-YY SYSDATE returns database date and time SELECT SYSDATE FROM DUAL; SYSDATE + 1 add 1 day SYSDATE + 1 / 24 add 1 hour SYSDATE + 1/(24*60) add 1 munute 13

14 DATA TYPES : NUMBER FORMATS : DATE FORMATS : VARCHAR2(n) variable length CHAR fixed length -- 1 character NUMBER(p,s) numbers and currency DATE date and time 9 Numbers 0 leading zeroes $ currency L currency. decimal, comma xmi 56 - xpr ( ) on minus EEEE scientific notation V 99V99 10n B zero is blank YYYY 2005 YY 05 RRRR 2005 YEAR spelled out MM 06 MONTH JUNE MON JUN DD 23 DY FRI DAY FRIDAY HH hour MI minute SS second DDspth THIRD Ddspth Third ddspth third SYSDATE types INTERVAL DAY TO SECOND INTERVAL YEAR TO MONTH TIMESTAMP TIMESTAMP WITH TIMEZONE TIMESTAMP WITL LOCAL TIMEZONE EXTRACT EXTRACT(year FROM dd) 14

15 ORACLE AUTOMATIC CONVERSION: TO_CHAR(num, format ) Varchar2 Numeric TO_NUMBER() Varchar2 Date TO_DATE() Numeric Varchar2 TO_CHAR() Date Varchar2 TO_CHAR() TO_CHAR( , $9, ) $1, TO_NUMBER(s1, format ) TO_DATE(s1, format ) TO_NUMBER(1234, 9,999 ) TO_DATE(s1, date format ) use RR YYYY Current year just applied! RRRR - If Current current BEFORE AFTER current fx format explicit varchar2 to date extra blanks are ignored fxmon DD, RRRR 15

16 NULL FUNCTIONS : NVL(v1, v2) returns v2 if NULL NVL2(v1, if not NULL, if NULL) NULLIF(v1, v2) returns NULL if equal COALESCE(v1, v2, v3.) moves until NOT NULL SELECT NVL(field1, 123) FROM tab1; Returns 123 if field1 is NULL Cartesian Product - Join but NO WHERE Clause! Invalid All rows returned! 16

17 GROUP FUNCTIONS() 1 value returned per set use DSTINCT to eliminate duplicates NOT in WHERE Clause NULL is ignored (except count()) Avg() Count() Max() Min() STDDEV() SUM() VARIANCE() SELECT COUNT(last_name) FROM table1; SELECT Ln FROM T1 WHERE SALARY > (SELECT AVG(SALARY) FROM T1); GROUP BY HAVING GROUP BY - HAVING - SELECT fn, ln, AVG(sal) d FROM t1 WHERE age = 55 GROUP BY fn, ln; Control break NO alias Must List ALL columns NOT in a group() restricts rows Should have a group function() 1 SELECT 2 FROM 3 WHERE 4 GROUP BY 5 HAVING 6 ORDER BY ALL NON FUNCTION() columns must be listed here! 17

18 JOINS Oracle ANSI - Join in WHERE Clause Join in FROM Clause LEFT 1 st table RIGHT 2 nd table ORACLE ANSI Equijoin Join ON Join USING ---- NATURAL LOJ LOJ ROJ ROJ Cartesian P ---- CROSS Self TABLE NAMING RULES Start with alpha Max length = 30 Alphanumeric _ $ # 18

19 Types of joins ORACLE Equijoin Inner Simple All ROWS that match Comparison operators SELECT a.c1, b.c1 FROM T1 a, T2 b WHERE a.c1 = b.c1; Outer All rows that match PLUS rows that do not match from 1 table Place (+) on OPPOSITE side of table you want to get all data from. SELECT a.c1, b.c1 FROM T1 a, T2 b WHERE a.c1= b.c1(+) LEFT JOIN (right side)! Place (+) on OPPOSITE side of table that you want to get all rows from! Self one table Alias create different tables Recursive! SELECT a.c1, b.c1 FROM T1 a, T1 b WHERE a.c1 = b.c1; Non_Equijoin No matching columns NO Comparison operators Ranges cause joins SELECT a.c1, b.c1 FROM T1 a, T2 b WHERE a.c1 BETWEEN b.c1 AND b.c2; Cartesian Product No WHERE Clause Invalid Every combination Yearly reports 19

20 ANSI Natural Inner Joins all matching columns NO Alias NO WHERE SELECT C1, C2 FROM T1 NATURAL JOIN T2 ; Outer JOIN ON LEFT FULL RIGHT Matched rows and unmatched rows NULLS included SELECT a.c1, b.c1 FROM T1 a LEFT OUTER JOIN T2 b ON a.c1 = b.c1 WHERE Like an EQUIJOIN Joins on named columns Columns with different names (allows WHERE Clause to further filter) SELECT a.c1, b.c1 FROM T1 a JOIN T2 b ON a.c1 = b.c1 WHERE.. JOIN USING similar to NATURAL JOIN NO ALIAS REQUIRED Joins on one set of matching columns Different data types CROSS Cartesian Product! SELECT C1 FROM T1 a JOIN T2 b USING (C1) WHERE SELECT a.c1, b.c2 FROM T1 a CROSS JOIN T2 b; 20

21 INSERT Inserts new row into a table. TABLE Column Value INSERT INTO t1(c1,c2, c3, c4, c5) VALUES (123, abc,null, DEFAULT, SYSDATE); INSERT INTO table1(id, fn, ln, sa) VALUES (123, John, Smith, 123 Main ); explicit INSERT INTO table1 implicit! VALUES (123, John, Smith, 123 Main ); do not use! Use for missing data! Columns can be skipped if they accept NULL! UPDATE Updates an existing row. UPDATE t1 SET c1 = v1 WHERE c2 = v2 ; With a subquery : UPDATE t1 SET = (SELECT field1 FROM t2 WHERE id = 99); WHERE id = 88; DELETE Cannot delete row if primary key is used as foreign key in another table. DELETE FROM t1 WHERE c1 = v1; 21

22 CREATE and copy to new table : CREATE TABLE new_t1 AS (SELECT * FROM old_t2); CREATE NEW TABLE : creates a new table CREATE TABLE t1 ( var1 d_type, var2 d_type PRIMARY KEY, var3 d_type DEFAULT val1, var4 d_type DEFAULT val1 CONSTRAINT con_1 NOT NULL, var5 d_type DEFAULT val2 CONSTRAINT con_2 CHECK(var5 > 0), var6 DATE DEFALUT SYSDATE, val7 NUMBER(3), val8 NUMBER(6,2), CONSTRAINT con_4 PRIMARY KEY(var1), CONSTRAINT con_5 FOREIGN KEY(var7) REFERENCES TBL2(tbl2) ); DEFAULTS : b Null is default bb blank NULL 0.00 SYSDATE (5 * 4) abc CONSTRAINTS : rules NULL NOT NULL UNIQUE PK FOREIGN KEY ( v) REFERENCES table2(col2) referential integrity PARENT reference FK CHILD has FK Needs parent first! CHECK - rules on columns MUST be True or NULL Only for this row CHECK(id Between 5 and 10) CHECK(Fn IN( Joe, Sue )) No queries No functions 22

23 ON DELETE CASCADE - all dependent rows deleted too! Must be used OR parent rows cannot c1 d-type() CONSTRAINTS c-name REFERENCES other_t1(id) ON DELETE CASCADE CONSTRAINT c_name FOREIGN_KEY(id) REFERENCES other_t1(id) ON DELETE CASCADE ON DELETE SET NULLS - delete parent-table rows without deleting child- table rows. 23

24 DECIMAL / NUMBER DECIMAL(P,S) Precision = total length Scale = decimal positions (9,4) 9 4 = 5 There are 5 integers plus 4 integers rounding occurs if too many decimal digits PROCEDURE FUNCTION TRANSACTION TABLESPACE SYSTEM TABLESPACE - PACKAGE GREATEST - LEAST - set of tasks with no return set of tasks with a return a unit of 1 + SQL Statements where tables reside contains oracle data dictionary holds both procedures and functions returns highest (v1, v2, v3 ) returns least (v1, v2, v3 ) DECODE (oracle) (x, a1, b1, a2, b2.) if x = a1 then b1 else if x = a2 then b2 24

25 VIEW Make access eassy Stored SQL statements No table End-user security CREATE VIEW v1 AS SELECT * FROM T1; CREATE OR REPLACE VIEW v1 AS SELECT * FROM T1; create new view create or modify existing FORCE - NO FORCE - WITH CHECK OPTION WITH READ ONLY - DROP - SIMPLE - COMPLEX - even without a table requires a table only accessible rows NO DML remove view 1 table DML 1 + tables NO DML IN LINE VIEW A query in the FROM clause UPDATE ( SELECT C1 FROM T1 WHERE C1 = V1) Set C1 = V2; Top-N gets specific number of rows SELECT * FROM ( SELECT C1, C2 FROM T1 ORDER BY C1 DESC) WHERE ROWNUM <= 5; 25

26 SUBQUERIES a select embedded in a select ( ) in parentheses can be FROM, WHERE, HAVING SINGLE ROW - 1 row returned Comparison operator =!= < <= > >= LIKE SELECT LAST_NAME, FIRST_NAME, SALARY FROM STAFF WHERE SALARY < (SELECT MAX(SALARY) FROM STAFF); SELECT a.c1, a.c2 FROM T1 a WHERE a.c1 IN (SELECT b.c1 FROM T2 b WHERE b.c2 IN(1,3,5); SELECT LAST_NAME, MIN(SALARY) FROM STAFF GROUP BY DEPARTMENT_ID HAVING MIN(SALARY) > (SELECT MIN(SALARY) FROM STAFF WHERE DEPARTMENT_ID = 50); MULTI-ROW - many rows returned In outer query WHERE IN - Comparison operators : ANY - ALL - within the list returned in at least 1 of them returned in all of them returned EXISTS - NOT EXISTS something is returned nothing is returned 26

27 INDEX Eliminates full table scans Speeds up retrieval Takes up space Large tables with small results Maintained by Oracle DBMS CREATE INDEX I1 ON T1(c1, c2); Columns can be expressions, functions Simple 1 column Complex 1+ columns DROP INDEX I1; ALTER INDEX I1 DISABLE ENABLE RENAME to REBUILD SYNONYM To reference other data Simplify access CREATE PUBLIC SYNONYM syn-name FOR Object; DROP PUBLIC SYNONYM syn-name; SEQUENCE generate unique numbers for Primary Key Gaps may appear CREATE SEQUENCE seq-name START WITH x INCREMENT BY x MAXVALUE x MINVALUE x CYCLE NOCYCLE CACHE NOCACHE; ALTER SEQUENCE seq-name; DROP SEQUENCE seq-nqme; INSERT INTO t1(c1, c2) VALUES(seq_name.NEXTVAL, val2.currval); CURRVAL NEXTVAL SELECT seq1.currval FROM DUAL; seq1.nextval 27

28 Data type Default - Explicit - Implicit - Format Hone Iteration Read consistency fm Privileges: classification of a variable automatically assigned value until override clearly expressed not direct, implied arrangement of data sharpen repeating a consistent view of the data format model - remove blanks or leading zeroes SYSTEM privileges - non-object related Create, session OBJECT privileges DML COMMENTS - /*..*/

29 SECURITY Add / change / delete users: CREATE USER name1 IDENTIFIED BY pass1; GRANT CREATE SESSION TO name1; ALTER USER name1 IDENTIFIED BY pass1; DROP USER name1; Add database: CREATE ALTER. DROP. RENAME TRUNCATE. INSEX SYNONYM SEQUENCE TABLE VIEW. CREATE DATABASE IF NOT EXISTS name1; DROP DATABASE IF EXISTS name1; PRIVILEGES SYSTEM PRIVILEGES CREATE SESSION CREATE TABLE CREATE USER CREATE ALTER VIEW OBJECT PRIVILEGES DMLs ALTER EXECUTE INDEX REFERENCES GRANT ALL PRIVILEGES ON object TO USER/PUBLIC WITH GRANT OPTION; REVOKE ALL PROVILEGES ON object FROM USER/PUBLIC; GRANT ALL/SELECT/UPDATE/DELETE ON T1 TO newuser WITH GRANT OPTION; GRANT EXECUTE ON proc1 TO newuser REVOKE ALL/INSERT/UPDATE/DELETE ON T1 FRM newuser; 29

30 ROLE groups of privileges Makes control casier CREATE ROLE r1 GRANT CONNECT TO r1 GRANT EXECUTE ANY procedure TO r1 GRANT SELECT ON T1 to r1; PL / SQL SECTION PL/SQL - made up of BLOCKS Anonymous BLOCKS - Not connected to db cursors no name variables Declare sub-programs Begin procedures exceptions run-time errors end; ends block DECLARE v1 number := 123; BEGIN DBMS_OUTPUT.PUT_LINE( v1 ); EXCEPTION WHEN --some error in BEGIN -- THEN DBMS_OUTPUT.PUT_LINE( error ); END; 30

31 Named BLOCKS - stored in db sub-programs functions procedures packages header declaration executable exception Overloading - same procedure name with different arguments. OPERATORS - := assignment V1 := 123; V2 := v1 v2; V3 := upper(s1); => association (v1 => 25); named notation DESCRIBE - returns argument list VARIABLES - must be declared BEFORE local sub -programs Constant NOT NULL := val -or- default val Name data type ; Max len = 30 Start with alpha Character/number set $ # No spaces No reserved words 31

32 PL/SQL PARAMETERS - a value passed to a sub-program. Formal parameters defined in a list before IS/AS name mode data_type positional named - mixed - in order via name V1 => 5 [any order] combo modes - IN - default values / read only OUT - NO default values IN OUT - NO default values Actual parameters values passed to sub-program Formal parameters => actual parameters variables Host variable holds values passed back by the OUT mode. Must have : used to separate from local Local Parameters - VARIABLE xx varchar2(50); EXECUTE p1 (:xx, :yy); declared after IS keyword and before begin keyword. If nested procedure, variables must be declared before nested procedure declared. SQL *PLUS EXECUTE - PRINT runs existing sub-program DBMS_OUTPUT.PUT_LINE( xyz v1); DROP - drops sub-programs, procedures or functions Cannot be part of a package Cannot be within a block No rollback allowed DROP procedure P1; 32

33 Sub Programs - performance security maintanance clarity Stored in db 1 statement is required Compiled to p-code Must be declared AFTER local variables Procedures - Perform an action May return 1 or more values through mode Called through an SQL statement Inherit privileges of owner Functions - Must return 1 value through RETURN Called as part of an SQL expression Can be used as a variable NO host variables NO group functions or DECODE Formal parameters create or replace procedure p1(v1 IN varchar2) is begin block exception DECLARATION SECTION end p1; LOCAL VARIABLES create or replace function f1(v1 IN varchar2) RETURN varchar2 is v2 varchar2(50); begin RETURN V2; exception end p1; 33

34 create new procedure function trigger package or replace copy over privileges remain the same SAMPLE code with SQL- number) create or replace procedure p1 (id IN number, fn OUT varchar2, salary OUT is begin SELECT first_name, emp_salary INTO fn, salary FROM EMPL WHERE empl_id = id; end p1; execute p1(1, :v_fn, :v_sal); : references the variable in the execute command. %TYPE DEFAULT x gets data type from column or variable t1.c1%type mode must be IN create or replace procedure p1 (fn t1.fn1%type default John ) is (fn T1.C1%TYEP DEFAULT John ) 34

35 Invoking procedures - from stand-alone SQL*PLUS execute p1; uses default values execute p1(1); only first value passed execute p1(id => 33); passes id = 33 execute p1( :var1, :var2 + 25); passes local : references local variable from Anonymous block named block sub-program - BEGIN P1(x); END; Invoking functions - SELECT f1(1) FROM T1; SELECT fn FROM T1 WHERE ln = f1(1); EXECUTE :ln := f1(1); From SQL clauses - SELECT UPDATE DELETE INSERT WHERE GROUP BY HAVING ORDER BY SET WHERE WHERE VALUES 35

36 EXCEPTIONS - unpredictable situations Implicit Explicit Oracle PreDefined Oracle Non-PreDefined User-Defined Oracle PreDefined Error - Just the exception Oracel Non-PreDefined Error - NO_DATA_FOUND TOO_MANY_ROWS INVALID_CURSOR ZERO_DIVIDE DUP_VAL_ON_INDEX DECLARE E1 EXCEPTION; PRAGMA EXCEPTION_INIT(E1, ); EXCEPTION WHEN E1 THEN ---- USER-DEFINED Error - Raised DECLARE E1 EXCEPTION; BEGIN if SQL%NOTFOUND THEN RAISE E1; EXCEPTION WHEN E1 THEN or -- RAISE_APPLICATION_ERROR(#, message, TRUE); custom keep RAISE - Invokes user-defined error Execution ends Control passed to exception handling section Declared in declaration section Raised in executable section Handled in exception handling section 36

37 Parts of an exception : Name Type - Exception code Error code description area of error ORA or- PLS numeric code ORA info about error SQLERRM message -- both must be variables SQLCODE code PRAGMA EXCEPTION_INIT - non-predefined error (E1, ); RAISE_APPLICATION_ERROR - user-defined error (#, message, keep) Retrieve error code SQLERRM message SQLCODE - number 0 no exception 1 user defined error no data found (-) Oracle Server Error V_ERROR_CODE NUMBER; V_ERROR_CODE := SQLCODE;

38 DATA TYPES scalar 1 value char DATE Number Boolean %TYPE Composite multiple table Record Nested table Varray LOB large objects and IMAGES Database column CLOB book BLOB pictures BFILE binary / movie NCLOB foreign font REFERENCE OBJECT pointer a schema with a name Character data type : Char 1 to Default 1 Varchar2( ) Long Long RAW no default > 2 billion binary RAW unknown to PL/SQL Number data type : Number (p, s) BINARY_INTEGER PLS_INTEGER BINARY_FLOAT BINARY_DOUBLE precision, scale +- 2 billion +- 2 billion fast floating point 5 bytes floating point 9 bytes 38

39 DATE data type : SECONDS DATE TIME OF DAY IN TIMESTAMP y, m, d, h, m, s + local & UTC database TIMESTAMP WITH TIME ZONE difference TIMESTAMP WITH LOCAL TIME ZONE inserted into INTERVAL YEAR TO MONTH INTERVAL DAY TO SECOND intervals intervals BOOLEAN DATA TYPE : TRUE FALSE NULL DATA TYPE CONVERSION IMPLICIT EXPLICIT dynamically in a statement SLOW You lose control Environment specific through built in functions TO_CHAR( ) TO_NUMBER ( ) TO_DATE( ) TO_CLOB( ) CHARTOROWID( ) RAWTOHEX( ) ++ MORE! 39

40 PRIVILEGE - right to perform an action Granted to : a schema user role public user group System privilege - right to perform an action in all schemas Granted to a schema ANY - PUBLIC - in entire database in entire database and into future WITH ADMIN OPTION grantee can pass privileges to other schemas GRANT CREATE TABLE TO STEVE can create in their own schema GRANT CREATE ANY TABLE TO STEVE can create in all schemas GRANT EXECUTE ANY PROCEDURE TO STEVE GRANT CREATE ANY PROCEDURE TO STEVE CREATE ANY PROCEDURE TO STEVE sub programs In any schema NO DROP NO ALTER NO -- OR REPLACE Object privilege - schema right to perform an action on a specific object in another MUST include object name ON named object GRANT SELECT ON T1 TO USER_B; Issued by USER_A WITH GRANT OPTION allow to pass object privileges to other schemas GRANT EXECUTE ON F1 TO JOE GRANT EXECUTE ON PK1 TO JOE 40

41 Types of privileges - CREATE ALTER DROP SELECT EXECUTE procedures, functions, packages.. GRANT priv TYPE ANY/ON object TYPE TO USER GRANT - REVOKE - used to assign privilege used to remove privilege Revoke object privilege - Revoke system privilege - cascading NOT cascading ANY - IN - INVOKER - DEFINER - for system privileges for object privileges Person who executes Must have execute privilege the owner who creates an object 41

42 Data Dictionary VIEWS / columns : USER-PROCEDURES names of all units Object Procedure name the name USER_SOURCE names or all uinits that invoke a procedure Text Name USER_OBJECTS - source code information about program units Object type Created - LAST_DDL_TIME - Status procedure, function. date when compiled VALID / INVALID USER_ERRORS SHOW_ERRORS Sample privileges : ALTER ANY PROCEDURE AUTHID CURRENT_USER - AUTHID DEFINER - to manually recompile to use invoker rights default Procedure is invoked with owner rights

43 Packages - groups related procedures Cannot be invoked Entire package loaded into memory Dot notation EXECUTE S1. PKG1. P1(x); PARTS not stored together schema INTERFACE only Executable code package specification package body required public Must be created FIRST name public declarations public sub-programs optoinal private name private declarations private sub-programs DOT NOTATION - for outside access only public constructs can be referenced from outside PK1.P1(x); PRAGMA compiler directives How to view a package status SELECT OBJECT_TYPE FROM OBJECT_VIEWS WHERE OBJECT_NAME = x ; BODILESS PACKAGE no package body Used to initialize global variables PACKAGE CONSTRUCTS - procedures functions cursors variables exceptions types 43

44 Create a package CREATE OR REPLACE PACKAGE pkg1 IS Variables / cursors Sub-programs END pkg1; Package variable - NULL if not assigned a value CREATE OR REPLACE PACKAGE pkg1 AS V1 number; END pkg1; DROP package DROP PACKAGE pkg1; DROP PACKAGE BODY p1; body dropped only DESCRIBE (package) Returns complete structure Argument list Lists package constructs Lists column information Function return data-type DESCRIBE PK1; PRAGMA Purity Levels WNDS writes no database state RNDS reads no database state WNPS writes no package state RNPS reads no package state Package purity - Forward declaration Parts of Package Body amount free from side effects declare subprogram specification BEFORE the body specification Header Declaration Execution 44

45 BASIC LOOP NO conditions Runs at least once 1 EXIT required LOOP S1; EXIT WHEN x = y; END LOOP; WHILE LOOP runs while test is true WHILE x < 3 LOOP S1; S2; X = x + 1; END LOOP; FOR LOOP Specific number of iterations Automatic increment FOR C IN low.. high LOOP S1; S2; END LOOP; NESTED LOOP <<outer>> LOOP <<inner>> LOOP EXIT outer WHEN x = y; EXIT WHEN a = b; END LOOP; END LOOP;

46 CASE STATEMENT evaluates a condition END CASE; CASE v1 WHEN 5 THEN s1; WHEN 10 THEN s2; ELSE s3; END CASE; CASE EXPRESSION V1:= returns a value to a variable No semi colons until END; Case V2 WHEN 5 THEN s1 WHEN 10 THEN s2 ELSE v3 END; CASE LOGIC TABLE AND T F N OR T F N T t f N T t t t F f f f F t f N N N f N N t N N 46

47 CURSORS IMPLICIT Defined by Oracle One row EXPLICIT - Defined by programmer Many rows returned DECLARE CURSOR CS1 IS SELECT fn, ln FROM T1 WHERE id = x; V1 varchar2(); V2 varchar2(); BEGIN OPEN CS1; LOOP FETCH CS1 INTO v1, v2; EXIT WHEN CS1%NOTFOUND; DBMS_OUTPUT.PUT_LINE(v1, v2); END LOOP; CLOSE cs1; END; Active Set - Context Area - OPEN cursor - FETCH - rows returned by a query the location where rows are stored allocates memory Executes SELECT SETS Pointer to top retrieves rows from cursor CURSOR ATTRIBUTES : %NOTFOUND - %ISOPEN %FOUND %ROWCOUNT Test for end of cursor True if cursor opened True if most recent fetch is found Total rows fetched SO FAR. If NOT CS1%OPEN THEN OPEN CS1; END IF; EXIT WHEN CS1%ROWCOUNT > 5; 47

48 CURSOR %ROWTYPE Takes the Record structure SAME FIELDS AS IN THE SELECT. DECLARE CURSOR CS1 IS SELECT * FROM T1; ROW1 CS1%ROWTYPE; BEGIN OPEN CS1 LOOP FETCH CS1 INTO ROW1; EXIT WHEN CS1%NOTFOUND; DBMS_OUTPUT.PUT_LINE(ROW1.C1); END LOOP; CLOSE CS1; END; CURSOR PARAMETER A variable used in a cursor declaration Multiple opens and closes (with different values) DECLARE CURSOR CS1 (V1 number) IS SELECT fn, ln FROM T1 WHERE id = V1; ROW1 CS1%ROWTYPE; BEGIN OPEN CS1(5); LOOP FETCH CS1 INTO ROW1; EXIT WHEN CS1%NOTFOUND; DBMS_OUTPUT.PUT_LINE(c1, c2); END LOOP; CLOSE CS1; END; 48

49 CURSOR FOR LOOP declare, open, fetch, %notfound, close No variables for fetched data Can be in a sub-query FOR i IN CS1 LOOP S1; S2; EXIT WHEN CS1%ROWCOUNT > 5; BDMS_OUTPUT.PUT_LINE( i.c1 ) END LOOP; optional dot.notation CURSOR IN SUBQUERY FOR i IN (SELECT C1, C2 FROM T1 WHERE C3 > 0) LOOP CURSOR UPDATE DECLARE CURSOR CS1 IS SELECT C1, C2 FROM T1 FOR UPDATE OF C3 NOWAIT BEGIN FOR ROW1 IN CS! LOOP UPDATE T1 SET C3 = x; WHERE CURRENT OF CS1; END LOOP; END; WAIT n - NOWAIT - wait a number of seconds immediate error WHERE CURRENT OF CS1 - Most recent fetched row Used with SET C1 = joe ; UPDATE DELETE FOR UPDATE OF C1- only column locked FOR UPDATE entire record is locked 49

50 ORACLE SUPPLIED PACKAGES - DBMS_SQL For DDL statements For dynamic SQL PARSE - EXECUTE - FETCH_ROWS - OPEN_CURSOR - verify syntax and privileges # of rows processed # fetched rows open cursor and allocate memory SET SERVEROUTPUT ON - for SQL*PLUS DBMS_OUTPUT - PUT_LINE - PUT - package to display messages during session procedure to display put text to buffer for future use DBMS_OUTPUT.PUT_LINE(TO_CHAR(SQL%ROWCOUNT)); EXECUTE IMMEDIATE - Fast and Easy Single row queries Dynamic SQL execution Supports user_defined types NOT for client-side EXECUTE IMMEDIATE DELETE T1; Order of steps : 1 - Parse - verify syntax and privileges 2 - Bind - initialize variables 3 - Execute - SQL processed and rows returned 4 - Fetch - specific condition rows returned DBMS_PIPE - send and receive messages across a user session Number Varchar2 RAW ROWID DBMS_DDL issues certain types of DDL commands 50

51 ALTER_COMPILE - a procedure used to issue alter/compile statement. ALTER PROCEDURE JOE.P1 COMPILE; BEGIN DBMS_DDL.ALTER_COMPILE( PROCEDURE, Joe, P1 ); END; DBMS_JOB package used to run jobs at user-defined times. SUBMIT - Submits desired code JOB : - name of job WHAT : - specifies the PL/SQL code to be run NEXT_DATE : - the next date job will run INTERVAL : - time between jobs NO_PARSE : - when parsing is to occur BOOLEAN True or False UTL_FILE - package to read and write to operating system FOPEN : - open for read or write PUT_LINE - writes the strings from buffer to open file PUTF : - %s substitute value \n new line FCLOSE closes file UTL_TCP - read or write from remote host OPEN_CONNECTION CLOSE_CONNECTION - UTL_HTTP - allows PL/SQL to act as a browser 51

52 Table of records - 1 SELECT statement Stores all rows and columns Composite data type TYPE T_ROW IS RECORD PRAGMA RESTRICT_REFERENCES - specifies the purity of a function What is can and cannot do PRAGMA RESTRICT_REFERENCES(F1, WNDS); Side Effects - package specification changes to the database or variables in FORWARD REFERENCING - FORWARD DECLARATION - in another NOT is SQL Sub programs MUST be declared before use declare a sub program before referencing it sub program. Just a header / arguments is required. ONT-TIME ONLY PROCEDURE - defined in body Executed when package is first invoked PERSISTENT STATE OF PACKAGED VARIABLE - only for each changes are made Session 52

53 TRIGGER - runs when something happens NO arguments DDL (INSERT, UPDATE, DELETE) DML (CREATE, ALTER, DROP) NO TCL (commit, savepoint, rollback) If exception, then rollback occurs EVENTS THAT FIRE A TRIGGER - Data Event - FOR EACH ROW DDL DML STATEMENT LOGON System Event - FOR EACH At schema level ON LOGOFF / ON Always fires TYPES OF TRIGGERS - ROW TRIGGER - FOR EACH ROW :old :new capture before and after Logs into audit table STATEMENT STATEMENT TRIGGER - FOR EACH TRIGGER TIMING - Remove a trigger - BEFORE rows not locked AFTER rows locked and constraint checks done DROP TRIGGER TG1 Alter trigger - ALTER TRIGGER TG1 ENABLE DISABLE ALTER TABLE T1 DISABLE ALL TRIGGERS TRIGGER FIRING SEQUENCE - 1. Before each statement 2. Before each row 3. UPDATE 4. After each row 5. After each statement 53

54 INSTEAD OF - Fires on a VIEW A row trigger Replaces the trigger statement Trigger manipulation test UPDATING DELETING INSERTING SAMPLE Update Row TRIGGER code timing / event CREATE OR REPLACE TRIGGER TG1 BEFORE UPDATE OF salary ON T1 FOR EACH ROW WHEN A > B BEGIN IF UPDATING ( salary ) THEN :new.salary := 2000; :new.name := USER; END IF END; MUTATING TABLE - when a trigger reads and writes at the same time. 54

55 DEPENDENT OBJECT - REFERENCED OBJECT - INDIRECT REFERENCE - an object that references another object CALLING CALLED through intermediate construct LOCAL DEPENDENT OBJECT - in same database Oracle attempts to recompile REMOTE DEPENDENCIES - rely on object in another database USER_DEPENDENCIES VIEW on direct dependencies To Display Indirect/direct Dependencies - Utldtree.sql dependencies IDEPTREE - DEPTREE - DEPTREE_FILL - DEPTREE_TEMPTAB - indented, indirect chart populate table holds data EXECUTE DEPTREE(o-type, owner, name); BEGIN DEPTREE_FILL(o-type, owner, name); END; DEPENDENCY MODES - TIMESTAMP SIGNITURE To recompile - ALTER PROCEDURE P1 COMPILE; ALTER PACKAGE PK1 COMPILE BODY SPECIFICATION PACKAGE 55

56 LOB Large Objects Can store anything anywhere Can be many columns 4gb 9i 128TB 10g CLOB BLOB BFILE NCLOB TEXT HTML PL/SQL PICTURES MP3.exe Binary Files Can be outside database MOVIES / AUDIO NO DVD NO privileges National character set LOB directory - LOB VALUE - LOB Locator - Out-Of-Line - pointer to BFILE LOB data pointer to LOB file where file is stored To add column ALTER TABLE T1 ADD (file CLOB ); BLOB EMPTY_CLOB - DBMS_LOB - Initialize pointer & memory Done BEFORE populating package to manage LOB to access BFILE To load the values DBMS_LOB.FILEOPEN - DBMS_LOB.FILECLOSE to open BFILE to close BFILE 56

57 Convert to LOB ALTER TABLE T1 MODIFY (file CLOB ); BLOB NCLOB LONG to LOB LONG to CLOB LONG to NCLOB LONG RAW to BLOB Temporary LOB - used to create temporary CLOB, BLOB, NCLOB Faster NO Rollback Change formats (GIF to JPEG) NO EMPTY_BLOB or EMPTY_CLOB DBMS_LOB.CREATETEMPORARY create temp LOB. BFILENAME - used initialize a BFILE column 57

Question: Which statement would you use to invoke a stored procedure in isql*plus?

Question: Which statement would you use to invoke a stored procedure in isql*plus? What are the two types of subprograms? procedure and function Which statement would you use to invoke a stored procedure in isql*plus? EXECUTE Which SQL statement allows a privileged user to assign privileges

More information

Topics Fundamentals of PL/SQL, Integration with PROIV SuperLayer and use within Glovia

Topics Fundamentals of PL/SQL, Integration with PROIV SuperLayer and use within Glovia Topics Fundamentals of PL/SQL, Integration with PROIV SuperLayer and use within Glovia 1. Creating a Database Alias 2. Introduction to SQL Relational Database Concept Definition of Relational Database

More information

5. Single-row function

5. Single-row function 1. 2. Introduction Oracle 11g Oracle 11g Application Server Oracle database Relational and Object Relational Database Management system Oracle internet platform System Development Life cycle 3. Writing

More information

normalization are being violated o Apply the rule of Third Normal Form to resolve a violation in the model

normalization are being violated o Apply the rule of Third Normal Form to resolve a violation in the model Database Design Section1 - Introduction 1-1 Introduction to the Oracle Academy o Give examples of jobs, salaries, and opportunities that are possible by participating in the Academy. o Explain how your

More information

Introduction to Computer Science and Business

Introduction to Computer Science and Business Introduction to Computer Science and Business This is the second portion of the Database Design and Programming with SQL course. In this portion, students implement their database design by creating a

More information

Course Outline and Objectives: Database Programming with SQL

Course Outline and Objectives: Database Programming with SQL Introduction to Computer Science and Business Course Outline and Objectives: Database Programming with SQL This is the second portion of the Database Design and Programming with SQL course. In this portion,

More information

SQL is an English like language consisting of commands to store, retrieve, maintain & regulate access to your database.

SQL is an English like language consisting of commands to store, retrieve, maintain & regulate access to your database. SQL SQL is an English like language consisting of commands to store, retrieve, maintain & regulate access to your database. SQL*Plus SQL*Plus is an application that recognizes & executes SQL commands &

More information

Introduction to Computer Science and Business

Introduction to Computer Science and Business Introduction to Computer Science and Business The Database Programming with PL/SQL course introduces students to the procedural language used to extend SQL in a programatic manner. This course outline

More information

Index. Boolean expression, , Business rules enforcement. see Declarative constraints table with Oracle constraints and,

Index. Boolean expression, , Business rules enforcement. see Declarative constraints table with Oracle constraints and, Index ABS numeric function, 355 Active State Perl, SQL*Plus with, 61 ADD_MONTHS, 360 AFTER DELETE ROW trigger, 202 AFTER DELETE STATEMENT trigger, 202 AFTER-INSERT-ROW (AIR) trigger, 172 174, 177, 179

More information

Oracle Database 11g: SQL and PL/SQL Fundamentals

Oracle Database 11g: SQL and PL/SQL Fundamentals Oracle University Contact Us: +33 (0) 1 57 60 20 81 Oracle Database 11g: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn In this course, students learn the fundamentals of SQL and PL/SQL

More information

Oracle Syllabus Course code-r10605 SQL

Oracle Syllabus Course code-r10605 SQL Oracle Syllabus Course code-r10605 SQL Writing Basic SQL SELECT Statements Basic SELECT Statement Selecting All Columns Selecting Specific Columns Writing SQL Statements Column Heading Defaults Arithmetic

More information

Oracle Developer Track Course Contents. Mr. Sandeep M Shinde. Oracle Application Techno-Functional Consultant

Oracle Developer Track Course Contents. Mr. Sandeep M Shinde. Oracle Application Techno-Functional Consultant Oracle Developer Track Course Contents Sandeep M Shinde Oracle Application Techno-Functional Consultant 16 Years MNC Experience in India and USA Trainer Experience Summary:- Sandeep M Shinde is having

More information

ORACLE: PL/SQL Programming

ORACLE: PL/SQL Programming %ROWTYPE Attribute... 4:23 %ROWTYPE... 2:6 %TYPE... 2:6 %TYPE Attribute... 4:22 A Actual Parameters... 9:7 Actual versus Formal Parameters... 9:7 Aliases... 8:10 Anonymous Blocks... 3:1 Assigning Collection

More information

ORACLE TRAINING. ORACLE Training Course syllabus ORACLE SQL ORACLE PLSQL. Oracle SQL Training Syllabus

ORACLE TRAINING. ORACLE Training Course syllabus ORACLE SQL ORACLE PLSQL. Oracle SQL Training Syllabus ORACLE TRAINING ORACLE Training Course syllabus ORACLE SQL ORACLE PLSQL Oracle SQL Training Syllabus Introduction to Oracle Database List the features of Oracle Database 11g Discuss the basic design, theoretical,

More information

Oracle Database 12c SQL Fundamentals

Oracle Database 12c SQL Fundamentals Course Overview This course takes a unique approach to SQL training in that it incorporates data modeling theory, relational database theory, graphical depictions of theoretical concepts and numerous examples

More information

1 Writing Basic SQL SELECT Statements 2 Restricting and Sorting Data

1 Writing Basic SQL SELECT Statements 2 Restricting and Sorting Data 1 Writing Basic SQL SELECT Statements Objectives 1-2 Capabilities of SQL SELECT Statements 1-3 Basic SELECT Statement 1-4 Selecting All Columns 1-5 Selecting Specific Columns 1-6 Writing SQL Statements

More information

Oracle Database: SQL and PL/SQL Fundamentals NEW

Oracle Database: SQL and PL/SQL Fundamentals NEW Oracle Database: SQL and PL/SQL Fundamentals NEW Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training delivers the fundamentals of SQL and PL/SQL along with the

More information

Introduction p. 1 The Logical and Physical View of Tables p. 1 Database Types p. 4 NULLs p. 6 DDL and DML Statements p. 7 Column and Table Constraint

Introduction p. 1 The Logical and Physical View of Tables p. 1 Database Types p. 4 NULLs p. 6 DDL and DML Statements p. 7 Column and Table Constraint Preface p. xv Introduction p. 1 The Logical and Physical View of Tables p. 1 Database Types p. 4 NULLs p. 6 DDL and DML Statements p. 7 Column and Table Constraint Clauses p. 7 Sample Database p. 9 A Quick

More information

Oracle Database: SQL and PL/SQL Fundamentals Ed 2

Oracle Database: SQL and PL/SQL Fundamentals Ed 2 Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 67863102 Oracle Database: SQL and PL/SQL Fundamentals Ed 2 Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals

More information

Table of Contents. Oracle SQL PL/SQL Training Courses

Table of Contents. Oracle SQL PL/SQL Training Courses Table of Contents Overview... 7 About DBA University, Inc.... 7 Eligibility... 8 Pricing... 8 Course Topics... 8 Relational database design... 8 1.1. Computer Database Concepts... 9 1.2. Relational Database

More information

Table of Contents. PDF created with FinePrint pdffactory Pro trial version

Table of Contents. PDF created with FinePrint pdffactory Pro trial version Table of Contents Course Description The SQL Course covers relational database principles and Oracle concepts, writing basic SQL statements, restricting and sorting data, and using single-row functions.

More information

When a database trigger routine does not have to take place before the triggering event, which timing should you assign to the trigger?

When a database trigger routine does not have to take place before the triggering event, which timing should you assign to the trigger? Page 1 of 80 Item: 1 (Ref:1z0-147e.9.2.4) When a database trigger routine does not have to take place before the triggering event, which timing should you assign to the trigger? nmlkj ON nmlkj OFF nmlkj

More information

Chapter-14 SQL COMMANDS

Chapter-14 SQL COMMANDS Chapter-14 SQL COMMANDS What is SQL? Structured Query Language and it helps to make practice on SQL commands which provides immediate results. SQL is Structured Query Language, which is a computer language

More information

Lab # 4. Data Definition Language (DDL)

Lab # 4. Data Definition Language (DDL) Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Lab # 4 Data Definition Language (DDL) Eng. Haneen El-Masry November, 2014 2 Objective To be familiar with

More information

EDUVITZ TECHNOLOGIES

EDUVITZ TECHNOLOGIES EDUVITZ TECHNOLOGIES Oracle Course Overview Oracle Training Course Prerequisites Computer Fundamentals, Windows Operating System Basic knowledge of database can be much more useful Oracle Training Course

More information

Creating and Managing Tables Schedule: Timing Topic

Creating and Managing Tables Schedule: Timing Topic 9 Creating and Managing Tables Schedule: Timing Topic 30 minutes Lecture 20 minutes Practice 50 minutes Total Objectives After completing this lesson, you should be able to do the following: Describe the

More information

SQL Interview Questions

SQL Interview Questions SQL Interview Questions SQL stands for Structured Query Language. It is used as a programming language for querying Relational Database Management Systems. In this tutorial, we shall go through the basic

More information

II B.Sc(IT) [ BATCH] IV SEMESTER CORE: RELATIONAL DATABASE MANAGEMENT SYSTEM - 412A Multiple Choice Questions.

II B.Sc(IT) [ BATCH] IV SEMESTER CORE: RELATIONAL DATABASE MANAGEMENT SYSTEM - 412A Multiple Choice Questions. Dr.G.R.Damodaran College of Science (Autonomous, affiliated to the Bharathiar University, recognized by the UGC)Re-accredited at the 'A' Grade Level by the NAAC and ISO 9001:2008 Certified CRISL rated

More information

Oracle. SQL(Structured Query Language) Introduction of DBMS. Build In Function. Introduction of RDBMS. Grouping the Result of a Query

Oracle. SQL(Structured Query Language) Introduction of DBMS. Build In Function. Introduction of RDBMS. Grouping the Result of a Query Oracle SQL(Structured Query Language) Introduction of DBMS Approach to Data Management Introduction to prerequisites File and File system Disadvantages of file system Introduction to TOAD and oracle 11g/12c

More information

A Unit of SequelGate Innovative Technologies Pvt. Ltd. All Training Sessions are Completely Practical & Real-time

A Unit of SequelGate Innovative Technologies Pvt. Ltd. All Training Sessions are Completely Practical & Real-time SQL Basics & PL-SQL Complete Practical & Real-time Training Sessions A Unit of SequelGate Innovative Technologies Pvt. Ltd. ISO Certified Training Institute Microsoft Certified Partner Training Highlights

More information

SQL+PL/SQL. Introduction to SQL

SQL+PL/SQL. Introduction to SQL SQL+PL/SQL CURRICULUM Introduction to SQL Introduction to Oracle Database List the features of Oracle Database 12c Discuss the basic design, theoretical, and physical aspects of a relational database Categorize

More information

ADVANTAGES. Via PL/SQL, all sorts of calculations can be done quickly and efficiently without use of Oracle engine.

ADVANTAGES. Via PL/SQL, all sorts of calculations can be done quickly and efficiently without use of Oracle engine. 1 PL/SQL INTRODUCTION SQL does not have procedural capabilities. SQL does not provide the programming techniques of condition checking, looping and branching that is required for data before permanent

More information

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle Database 11g: Program with PL/ SQL. Version: Demo

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle Database 11g: Program with PL/ SQL. Version: Demo Vendor: Oracle Exam Code: 1Z0-144 Exam Name: Oracle Database 11g: Program with PL/ SQL Version: Demo QUESTION NO: 1 View the Exhibit to examine the PL/SQL code: SREVROUPUT is on for the session. Which

More information

Oracle Database: Introduction to SQL/PLSQL Accelerated

Oracle Database: Introduction to SQL/PLSQL Accelerated Oracle University Contact Us: Landline: +91 80 67863899 Toll Free: 0008004401672 Oracle Database: Introduction to SQL/PLSQL Accelerated Duration: 5 Days What you will learn This Introduction to SQL/PLSQL

More information

Oracle SQL & PL SQL Course

Oracle SQL & PL SQL Course Oracle SQL & PL SQL Course Complete Practical & Real-time Training Job Support Complete Practical Real-Time Scenarios Resume Preparation Lab Access Training Highlights Placement Support Support Certification

More information

2 PL/SQL - fundamentals Variables and Constants Operators SQL in PL/SQL Control structures... 7

2 PL/SQL - fundamentals Variables and Constants Operators SQL in PL/SQL Control structures... 7 Table of Contents Spis treści 1 Introduction 1 2 PLSQL - fundamentals 1 2.1 Variables and Constants............................ 2 2.2 Operators.................................... 5 2.3 SQL in PLSQL.................................

More information

Proje D2K. CMM (Capability Maturity Model) level Project Standard:- Corporate Trainer s Profile

Proje D2K. CMM (Capability Maturity Model) level Project Standard:- Corporate Trainer s Profile D2K Corporate Trainer s Profile Corporate Trainers are having the experience of 4 to 12 years in development, working with TOP CMM level 5 comapnies (Project Leader /Project Manager ) qualified from NIT/IIT/IIM

More information

PLSQL 9i Index. Section Title Page

PLSQL 9i Index. Section Title Page One PLSQL Introduction 2 Procedural Language for SQL 3 Two PLSQL Structure 5 Basic Structure of PLSQL 6 The Declaration Section in PLSQL 7 Local Variables in PLSQL 8 Naming Local Variables in PLSQL 10

More information

Oracle Database: SQL and PL/SQL Fundamentals

Oracle Database: SQL and PL/SQL Fundamentals Oracle University Contact Us: 001-855-844-3881 & 001-800-514-06-9 7 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training

More information

Introduction to SQL/PLSQL Accelerated Ed 2

Introduction to SQL/PLSQL Accelerated Ed 2 Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 67863102 Introduction to SQL/PLSQL Accelerated Ed 2 Duration: 5 Days What you will learn This Introduction to SQL/PLSQL Accelerated course

More information

1 Prepared By Heena Patel (Asst. Prof)

1 Prepared By Heena Patel (Asst. Prof) Topic 1 1. What is difference between Physical and logical data 3 independence? 2. Define the term RDBMS. List out codd s law. Explain any three in detail. ( times) 3. What is RDBMS? Explain any tow Codd

More information

PL/SQL Block structure

PL/SQL Block structure PL/SQL Introduction Disadvantage of SQL: 1. SQL does t have any procedural capabilities. SQL does t provide the programming technique of conditional checking, looping and branching that is vital for data

More information

Oracle Database 11g: Program with PL/SQL Release 2

Oracle Database 11g: Program with PL/SQL Release 2 Oracle University Contact Us: +41- (0) 56 483 31 31 Oracle Database 11g: Program with PL/SQL Release 2 Duration: 5 Days What you will learn This course introduces students to PL/SQL and helps them understand

More information

Oracle Database 12c: Program with PL/SQL Duration: 5 Days Method: Instructor-Led

Oracle Database 12c: Program with PL/SQL Duration: 5 Days Method: Instructor-Led Oracle Database 12c: Program with PL/SQL Duration: 5 Days Method: Instructor-Led Course Description This training starts with an introduction to PL/SQL and then explores the benefits of this powerful programming

More information

Using DDL Statements to Create and Manage Tables. Copyright 2006, Oracle. All rights reserved.

Using DDL Statements to Create and Manage Tables. Copyright 2006, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables Objectives After completing this lesson, you should be able to do the following: Categorize the main database objects Review the table structure List the

More information

Lab # 2. Data Definition Language (DDL) Eng. Alaa O Shama

Lab # 2. Data Definition Language (DDL) Eng. Alaa O Shama The Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Database Lab Lab # 2 Data Definition Language (DDL) Eng. Alaa O Shama October, 2015 Objective To be familiar

More information

DB2 SQL Class Outline

DB2 SQL Class Outline DB2 SQL Class Outline The Basics of SQL Introduction Finding Your Current Schema Setting Your Default SCHEMA SELECT * (All Columns) in a Table SELECT Specific Columns in a Table Commas in the Front or

More information

2. Programming written ( main theme is to test our data structure knowledge, proficiency

2. Programming written ( main theme is to test our data structure knowledge, proficiency ORACLE Job Placement Paper Paper Type : General - other 1. Tech + Aptitude written 2. Programming written ( main theme is to test our data structure knowledge, proficiency sorting searching algorithms

More information

ORACLE Job Placement Paper. Paper Type : General - other

ORACLE Job Placement Paper. Paper Type : General - other ORACLE Job Placement Paper Paper Type : General - other 1. Tech + Aptitude written 2. Programming written ( main theme is to test our data structure knowledge, proficiency sorting searching algorithms

More information

Oracle PL/SQL - 12c & 11g [Basic PL/SQL & Advanced PL/SQL]

Oracle PL/SQL - 12c & 11g [Basic PL/SQL & Advanced PL/SQL] Chapter Overview of PL/SQL Programs Control Statements Using Loops within PLSQL Oracle PL/SQL - 12c & 11g [Basic PL/SQL & Advanced PL/SQL] Table of Contents Describe a PL/SQL program construct List the

More information

SQL Structured Query Language (1/2)

SQL Structured Query Language (1/2) Oracle Tutorials SQL Structured Query Language (1/2) Giacomo Govi IT/ADC Overview Goal: Learn the basic for interacting with a RDBMS Outline SQL generalities Available statements Restricting, Sorting and

More information

Oracle Database: Program with PL/SQL

Oracle Database: Program with PL/SQL Oracle University Contact Us: Local: 1800 425 8877 Intl: +91 80 4108 4700 Oracle Database: Program with PL/SQL Duration: 50 Hours What you will learn This course introduces students to PL/SQL and helps

More information

UNIT-IV (Relational Database Language, PL/SQL)

UNIT-IV (Relational Database Language, PL/SQL) UNIT-IV (Relational Database Language, PL/SQL) Section-A (2 Marks) Important questions 1. Define (i) Primary Key (ii) Foreign Key (iii) unique key. (i)primary key:a primary key can consist of one or more

More information

Oracle Database: Program with PL/SQL

Oracle Database: Program with PL/SQL Oracle University Contact Us: + 420 2 2143 8459 Oracle Database: Program with PL/SQL Duration: 5 Days What you will learn This Oracle Database: Program with PL/SQL training starts with an introduction

More information

Oracle Database: Program with PL/SQL Ed 2

Oracle Database: Program with PL/SQL Ed 2 Oracle University Contact Us: +38 61 5888 820 Oracle Database: Program with PL/SQL Ed 2 Duration: 5 Days What you will learn This Oracle Database: Program with PL/SQL training starts with an introduction

More information

Principles of Data Management

Principles of Data Management Principles of Data Management Alvin Lin August 2018 - December 2018 Structured Query Language Structured Query Language (SQL) was created at IBM in the 80s: SQL-86 (first standard) SQL-89 SQL-92 (what

More information

Conditionally control code flow (loops, control structures). Create stored procedures and functions.

Conditionally control code flow (loops, control structures). Create stored procedures and functions. TEMARIO Oracle Database: Program with PL/SQL Ed 2 Duration: 5 Days What you will learn This Oracle Database: Program with PL/SQL training starts with an introduction to PL/SQL and then explores the benefits

More information

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9)

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 3 Professional Program: Data Administration and Management MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) AGENDA

More information

Oracle SQL Course Content

Oracle SQL Course Content Oracle SQL Course Content Introduction Describe the features of Oracle Database 12c Describe the salient features of Oracle Cloud 12c Explain the theoretical and physical aspects of a relational database

More information

Oracle Database 10g: Introduction to SQL

Oracle Database 10g: Introduction to SQL ORACLE UNIVERSITY CONTACT US: 00 9714 390 9000 Oracle Database 10g: Introduction to SQL Duration: 5 Days What you will learn This course offers students an introduction to Oracle Database 10g database

More information

Oracle PLSQL Training Syllabus

Oracle PLSQL Training Syllabus Oracle PLSQL Training Syllabus Introduction Course Objectives Course Agenda Human Resources (HR) Schema Introduction to SQL Developer Introduction to PL/SQL PL/SQL Overview Benefits of PL/SQL Subprograms

More information

@vmahawar. Agenda Topics Quiz Useful Links

@vmahawar. Agenda Topics Quiz Useful Links @vmahawar Agenda Topics Quiz Useful Links Agenda Introduction Stakeholders, data classification, Rows/Columns DDL Data Definition Language CREATE, ALTER, DROP, TRUNCATE CONSTRAINTS, DATA TYPES DML Data

More information

Database Foundations. 6-3 Data Definition Language (DDL) Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Database Foundations. 6-3 Data Definition Language (DDL) Copyright 2015, Oracle and/or its affiliates. All rights reserved. Database Foundations 6-3 Roadmap You are here Introduction to Oracle Application Express Structured Query Language (SQL) Data Definition Language (DDL) Data Manipulation Language (DML) Transaction Control

More information

Oracle Database 12c R2: Program with PL/SQL Ed 2 Duration: 5 Days

Oracle Database 12c R2: Program with PL/SQL Ed 2 Duration: 5 Days Oracle Database 12c R2: Program with PL/SQL Ed 2 Duration: 5 Days This Database Program with PL/SQL training shows you how to develop stored procedures, functions, packages and database triggers. You'll

More information

Using SQL with SQL Developer 18.2

Using SQL with SQL Developer 18.2 One Introduction to SQL 2 - Definition 3 - Usage of SQL 4 - What is SQL used for? 5 - Who uses SQL? 6 - Definition of a Database 7 - What is SQL Developer? 8 Two The SQL Developer Interface 9 - Introduction

More information

Business Analytics. SQL PL SQL [Oracle 10 g] P r i n c e S e t h i w w w. x l m a c r o. w e b s. c o m

Business Analytics. SQL PL SQL [Oracle 10 g] P r i n c e S e t h i w w w. x l m a c r o. w e b s. c o m Business Analytics Let s Learn SQL-PL SQL (Oracle 10g) SQL PL SQL [Oracle 10 g] RDBMS, DDL, DML, DCL, Clause, Join, Function, Queries, Views, Constraints, Blocks, Cursors, Exception Handling, Trapping,

More information

Oracle Database: Introduction to SQL Ed 2

Oracle Database: Introduction to SQL Ed 2 Oracle University Contact Us: +40 21 3678820 Oracle Database: Introduction to SQL Ed 2 Duration: 5 Days What you will learn This Oracle Database 12c: Introduction to SQL training helps you write subqueries,

More information

Oracle PL SQL Training & Certification

Oracle PL SQL Training & Certification About Intellipaat Intellipaat is a fast-growing professional training provider that is offering training in over 150 most sought-after tools and technologies. We have a learner base of 600,000 in over

More information

1Z Oracle Database 11g - SQL Fundamentals I Exam Summary Syllabus Questions

1Z Oracle Database 11g - SQL Fundamentals I Exam Summary Syllabus Questions 1Z0-051 Oracle Database 11g - SQL Fundamentals I Exam Summary Syllabus Questions Table of Contents Introduction to 1Z0-051 Exam on Oracle Database 11g - SQL Fundamentals I 2 Oracle 1Z0-051 Certification

More information

Data about data is database Select correct option: True False Partially True None of the Above

Data about data is database Select correct option: True False Partially True None of the Above Within a table, each primary key value. is a minimal super key is always the first field in each table must be numeric must be unique Foreign Key is A field in a table that matches a key field in another

More information

Oracle Database: Introduction to SQL

Oracle Database: Introduction to SQL Oracle Database: Introduction to SQL What you will learn Understanding the basic concepts of relational databases ensure refined code by developers. This course helps the participants to write subqueries,

More information

Meet MariaDB Vicențiu Ciorbaru Software MariaDB Foundation * * 2017 MariaDB Foundation

Meet MariaDB Vicențiu Ciorbaru Software MariaDB Foundation * * 2017 MariaDB Foundation Meet MariaDB 10.3 Vicențiu Ciorbaru Software Engineer @ MariaDB Foundation vicentiu@mariadb.org * * What is MariaDB? MariaDB 5.1 (Feb 2010) - Making builds free MariaDB 5.2 (Nov 2010) - Community features

More information

Oracle Database: Introduction to SQL

Oracle Database: Introduction to SQL Oracle University Contact Us: (+202) 35 35 02 54 Oracle Database: Introduction to SQL Duration: 5 Days What you will learn View a newer version of this course This Oracle Database: Introduction to SQL

More information

Using DDL Statements to Create and Manage Tables. Copyright 2004, Oracle. All rights reserved.

Using DDL Statements to Create and Manage Tables. Copyright 2004, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Categorize the main database

More information

Oracle - Oracle Database: Program with PL/SQL Ed 2

Oracle - Oracle Database: Program with PL/SQL Ed 2 Oracle - Oracle Database: Program with PL/SQL Ed 2 Code: Lengt h: URL: DB-PLSQL 5 days View Online This Oracle Database: Program with PL/SQL training starts with an introduction to PL/SQL and then explores

More information

Oracle Database 11g: Program with PL/SQL

Oracle Database 11g: Program with PL/SQL Oracle University Contact: +31 (0)30 669 9244 Oracle Database 11g: Program with PL/SQL Duration: 5 Dagen What you will learn This course introduces students to PL/SQL and helps them understand the benefits

More information

Oracle Database: Introduction to SQL

Oracle Database: Introduction to SQL Oracle University Contact Us: +27 (0)11 319-4111 Oracle Database: Introduction to SQL Duration: 5 Days What you will learn This Oracle Database: Introduction to SQL training helps you write subqueries,

More information

Relational Database Language

Relational Database Language DATA BASE MANAGEMENT SYSTEMS Unit IV Relational Database Language: Data definition in SQL, Queries in SQL, Insert, Delete and Update Statements in SQL, Views in SQL, Specifying General Constraints as Assertions,

More information

Review -Chapter 4. Review -Chapter 5

Review -Chapter 4. Review -Chapter 5 Review -Chapter 4 Entity relationship (ER) model Steps for building a formal ERD Uses ER diagrams to represent conceptual database as viewed by the end user Three main components Entities Relationships

More information

Question Bank PL/SQL Fundamentals-I

Question Bank PL/SQL Fundamentals-I Question Bank PL/SQL Fundamentals-I UNIT-I Fundamentals of PL SQL Introduction to SQL Developer, Introduction to PL/SQL, PL/SQL Overview, Benefits of PL/SQL, Subprograms, Overview of the Types of PL/SQL

More information

Using DDL Statements to Create and Manage Tables. Copyright 2004, Oracle. All rights reserved.

Using DDL Statements to Create and Manage Tables. Copyright 2004, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Categorize the main database

More information

Full file at

Full file at ch2 True/False Indicate whether the statement is true or false. 1. The SQL command to create a database table is an example of DML. 2. A user schema contains all database objects created by a user. 3.

More information

Topics - System Administration for Glovia

Topics - System Administration for Glovia Topics - System Administration for Glovia 1. Network Architecture Sample Network 2. glovia.com Technology Architecture Application Server Database Server Web Server 3. Operating System Architecture High

More information

Slides by: Ms. Shree Jaswal

Slides by: Ms. Shree Jaswal Slides by: Ms. Shree Jaswal Overview of SQL, Data Definition Commands, Set operations, aggregate function, null values, Data Manipulation commands, Data Control commands, Views in SQL, Complex Retrieval

More information

Overview of supported syntax Janus Software All Rights Reserved

Overview of supported syntax Janus Software All Rights Reserved Fyracle 0.8.3 Overview of supported syntax 2004 Janus Software All Rights Reserved 1 Contents Introduction 3 1. Supported SQL syntax 4 2. Supported PL/SQL syntax 10 3. Supported DDL syntax 16 2 Introduction

More information

IZ0-144Oracle 11g PL/SQL Certification (OCA) training

IZ0-144Oracle 11g PL/SQL Certification (OCA) training IZ0-144Oracle 11g PL/SQL Certification (OCA) training Advanced topics covered in this course: Managing Dependencies of PL/SQL Objects Direct and Indirect Dependencies Using the PL/SQL Compiler Conditional

More information

JSPM s Bhivarabai Sawant Institute of Technology & Research, Wagholi, Pune Department of Information Technology

JSPM s Bhivarabai Sawant Institute of Technology & Research, Wagholi, Pune Department of Information Technology JSPM s Bhivarabai Sawant Institute of Technology & Research, Wagholi, Pune Department of Information Technology Introduction A database administrator (DBA) is a person responsible for the installation,

More information

Overview of PL/SQL. About PL/SQL. PL/SQL Environment. Benefits of PL/SQL. Integration

Overview of PL/SQL. About PL/SQL. PL/SQL Environment. Benefits of PL/SQL. Integration About PL/ Overview of PL/ PL/ is an extension to with design features of programming languages. Data manipulation and query statements of are included within procedural units of code. PL/ Environment Benefits

More information

Contents I Introduction 1 Introduction to PL/SQL iii

Contents I Introduction 1 Introduction to PL/SQL iii Contents I Introduction Lesson Objectives I-2 Course Objectives I-3 Human Resources (HR) Schema for This Course I-4 Course Agenda I-5 Class Account Information I-6 Appendixes Used in This Course I-7 PL/SQL

More information

Database Programming with PL/SQL

Database Programming with PL/SQL Database Programming with PL/SQL 2-3 Objectives This lesson covers the following objectives: Define data type and explain why it is needed List and describe categories of data types Give examples of scalar

More information

Data Definition Language (DDL)

Data Definition Language (DDL) Islamic University of Gaza Faculty of Engineering Computer Engineering Dept. Database Lab (ECOM 4113) Lab 6 Data Definition Language (DDL) Eng. Mohammed Alokshiya November 11, 2014 Database Keys A key

More information

INDEX. 1 Basic SQL Statements. 2 Restricting and Sorting Data. 3 Single Row Functions. 4 Displaying data from multiple tables

INDEX. 1 Basic SQL Statements. 2 Restricting and Sorting Data. 3 Single Row Functions. 4 Displaying data from multiple tables INDEX Exercise No Title 1 Basic SQL Statements 2 Restricting and Sorting Data 3 Single Row Functions 4 Displaying data from multiple tables 5 Creating and Managing Tables 6 Including Constraints 7 Manipulating

More information

UNIT II PL / SQL AND TRIGGERS

UNIT II PL / SQL AND TRIGGERS UNIT II PL / SQL AND 1 TRIGGERS TOPIC TO BE COVERED.. 2.1 Basics of PL / SQL 2.2 Datatypes 2.3 Advantages 2.4 Control Structures : Conditional, Iterative, Sequential 2.5 Exceptions: Predefined Exceptions,User

More information

COURSE STUDENT LEARNING OUTCOMES: See attached or in course s learn.unm.edu

COURSE STUDENT LEARNING OUTCOMES: See attached or in course s learn.unm.edu Syllabus Online IT 222(CRN #43196) Data Base Management Systems Instructor: James Hart / hart56@unm.edu Office Room Number: B 123 Instructor's Campus Phone: 505.925.8720 / Mobile 505.239.3435 Office Hours:

More information

M.SC(IT) I YEAR( ) CORE: ADVANCED DBMS-163B Semester : I Multiple Choice Questions

M.SC(IT) I YEAR( ) CORE: ADVANCED DBMS-163B Semester : I Multiple Choice Questions M.SC(IT) I YEAR(2017-2019) CORE: ADVANCED DBMS-163B Semester : I Multiple Choice Questions 1) storage lose contents when power is switched off. a) Volatile storage. b) Nonvolatile storage. c) Disk storage.

More information

PL / SQL Basics. Chapter 3

PL / SQL Basics. Chapter 3 PL / SQL Basics Chapter 3 PL / SQL Basics PL / SQL block Lexical units Variable declarations PL / SQL types Expressions and operators PL / SQL control structures PL / SQL style guide 2 PL / SQL Block Basic

More information

PL/SQL is a combination of SQL along with the procedural features of programming languages.

PL/SQL is a combination of SQL along with the procedural features of programming languages. (24 Marks) 5.1 What is PLSQL? PLSQL stands for Procedural Language extension of SQL. PLSQL is a combination of SQL along with the procedural features of programming languages. It was developed by Oracle

More information

AO3 - Version: 2. Oracle Database 11g SQL

AO3 - Version: 2. Oracle Database 11g SQL AO3 - Version: 2 Oracle Database 11g SQL Oracle Database 11g SQL AO3 - Version: 2 3 days Course Description: This course provides the essential SQL skills that allow developers to write queries against

More information

The Oracle Interview consists of two parts. One for Written test Interview and Another one for HR interview.

The Oracle Interview consists of two parts. One for Written test Interview and Another one for HR interview. Oracle Interview Procedure The Oracle Interview consists of two parts. One for Written test Interview and Another one for HR interview. Written test paper consists of 30 questions. There is No Negative

More information

Oracle EXAM 1Z0-144 Oracle Database 11g: Program with PL/SQL

Oracle EXAM 1Z0-144 Oracle Database 11g: Program with PL/SQL Oracle EXAM 1Z0-144 Oracle Database 11g: Program with PL/SQL Total Questions: 80 Question: 1 View the Exhibit to examine the PL/SQL code: SREVROUPUT is on for the session. Which statement Is true about

More information