SlideShare a Scribd company logo
Amity School of Engineering & Technology
1
, "Database Language SQL“
it is not case sensitive
ORACLE
Amity School of Engineering & Technology
• https://drive.google.com/file/d/19si_aseUo
IEsBVM813xFC8fVzvEVm5QV/view
• Oracle 10g Express Edition-
20200223T121416Z-001
• https://docs.microsoft.com/en-us/learn/ce
rtifications/browse/
• https://www.tutorialspoint.com/oracle_term
inal_online.php
• https://livesql.oracle.com/apex/f?p=590:10
00
2
Amity School of Engineering & Technology
SQL
 SQL is a query language for relational databases.
 Contains:
 Data Definition Language to define databases
 Data Manipulation Language to manipulate Databases.
 SQL is widely accepted and is used by most relational
DBMSs.
Amity School of Engineering & Technology
The Importance of SQL
 Since SQL is used in almost all relational databases,
once you know SQL you can probably construct and
manipulate databases in all RDBMs.
 Knowing SQL makes you a (beginning) ORACLE,
Informix, SyBase, AdaBas, Postgres and so on
programmer!
Amity School of Engineering & Technology
Functionalities of SQL
 SQL provides
 On-line and embedded use.
 Precompilation of embedded queries.
 Dynamic database definition and alteration.
 Maintenance of indexes
 View mechanism
 Authorization mechanism
 Automatic concurrency control
 Logging and database recovery
 Report formatting
Amity School of Engineering & Technology
Tables in SQL
• SQL recognizes
 Base Tables
 Real tables that physically exist in the
database. There are physically stored records
and possibly physically stored indexes
directly corresponding to the table
• Views
 Virtual tables that do not physically exist but look to the user
as if they do
Amity School of Engineering & Technology
Languages in SQL
• DDL - Data Defination Languages
Create ,Alter, Drop ,Truncate Commands
• DML - Data Manipulation Language
Update, Insert, Delete Commands
• DQL - Data Query Language
Select
• DCL - Data Control Language
Grant, Revoke
• TCL - Transaction Control Language
Commit, Rollback, Savepoint
Amity School of Engineering & Technology
Oracle 7/8
Database
Oracle Complete Solution
Applications
HR
Financials
Manufacturing
…...
Oracle Developer
Oracle Designer
Oracle Discoverer
SQL SQL* PLUS
PL/SQL
Data
Dictionary
Data
Tables
Amity School of Engineering & Technology
9
SQL (pronounced "ess-que-el") stands for Structured Query
Language. SQL is used to communicate with a database.
According to ANSI (American National Standards Institute),
it is the standard language for relational database management
systems. SQL statements are used to perform tasks such as
update data on a database, or retrieve data from a database.
Some common relational database management systems that use
SQL are: Oracle, Sybase, Microsoft SQL Server, Access, Ingres,
etc.
Although most database systems use SQL, most of them also
have their own additional proprietary extensions that are usually
only used on their system. However, the standard SQL commands
such as "Select", "Insert", "Update", "Delete", "Create", and
"Drop" can be used to accomplish almost everything that one
needs to do with a database. This tutorial will provide you with
the instruction on the basics of each of these commands as well
as allow you to put them to practice using the SQL Interpreter.
Amity School of Engineering & Technology
Drawback of :File Handling :
Data redundancy Data in consistency File format Oracle is platform independent:
Example :DBMSDbase FoxPro
RDBMS
Example :SQL Server Oracle (11.5)Ingress DB2 - IBM Co.Sybase
Maximum 11.5 rules FoxPro
.5 view updation don’t follow1970 - RDBMS - 12 Rules on paper
IBM Corp - Concept of SQLSQL - Recognized standard set
SQL should be the common language for all RDBMS.
History of Oracle :
In 1978 Mr. Edvin founded the Oracle company and its first release was oracle
1.0 which was disaster after it the Oracle corporation has launched Oracle 2.0
in which the database of Oracle was maintained in assembly language.
After it the next measure release was Oracle 3.0 in which the Oracle database
shifted to C-language.
After if the measure release was Oracle 6.0 in which the Oracle kernel was
introduced and the introduction PL/SQL.
10
Amity School of Engineering & Technology
After the measure release was Oracle 7, 7.1, 7.2, 7.3.
In Oracle 7.3 :
The oracle has introduction the networking components and
oracle is dived into two parts
Oracle Server release & Oracle client After it the Oracle has
introduced Oracle 8.0 since Oracle 8.0. It has been converted to
OORDBMS.
After it the Sun Micro System and Oracle Corporation tide up
and release a product Oracle 8i (i-internet). (i - Inbuilt Java
support).After it the Oracle 9i has been introduced in which it
has supported WML (Wireless Markup Language or Mobile
Program).Default Java is Given Oracle 9i -
• ORACLE 10g -the meaning of "g" in oracle 10g is a "Grid
computing".
• ORACLE 11g-Oracle Database 11g Release 2 provides the
foundation for IT to successfully deliver more information with
higher quality of service, reduce the risk of change within IT, and
make more efficient use of IT budgets. 11
Amity School of Engineering & Technology
SQL : connect system (10 g) other scott /tiger
Command base language
DDL - Data Defination Language
DML - Data Manupliation Language
DCL - Data Control Language
DRL - Data Reterial Language
TCL - Transaction Control Language
DDL :
Create
Alter
Drop
DML :
Insertion
Select
Update
Delete
DRL :
Select
DCL :
Grant
Revoke
TCL :
Commit
12
Amity School of Engineering & Technology
• DBMS(data base management systems) and
RDBMS( relational database management system)
the main difference in dbms data is stored in the form
of rows and columns and in the case of rdbms data
stored in the form of tables and data stored in dbms
is temporarly where as in rdbms is permanently eg:
dbms-->sysbase foxpro (some 5-6 rules follow)eg:
rdms-->oracle,sql server
13
Amity School of Engineering & Technology
14
> was developed by IBM Corporation, Inc
> set of commands to access data within the
Oracle database.
> Application programs and Oracle tools often
allow users to access the database without
directly using SQL
> but these applications in turn must use SQL
when executing the user's request.
Structured Query Language (SQL)
Amity School of Engineering & Technology
15
>> It processes sets of data as groups
rather than as individual units.
>> It provides automatic navigation to the
data.
>> Common Language for All Relational
Databases
Features of SQL
Amity School of Engineering & Technology
16
SQL provides commands for a
variety of tasks :
1. Querying data
2. Inserting, updating, and deleting rows
in a table
3. Creating, replacing, altering, and
dropping objects
4. Controlling access to the database and
its objects
5. Guaranteeing database consistency and
integrity
Amity School of Engineering & Technology
17
Datatypes in ORACLE 8
1. CHAR
2. VARCHAR/VARCHAR2
3. NUMBER 4. FLOAT
5. DATE 6. CLOB
7. LONG 8. BLOB
9. RAW 10. BFILE
11. LONG RAW 12. MLSLABLE
13. ROWID
Amity School of Engineering & Technology
18
CHAR
Amity School of Engineering & Technology
Break for 5 Min
19
Amity School of Engineering & Technology
20
VARCHAR/VARCHAR2
• Stores variable-length character
strings
• Allowed length is between 1 and 4000
bytes.
• Usage : varchar2(n)
Amity School of Engineering & Technology
21
NUMBER(P, S)
• Stores fixed and floating point numbers
• Allowed precision is up to 38 digits
& Scale ranges from -84 to 127.
• Allowed range of values is
(+/-) 1 x 10^-130 to
(+/-) 9.99..99 x 10^125.
• Usage : number(p,s), number, number(p)
Amity School of Engineering & Technology
22
FLOAT
• specifies a floating point number with
decimal precision 38, or binary precision
126
• Can have a decimal point anywhere from the
first to the last digit or can omit the decimal
point altogether.
• A scale value is not applicable
• There is no restriction on the number of
digits that can appear after the decimal
point.
Amity School of Engineering & Technology
23
DATE
• For each DATE value the following information is
stored:
century year
month day
hour minute
second
• Stores point-in-time values in a table
• Allowed range of values is between
Jan 1, 4712 B.C. TO Dec 31, 4712 A.D.
• Usage : date.
Amity School of Engineering & Technology
24
LONG
Amity School of Engineering & Technology
25
RAW
• Used for data that is not to be interpreted
(not converted when moving between
different systems) by Oracle. It is used
for storing raw binary data or byte
strings.
• Allowed length is between 1 and 2000
bytes.
• Usage : raw(n)
Amity School of Engineering & Technology
26
LONG RAW
Amity School of Engineering & Technology
27
Restrictions on LONG and
LONG RAW columns
• Only one LONG column per table.
• They cannot be indexed. (Raw can be)
• They cannot have integrity constraints.
• They cannot be used in the WHERE,
GROUP BY, ORDER BY clauses or
DISTINCT operator in SELECT
statements.
Amity School of Engineering & Technology
28
• They cannot be referenced by SQL functions.
• They cannot be used in the SELECT list of a
subquery or queries combined by set
operators (UNION, INTERSECT, MINUS).
• They cannot be used in expressions.
• They cannot be referenced when creating
tables with a query (CREATE TABLE...AS
SELECT..) or when inserting into a table with
a query (INSERT INTO..SELECT..).
Amity School of Engineering & Technology
29
LOB (Large Objects)
• Internal LOB datatypes, BLOB,
CLOB, NCLOB, and external datatype
BFILE, can store large and
unstructured data such as text,
image, video, and spatial data, up to
four gigabytes in size.
Amity School of Engineering & Technology
30
LOB (Large Objects)
• LOBs are similar to LONG and LONG RAW types,
but differ in the following ways:
· Multiple LOBs are allowed in a single row.
· The LOB locator is stored in the table column, either with or
without the actual LOB value; BLOB, NCLOB, and CLOB values
can be stored in separate tablespaces and BFILE data is stored
in an external file on the server.
· When you access a LOB column, it is the locator which is
returned.
· A LOB can be up to four gigabytes in size. BFILE maximum size
is operating system dependent, but cannot exceed four
gigabytes.
· You can select LOB columns and LOB attributes.
Amity School of Engineering & Technology
31
BLOB(Binary Large Object)
Amity School of Engineering & Technology
32
CLOB(Character Large
Object)
Amity School of Engineering & Technology
33
BFILE(Binary File)
• The BFILE datatype enables access
to binary file LOBs that are stored in
filesystems outside the Oracle
database.
• A BFILE column or attribute stores a
BFILE locator, which serves as a
pointer to a binary file on the server's
filesystem.
• The locator maintains the directory
alias and the filename.
Amity School of Engineering & Technology
34
ROWID
Amity School of Engineering & Technology
35
SQL Statements
SELECT Data Retrieval Language (DRL)
INSERT
UPDATE Data Manipulation Language (DML)
DELETE
CREATE
ALTER
DROP Data Definition Language (DDL)
RENAME
TRUNCATE
COMMIT
ROLLBACK Transaction Control Language (TCL)
SAVEPOINT
GRANT Data Control Language (DCL)
REVOKE
Amity School of Engineering & Technology
36
Database Objects

More Related Content

PDF
Sql server difference faqs- 6
PPTX
Introduction to SQL, SQL*Plus
PDF
Unit 3 rdbms study_materials-converted
PDF
Oracle sql in 7 days by suesh.n v 1.0
PPTX
SQL.pptx structure query language in database management system
PPTX
SQL-1.pptx for database system and system query language
PDF
Sql tutorial
PDF
Dbmsunit v
Sql server difference faqs- 6
Introduction to SQL, SQL*Plus
Unit 3 rdbms study_materials-converted
Oracle sql in 7 days by suesh.n v 1.0
SQL.pptx structure query language in database management system
SQL-1.pptx for database system and system query language
Sql tutorial
Dbmsunit v

Similar to 1 August part 1basic SQL Lab PPT FORMAT.pptx (20)

PDF
Oracle Introduction
PDF
SQL cheat sheet.pdf
PPTX
Pl sql content
DOCX
DATABASE MANAGEMENT SYSTEM
PDF
Database Management system lecture note.
PPTX
Structured query language
PDF
SQL Intro
PDF
Database Systems - Introduction to SQL (Chapter 3/1)
PPT
PO WER - Piotr Mariat - Sql
DOCX
Database Management Lab -SQL Queries
PPTX
DEE 431 Introduction to Mysql Slide 3
PDF
Bases de datos, clases, metodos y teoria
PPTX
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
PPTX
SQL commands powerpoint presentation. Ppt
PDF
UNIT 3 SQL 10.pdf ORACEL DATABASE QUERY OPTIMIZATION
PPTX
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
PPTX
unit-ii.pptx
PPTX
Introduction to Oracle Database
DOC
Oracle notes
DOC
Dbms Lecture Notes
Oracle Introduction
SQL cheat sheet.pdf
Pl sql content
DATABASE MANAGEMENT SYSTEM
Database Management system lecture note.
Structured query language
SQL Intro
Database Systems - Introduction to SQL (Chapter 3/1)
PO WER - Piotr Mariat - Sql
Database Management Lab -SQL Queries
DEE 431 Introduction to Mysql Slide 3
Bases de datos, clases, metodos y teoria
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
SQL commands powerpoint presentation. Ppt
UNIT 3 SQL 10.pdf ORACEL DATABASE QUERY OPTIMIZATION
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
unit-ii.pptx
Introduction to Oracle Database
Oracle notes
Dbms Lecture Notes
Ad

Recently uploaded (20)

PDF
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
PDF
Categorization of Factors Affecting Classification Algorithms Selection
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
DOCX
573137875-Attendance-Management-System-original
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPT
Total quality management ppt for engineering students
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PPTX
Sustainable Sites - Green Building Construction
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
Current and future trends in Computer Vision.pptx
PPTX
UNIT 4 Total Quality Management .pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
737-MAX_SRG.pdf student reference guides
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
Categorization of Factors Affecting Classification Algorithms Selection
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
573137875-Attendance-Management-System-original
Embodied AI: Ushering in the Next Era of Intelligent Systems
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Total quality management ppt for engineering students
CYBER-CRIMES AND SECURITY A guide to understanding
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
Sustainable Sites - Green Building Construction
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
R24 SURVEYING LAB MANUAL for civil enggi
Current and future trends in Computer Vision.pptx
UNIT 4 Total Quality Management .pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
737-MAX_SRG.pdf student reference guides
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
Ad

1 August part 1basic SQL Lab PPT FORMAT.pptx

  • 1. Amity School of Engineering & Technology 1 , "Database Language SQL“ it is not case sensitive ORACLE
  • 2. Amity School of Engineering & Technology • https://drive.google.com/file/d/19si_aseUo IEsBVM813xFC8fVzvEVm5QV/view • Oracle 10g Express Edition- 20200223T121416Z-001 • https://docs.microsoft.com/en-us/learn/ce rtifications/browse/ • https://www.tutorialspoint.com/oracle_term inal_online.php • https://livesql.oracle.com/apex/f?p=590:10 00 2
  • 3. Amity School of Engineering & Technology SQL  SQL is a query language for relational databases.  Contains:  Data Definition Language to define databases  Data Manipulation Language to manipulate Databases.  SQL is widely accepted and is used by most relational DBMSs.
  • 4. Amity School of Engineering & Technology The Importance of SQL  Since SQL is used in almost all relational databases, once you know SQL you can probably construct and manipulate databases in all RDBMs.  Knowing SQL makes you a (beginning) ORACLE, Informix, SyBase, AdaBas, Postgres and so on programmer!
  • 5. Amity School of Engineering & Technology Functionalities of SQL  SQL provides  On-line and embedded use.  Precompilation of embedded queries.  Dynamic database definition and alteration.  Maintenance of indexes  View mechanism  Authorization mechanism  Automatic concurrency control  Logging and database recovery  Report formatting
  • 6. Amity School of Engineering & Technology Tables in SQL • SQL recognizes  Base Tables  Real tables that physically exist in the database. There are physically stored records and possibly physically stored indexes directly corresponding to the table • Views  Virtual tables that do not physically exist but look to the user as if they do
  • 7. Amity School of Engineering & Technology Languages in SQL • DDL - Data Defination Languages Create ,Alter, Drop ,Truncate Commands • DML - Data Manipulation Language Update, Insert, Delete Commands • DQL - Data Query Language Select • DCL - Data Control Language Grant, Revoke • TCL - Transaction Control Language Commit, Rollback, Savepoint
  • 8. Amity School of Engineering & Technology Oracle 7/8 Database Oracle Complete Solution Applications HR Financials Manufacturing …... Oracle Developer Oracle Designer Oracle Discoverer SQL SQL* PLUS PL/SQL Data Dictionary Data Tables
  • 9. Amity School of Engineering & Technology 9 SQL (pronounced "ess-que-el") stands for Structured Query Language. SQL is used to communicate with a database. According to ANSI (American National Standards Institute), it is the standard language for relational database management systems. SQL statements are used to perform tasks such as update data on a database, or retrieve data from a database. Some common relational database management systems that use SQL are: Oracle, Sybase, Microsoft SQL Server, Access, Ingres, etc. Although most database systems use SQL, most of them also have their own additional proprietary extensions that are usually only used on their system. However, the standard SQL commands such as "Select", "Insert", "Update", "Delete", "Create", and "Drop" can be used to accomplish almost everything that one needs to do with a database. This tutorial will provide you with the instruction on the basics of each of these commands as well as allow you to put them to practice using the SQL Interpreter.
  • 10. Amity School of Engineering & Technology Drawback of :File Handling : Data redundancy Data in consistency File format Oracle is platform independent: Example :DBMSDbase FoxPro RDBMS Example :SQL Server Oracle (11.5)Ingress DB2 - IBM Co.Sybase Maximum 11.5 rules FoxPro .5 view updation don’t follow1970 - RDBMS - 12 Rules on paper IBM Corp - Concept of SQLSQL - Recognized standard set SQL should be the common language for all RDBMS. History of Oracle : In 1978 Mr. Edvin founded the Oracle company and its first release was oracle 1.0 which was disaster after it the Oracle corporation has launched Oracle 2.0 in which the database of Oracle was maintained in assembly language. After it the next measure release was Oracle 3.0 in which the Oracle database shifted to C-language. After if the measure release was Oracle 6.0 in which the Oracle kernel was introduced and the introduction PL/SQL. 10
  • 11. Amity School of Engineering & Technology After the measure release was Oracle 7, 7.1, 7.2, 7.3. In Oracle 7.3 : The oracle has introduction the networking components and oracle is dived into two parts Oracle Server release & Oracle client After it the Oracle has introduced Oracle 8.0 since Oracle 8.0. It has been converted to OORDBMS. After it the Sun Micro System and Oracle Corporation tide up and release a product Oracle 8i (i-internet). (i - Inbuilt Java support).After it the Oracle 9i has been introduced in which it has supported WML (Wireless Markup Language or Mobile Program).Default Java is Given Oracle 9i - • ORACLE 10g -the meaning of "g" in oracle 10g is a "Grid computing". • ORACLE 11g-Oracle Database 11g Release 2 provides the foundation for IT to successfully deliver more information with higher quality of service, reduce the risk of change within IT, and make more efficient use of IT budgets. 11
  • 12. Amity School of Engineering & Technology SQL : connect system (10 g) other scott /tiger Command base language DDL - Data Defination Language DML - Data Manupliation Language DCL - Data Control Language DRL - Data Reterial Language TCL - Transaction Control Language DDL : Create Alter Drop DML : Insertion Select Update Delete DRL : Select DCL : Grant Revoke TCL : Commit 12
  • 13. Amity School of Engineering & Technology • DBMS(data base management systems) and RDBMS( relational database management system) the main difference in dbms data is stored in the form of rows and columns and in the case of rdbms data stored in the form of tables and data stored in dbms is temporarly where as in rdbms is permanently eg: dbms-->sysbase foxpro (some 5-6 rules follow)eg: rdms-->oracle,sql server 13
  • 14. Amity School of Engineering & Technology 14 > was developed by IBM Corporation, Inc > set of commands to access data within the Oracle database. > Application programs and Oracle tools often allow users to access the database without directly using SQL > but these applications in turn must use SQL when executing the user's request. Structured Query Language (SQL)
  • 15. Amity School of Engineering & Technology 15 >> It processes sets of data as groups rather than as individual units. >> It provides automatic navigation to the data. >> Common Language for All Relational Databases Features of SQL
  • 16. Amity School of Engineering & Technology 16 SQL provides commands for a variety of tasks : 1. Querying data 2. Inserting, updating, and deleting rows in a table 3. Creating, replacing, altering, and dropping objects 4. Controlling access to the database and its objects 5. Guaranteeing database consistency and integrity
  • 17. Amity School of Engineering & Technology 17 Datatypes in ORACLE 8 1. CHAR 2. VARCHAR/VARCHAR2 3. NUMBER 4. FLOAT 5. DATE 6. CLOB 7. LONG 8. BLOB 9. RAW 10. BFILE 11. LONG RAW 12. MLSLABLE 13. ROWID
  • 18. Amity School of Engineering & Technology 18 CHAR
  • 19. Amity School of Engineering & Technology Break for 5 Min 19
  • 20. Amity School of Engineering & Technology 20 VARCHAR/VARCHAR2 • Stores variable-length character strings • Allowed length is between 1 and 4000 bytes. • Usage : varchar2(n)
  • 21. Amity School of Engineering & Technology 21 NUMBER(P, S) • Stores fixed and floating point numbers • Allowed precision is up to 38 digits & Scale ranges from -84 to 127. • Allowed range of values is (+/-) 1 x 10^-130 to (+/-) 9.99..99 x 10^125. • Usage : number(p,s), number, number(p)
  • 22. Amity School of Engineering & Technology 22 FLOAT • specifies a floating point number with decimal precision 38, or binary precision 126 • Can have a decimal point anywhere from the first to the last digit or can omit the decimal point altogether. • A scale value is not applicable • There is no restriction on the number of digits that can appear after the decimal point.
  • 23. Amity School of Engineering & Technology 23 DATE • For each DATE value the following information is stored: century year month day hour minute second • Stores point-in-time values in a table • Allowed range of values is between Jan 1, 4712 B.C. TO Dec 31, 4712 A.D. • Usage : date.
  • 24. Amity School of Engineering & Technology 24 LONG
  • 25. Amity School of Engineering & Technology 25 RAW • Used for data that is not to be interpreted (not converted when moving between different systems) by Oracle. It is used for storing raw binary data or byte strings. • Allowed length is between 1 and 2000 bytes. • Usage : raw(n)
  • 26. Amity School of Engineering & Technology 26 LONG RAW
  • 27. Amity School of Engineering & Technology 27 Restrictions on LONG and LONG RAW columns • Only one LONG column per table. • They cannot be indexed. (Raw can be) • They cannot have integrity constraints. • They cannot be used in the WHERE, GROUP BY, ORDER BY clauses or DISTINCT operator in SELECT statements.
  • 28. Amity School of Engineering & Technology 28 • They cannot be referenced by SQL functions. • They cannot be used in the SELECT list of a subquery or queries combined by set operators (UNION, INTERSECT, MINUS). • They cannot be used in expressions. • They cannot be referenced when creating tables with a query (CREATE TABLE...AS SELECT..) or when inserting into a table with a query (INSERT INTO..SELECT..).
  • 29. Amity School of Engineering & Technology 29 LOB (Large Objects) • Internal LOB datatypes, BLOB, CLOB, NCLOB, and external datatype BFILE, can store large and unstructured data such as text, image, video, and spatial data, up to four gigabytes in size.
  • 30. Amity School of Engineering & Technology 30 LOB (Large Objects) • LOBs are similar to LONG and LONG RAW types, but differ in the following ways: · Multiple LOBs are allowed in a single row. · The LOB locator is stored in the table column, either with or without the actual LOB value; BLOB, NCLOB, and CLOB values can be stored in separate tablespaces and BFILE data is stored in an external file on the server. · When you access a LOB column, it is the locator which is returned. · A LOB can be up to four gigabytes in size. BFILE maximum size is operating system dependent, but cannot exceed four gigabytes. · You can select LOB columns and LOB attributes.
  • 31. Amity School of Engineering & Technology 31 BLOB(Binary Large Object)
  • 32. Amity School of Engineering & Technology 32 CLOB(Character Large Object)
  • 33. Amity School of Engineering & Technology 33 BFILE(Binary File) • The BFILE datatype enables access to binary file LOBs that are stored in filesystems outside the Oracle database. • A BFILE column or attribute stores a BFILE locator, which serves as a pointer to a binary file on the server's filesystem. • The locator maintains the directory alias and the filename.
  • 34. Amity School of Engineering & Technology 34 ROWID
  • 35. Amity School of Engineering & Technology 35 SQL Statements SELECT Data Retrieval Language (DRL) INSERT UPDATE Data Manipulation Language (DML) DELETE CREATE ALTER DROP Data Definition Language (DDL) RENAME TRUNCATE COMMIT ROLLBACK Transaction Control Language (TCL) SAVEPOINT GRANT Data Control Language (DCL) REVOKE
  • 36. Amity School of Engineering & Technology 36 Database Objects