Oracle equivalent of PostgreSQL Hstore - oracle

Hstore is a schema less key value store inside of PostgreSQL that allows us to store data like hashes directly inside of a column
More infor here
http://schneems.com/post/19298469372/you-got-nosql-in-my-postgres-using-hstore-in-rails
What is the equivalent of this in Oacle 11g

Oracle offer a "Big Data" NoSQL system, but not as part of the relational DBMS
http://www.oracle.com/us/products/database/nosql/overview/index.html

Related

Is there any performance loss when using ANSI data types in Oracle?

If I use any ANSI supported data types like INTEGER, NUMERIC, REAL etc., as a data type for a column, or a variable in PL/SQL, will it have an additional cost for the database?
What are the pros and cons for using the ANSI supported data types in Oracle database? (Database Version: 19c)
ANSI data-types are just aliases for Oracle data types and will be converted to the equivalent Oracle data type.
From the documentation:
ANSI, DB2, and SQL/DS Data Types
SQL statements that create tables and clusters can also use ANSI data types and data types from the IBM products SQL/DS and DB2. Oracle recognizes the ANSI or IBM data type name that differs from the Oracle Database data type name. It converts the data type to the equivalent Oracle data type, records the Oracle data type as the name of the column data type, and stores the column data in the Oracle data type based on the conversions shown in the tables that follow.
ANSI SQL Data Type
Oracle Data Type
NUMERIC[(p,s)]DECIMAL[(p,s)] (Note 1)
NUMBER(p,s)
INTEGERINTSMALLINT
NUMBER(38)
FLOAT (Note 2)DOUBLE PRECISION (Note 3)REAL (Note 4)
FLOAT(126)FLOAT(126)FLOAT(63)
What are the pros and cons for using the ANSI supported data types in Oracle database?
There are no performance benefits or penalties as the type will be converted to the equivalent Oracle type. The main benefit would be the portability of code between different RDBMS.

How to generate DDL scripts from tables in Oracle NoSql?

I have some tables with huge columns (more than 600 columns) and don't have DDL(create table) scripts for it. I can create the script by seeing the table schema using DESCRIBE keyword in oracle nosql, but it's a huge pain in the back because of manual operation.
Is there any way to generate DDL scripts for existing tables in Oracle NoSql database?
There is no way to do this at this time. It's being considered as an extension to the sql shell. One option in user code would be to use the "describe as json ..." call and parse the JSON description of the table to construct the DDL string

Query JSONB through dblink (Oracle <> Postgres)

We have a local db (Oracle) where we want to query a remote db (postgres), the data to be retreived is in JSONB format.
What is the best way for achieving this ?
The tool for accessing PostgreSQL from Oracle database is GoldenGate.
The 12.2 documentation does not even list the jsonb data type, so it is probably is not supported (I guess Oracle didn't check PostgreSQL's documentation since 9.2, when json was introduced).
But then Oracle doesn't have a special JSON data type anyway, it stores JSON as VARCHAR2 or CLOB, so you can easily use a view in PostgreSQL that casts the jsonb to text and use that.

How to copy bytea from Postgres to Oracle

I have a Postgres 9.1 table plines with a bytea field shape.
Number of records is about 500000.
What is the best way to copy bytea data plines.shape from Postgres to a field shape of an Oracle 10g table olines?
Thank you in advance, ysa
I'd create a program in Java which would connect to PostgreSQL (using JDBC PostgreSQL driver) and Oracle (using Oracle Instant Client) simultaneously and then read a row from Postgres, put this row to Oracle table, repeat.
This would be much easier the other way around... ;-)

How to read NCLOB, CLOB data values from Oracle database using Classic ASP pages?

I am getting the following error:
Microsoft OLE DB Provider for Oracle: Data type is not supported.
Could somebody help me figure out this please...
Situation:
Recently migrated database from SQL Server 2005 to Oracle 11g. One of the table has some columns of the data type ntext in SQL Server, which were converted to NCLOB during migration to Oracle. Client is Classic ASP page (VBScript) accessing the Oracle Database through OLEDB connection.
When the execution reaches the query (Select query) that reads the column of type NCLOB it is throwing the Microsoft OLE DB Provider for Oracle: Data type is not supported error. When I take out that particular column then the query is running fine...
QUESTION: How to read NCLOB, CLOB data values from Classic ASP pages?
Plz let me know if you need more information.....
Thank You..
I know that Microsoft's ODBC Driver for Oracle didn't support any of the LOB types-- I would wager that its OLE DB Provider didn't either given the error. Can you upgrade to the Oracle OLE DB Provider?
As an aside, since you are migrating from SQL Server to Oracle, do you really need to use the NCLOB data type? Since Oracle allows the database character set to be Unicode, you normally don't need (and don't want) to use the NVARCHAR2 or NCLOB data types unless you're stuck supporting an old database that requires a non-Unicode character set. For data that is English or Western Eurpoean in nature, storing data in a CLOB has substantial benefits in terms of storage space since the CLOB would store the data in UTF-8 rather than UTF-16 in an NCLOB (assuming that you picked a Unicode character set for the database). Eliminating the NVARCHAR2 and NCLOB columns also tends to make it much easier for front-end tools to handle the data.

Resources