EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 360+ Courses All in One Bundle
  • Login
Home Data Science Data Science Tutorials Oracle Tutorial Oracle XML
Secondary Sidebar
Oracle Tutorial
  • Advanced
    • Timestamp to Date in Oracle
    • Oracle Golden Gate
    • Oracle Virtual Machine
    • Oracle Describe Table
    • Oracle Clauses
    • Oracle Having Clause
    • Oracle?Primavera
    • Oracle FOREIGN Key
    • PIVOT in Oracle
    • Oracle Alter Table
    • Oracle Queries
    • Oracle Views
    • Oracle Window Functions
    • Oracle String Functions
    • Oracle Date Functions
    • Oracle Analytic Functions
    • Oracle Aggregate Functions
    • Select in Oracle
    • INSERT in Oracle
    • DISTINCT in Oracle
    • Function in Oracle
    • Oracle GROUP_CONCAT
    • Oracle INSTR()
    • Oracle CONVERT
    • Oracle LENGTH()
    • Oracle EXISTS
    • Oracle REPLACE()
    • Oracle MERGE
    • Oracle LEAD()
    • Oracle EXTRACT()
    • Oracle LISTAGG()
    • Oracle SYS_CONTEXT()
    • Oracle COALESCE
    • Oracle NVL()
    • Oracle SYSDATE()
    • Oracle?Date Format
    • Oracle SYS_GUID()
    • Oracle WILDCARDS
    • Oracle Synonyms
    • Oracle Subquery
    • BETWEEN in Oracle
    • FETCH in Oracle
    • Oracle Index
    • Oracle Function-based Index
    • Oracle UNIQUE Index
    • Oracle Bitmap Index
    • Oracle Column
    • Oracle Triggers
    • Oracle Procedures
    • Sample Database for Oracle
    • Oracle LIKE Operator
    • ORDER BY in Oracle
    • Oracle ORDER BY DESC
    • GROUP BY in Oracle
    • Oracle GROUP BY HAVING
    • Oracle Aliases
    • Table in Oracle
    • Oracle Temporary Table
    • Oracle? Table Partition
    • Oracle rename table
    • Oracle CTE
    • Cursor in Oracle
    • Oracle LOCK TABLE
    • Oracle Tablespace
    • Oracle CARDINALITY
    • Oracle REGEXP
    • Oracle REGEXP_REPLACE
    • Oracle to_date
    • JSON in Oracle
    • Oracle COMMIT
    • Oracle GRANT
    • Oracle MD5
    • Oracle ROLLBACK
    • Oracle Users
    • Oracle TIMESTAMP
    • IF THEN ELSE in Oracle
    • Oracle While Loop
    • Oracle Clone Database
    • Oracle Backup Database
    • Oracle? XML
    • Oracle XMLAGG
    • Oracle XMLTABLE
    • Oracle Performance Tuning
    • Oracle B Tree Index
    • Oracle fusion
    • Oracle ebs
    • Oracle GRC
    • Oracle ERP
    • Oracle ASM
    • Oracle Cloud
    • Oracle HCM Cloud
    • Oracle Integration Cloud
    • Oracle Jinitiator
    • Oracle pathfinder
    • Oracle VirtualBox
    • Oracle Weblogic Server
    • Oracle decode
    • Oracle Exadata
    • Oracle ZFS
    • Oracle? utilities
    • JDBC Driver for Oracle
    • Oracle? DBA Versions
    • Oracle DBA Salary
  • Basic
    • Oracle Marketing Cloud
    • What is Oracle?
    • Career in Oracle
    • How to Install Oracle
    • Oracle Versions
    • What Is Oracle Database
    • Oracle Data Warehousing
    • Oracle Warehouse Builder
    • Career In Oracle Database Administrator
    • Career In Oracle DBA
    • What is Oracle RAC
    • Oracle DBA
    • Oracle? Vanderbilt
    • What is RMAN Oracle
    • Oracle Database Administration
    • Oracle Operators
    • Oracle Constraints
    • Oracle number
    • Oracle Data Types
    • Oracle UNIQUE Constraint
    • Oracle Check Constraint
  • Joins
    • Joins in Oracle
    • Inner Join in Oracle
    • Oracle Cross Join
    • Left Join in Oracle
    • OUTER Join in Oracle
    • Oracle Full Outer Join
    • Natural Join in Oracle
    • Oracle Self Join
    • Oracle hash join
    • Oracle? Update with Join
  • Oracle SET Operators
    • UNION in Oracle
    • Oracle UNION ALL
    • INTERSECT in Oracle
    • MINUS in Oracle
  • Interview Questions
    • Oracle Interview Questions
    • Oracle Apps Interview Questions
    • Oracle Apps Technical Interview Questions
    • Oracle Database Interview Questions
    • Oracle Forms Interview Questions
    • Oracle PL/SQL Interview Questions
    • Oracle RAC Interview Questions
    • Oracle SOA Interview Questions

Related Courses

Oracle Course Training

Oracle DBA Certification Course

MongoDB Certification Training

Oracle XML

By Sohel SayyadSohel Sayyad

Oracle XML

Definition on Oracle XML

Oracle XML means it is a database name related to high-performance XML storage and data retrieval. Basically, oracle XAML is supported for both SQL and XML data models in an interchangeable manner. The XML schema is a standard access method for navigating and executing queries with XML. With the help of XML, we can perform different operations such as insert, delete and update as well as we are also able to perform the different operations on SQL data. The oracle XML supports the different data types such as abstract SQL data type, XMLType for XML data. The main feature of oracle databases is reliability, availability, scalability, and security. When we talk about the architecture of oracle XML then it uses the repository to store any type of data or document including the XML document associated with XML schema.

Syntax:

create table specified table name of XMLTYPE;

Explanation

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

In the above syntax we use create table statement, here specified table name means actual table name that we need to create, and XMLTYPE is used as a column name.

How XML work in Oracle?

It has mainly two features as follows.

  1. XMLType tables and views
  2. Oracle XML DB Repository.

XMLType Storage

When we register an XML schema with Oracle XML DB, then by default tables are created and it is used to store XML instance documents associated with that schema and we can access this document or we can view that document in the Oracle XML DB repository. XMLType tables and columns are used to store large object values or we say that set of values. When we store the set of objects then we refer to structured or shredded storage. The data XMLType views can be stored in remote tables as well as local tables and remote tables are accessed with the help of database links.

XMLType and view uses B* tree, oracle text for index purpose as well as we can also use function-based index or bitmap index.

For accessing data in Oracle XML DB Repository we use different protocols as follows.

  1. HTTP protocol.
  2. WebDAV and FTP protocol server.
  3. Java Database Connectivity through Oracle Net Services.
  4. Oracle XML supports the data messaging oracle streams advanced query and web services.

We required a different API for XML as follows.

All in One Data Science Bundle(360+ Courses, 50+ projects)
Python TutorialMachine LearningAWSArtificial Intelligence
TableauR ProgrammingPowerBIDeep Learning
Price
View Courses
360+ Online Courses | 50+ projects | 1500+ Hours | Verifiable Certificates | Lifetime Access
4.7 (86,171 ratings)
  1. XMLType: With the help of this API we can perform different operations on XMLType such as data validation and data transformation.
  2. Database URI types: This API is used for different URI types.
  3. DBMS_XDBT: it is used to create indexes in repository resources.
  4. DBMS_XDBZ: this API is used for repository-based security.
  5. DBMS_XMLPARSER: This API is used to implement DOM parser.
  6. DBMS_XMLQUERY: this API is used to provide database to XML type functionality.
  7. DBMS_XMLSTORE: This API is used to store the XML data in relational tables.
  8. DBMS_XSLPROCESSOR: this is used to implement XSLT processor.
  9. DBMS_XDB: This API is used to manage the Oracle XML DB repository resource.
  10. DBMS_XDB_VERSION: It is also used to manage the repository resources.
  11. DBMS_XMLDOM: it is used to implement the DOM API for XMLType.
  12. DBMS_XMLGEN: with help this API we can transform SQL query into the canonical XML format.
  13. DBMS_XMLSAVE: this API used to provide XML to database type functionality.
  14. DBMS_XMLSCHEMA: This API is used to manage the XML schemas.

XML Schema Catalog Views

USER_XML_SCHEMAS: This is used to register XML schemas owned by the user.

ALL_XML_SCHEMAS: This is used to register XML schemas in usable format by the current user.

DBA_XML_SCHEMAS: it is used to register schemas in Oracle XML DB.

Oracle XML DB Repository

Repository is a component of Oracle database that helps to handle XML data using a file or folder and it has the following properties as follows.

  • It is used to define the path and name.
  • It also has system-defined metadata such as owner and creation date as well as it also has user-defined metadata.

Examples

Now let’s see a different example as follows.

CREATE TABLE sampleXML OF XMLTYPE;

Explanation

In the above example, we use the create table command to create a new table name as sampleXML, here OF is keyword and XMLTYPE is a column of sampleXML table as shown in the above statement. The end output of the above query we illustrate by using the following snapshot.

oracle 1

Now insert some records by using XML as follows.

INSERT INTO sampleXML VALUES
(xmltype('<?xml version="1.0"?>
<Home>
<HomeID>1</HomeID>
<HomeName>Jalsa, ABC</ HomeName >
<HomeNO>20</HomeNO>
<HomeArea>35000</HomeArea>
<Street>M.G Road</Street>
<HomeWaterAccess>true</HomeWaterAccess>
<RailAccessLocation>Near</RailAccessLocation>
<Parking>Yes</Parking>
<Clearance>20</Clearance>
</Home>'));

Explanation

In the above statement, we use insert into statement to insert records into the sample XML table by using XML schema as shown in the above statement. In this example, we implement an XMLType table. The end output of the above query we illustrate by using the following snapshot.

row insert

We can use the following query for cross-checking as follows.

SELECT e.getClobVal() FROM sampleXML e;

Explanation

The end output of the above query we illustrate by using the following snapshot.

Oracle XML 2

Oracle stores the data in the CLOB column, which means it is a restriction on the LOB column to avoid this problem, to create tables by using an XML schema-based table. This schema map XML element with their object relation equivalent.

Rules and Regulations

  1. Basically, oracle XML is suitable for any type of application where all data is processed by using the XML.
  2. We required high-performance retrieval of XML documents.
  3. We must have high-performance indexing and searching of oracle XML documents.
  4. We set design parameters such as Data, Access, processing, storage, and Application language.
  5. If our data is not XML schema-based at that time we can use XMLType table or view.
  6. We need to define access models.
  7. We also need to define processing models.
  8. We need to define an Oracle XML storage option for the XMLType table and view.

Conclusion

We hope from this article you have understood about the Oracle XML. From this article, we have learned the basic syntax and we also see different examples. From this article, we learned how and when to use.

Recommended Articles

This is a guide to Oracle XML. Here we discuss the definition, syntax, types, How XML work in Oracle? and examples with code implementation respectively. You may also have a look at the following articles to learn more –

  1. Oracle Clone Database
  2. Oracle SYS_GUID()
  3. Oracle Tablespace
  4. Oracle INSTR()
Popular Course in this category
Oracle Training (14 Courses, 8+ Projects)
  14 Online Courses |  8 Hands-on Projects |  120+ Hours |  Verifiable Certificate of Completion
4.5
Price

View Course

Related Courses

Oracle DBA Database Management System Training (2 Courses)4.9
All in One Financial Analyst Bundle- 250+ Courses, 40+ Projects4.8
0 Shares
Share
Tweet
Share
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Database Management
  • Machine Learning
  • All Tutorials
Certification Courses
  • All Courses
  • Data Science Course - All in One Bundle
  • Machine Learning Course
  • Hadoop Certification Training
  • Cloud Computing Training Course
  • R Programming Course
  • AWS Training Course
  • SAS Training Course

ISO 10004:2018 & ISO 9001:2015 Certified

© 2022 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA
Free Data Science Course

SPSS, Data visualization with Python, Matplotlib Library, Seaborn Package

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more