Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Influence xmltype creation when register XML Schema

656158Aug 21 2008 — edited Sep 17 2008

Hi,

I'm trying to register an XML Schema a little differently from the default Oracle 11 way.

Let say, I've got an element definition in my XML Schema:

<xs:element name="foobar">
  <xs:complexType>
    <xs:all>
      <xs:element name="var_number_one" type="myVar" />
      <xs:element name="var_number_two" type="myVar" minOccurs="0" />
      <xs:element name="var_number_three" type="myVar" />
    ...
      <xs:element name="var_number_onehundredfiftyone" type="myVar" minOccurs="0" />
      <xs:element name="var_number_onehundredfiftytwo" type="myVar" />
    </xs:all>
  </xs:complexType>
</xs:element>

This gets processed by Oracle during the registration process, I use these parameters for registerSchema:

LOCAL      => TRUE,     -- local
GENTYPES   => TRUE,     -- generate object types
GENBEAN    => FALSE,    -- no java beans
GENTABLES  => TRUE,     -- generate object tables
FORCE      => FALSE,
OPTIONS    => DBMS_XMLSCHEMA.REGISTER_AUTO_OOL

The result is that each element gets the following attributes:

oraxdb:propNumber="4986"
oraxdb:global="false"
oraxdb:SQLName="var_number_one"
SQLType="var_number_one928_T"
oraxdb:SQLSchema="SYSTEM"
oraxdb:memType="258"
oraxdb:MemInline="false"
oraxdb:SQLInline="true"
oraxdb:JavaInline="false"

which means that each element (var_number_*) is like an SQL Object column/property in the foobar table/object... right?

Here is what I would like to try, if it is possible at all:

I want the name of the element to be a varchar property/column of each row in the foobar table.

The image attached http://www.flickr.com/photos/23407846@N08/2784396692/sizes/o/ illustrates the current and target situation.

Is it possible to do this by influencing the XML Schema without changing the original xml format, using the oraxdb attributes? Or is their another solution?

Comments

Billy Verreynne

Since Oracle database is not the best place to store video and image in BLOB datyatype
Any evidence to substantiate this claim? Or is it a cyber ninja there must be bamboo in the paper thing??
Come on!!
I'm waiting for some ignoramus to tell me that my APEX video training channel for our corporate customers that plays videos from database BLOBs is a figment of my imagination.
And also justify your double posting https://community.oracle.com/tech/developers/discussion/4486743/java-app-and-video-files-persistent-layer

kazyskiyn0w

HI Billyt
Thank you for your comment.

I just don't understand why you are so aggressive in your post.

My intention is just to do a brainstorm, where people can share their experience, detailing what technologies are the best practices for storing videos.

What I meant when I wrote "Oracle database is not the best technology to store videos" in BLOB format in a transactional database is because it will use a lot of space, and the response time for the query may not be good. But this is just my observation, don't be offended by it.

If you want to share your experience in storing videos in the Oracle database, it will be appreciated.

kazyskiyn0w

If anyone else had a positive experience in storing video on the Oracle database, and could detail how it was implemented and if you had a good response time to query the video in the App, it would be much appreciated.

Billy Verreynne

Criticising the Oracle database as a matter of course without any justification rubs me the wrong way. Especially when this warrantless and evidence lacking statement is made as fact by Java and NoSQL developers that typically are extremely ignorant of the RDBMS technology in general, and of the Oracle database technology specifically.
What I meant when I wrote "Oracle database is not the best technology to store videos" in BLOB format in a transactional database is because it will use a lot of space, and the response time for the query may not be good.
Untrue. You do not understand "transactional". Overheads of a billion transactions on commit is the same as that of a single row. None. The same applies to a 1KB row or a 10GB row. A transaction is not needed for reading a BLOB in order to video play it. And the shared read lock on the row is no different than a shared file lock on a video file on a cooked file system in order to prevent the file from being deleted by one process while being played by another.
BLOBs do not consume more space just because. Default block size is 8KB. Response time is as fast as accessing a video file by path and filename from a cooked file system - if not faster when using raw striped disks via Oracle ASM.
It comes down to optimal and effective I/O. Which the mature Oracle database technology excels at. And that the typical Java developer know nothing of, based on my two decades of experience dealing with Java developers.
The Oracle database has nothing to prove in that it is capable of storing and serving BLOBs effectively and efficiently.
You however needs to proof that this is not the case if you want to dispute it.

kazyskiyn0w

Does anyone else have positive experience in storing videos without using a relational database that can share a real implementation, and not just a speech without having been implemented in a company? I would really appreciate it.

Thanks in advance.

Tim Blackman-Oracle
Answer

Oracle NoSQL Database provides a Large Object interface that is intended to be used to read and write large objects such as audio or video data.
See: https://docs.oracle.com/en/database/other-databases/nosql-database/21.1/java-api/oracle/kv/lob/package-summary.html

Marked as Answer by kazyskiyn0w · Jul 16 2021
kazyskiyn0w

Thanks Tim, that's exactly what I was looking for.

Cheers.

1 - 7
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 15 2008
Added on Aug 21 2008
6 comments
769 views