Importing SQL Server SQL_VARIANT data type to OrientDB vertex - which property type should I use? - orientdb

I am evaluating OrientDB as a replacement for MS SQL Server. One of the SQL Server tables I need to import into OrientDB contains time-series data with the value column using a SQL_VARIANT data type. I'm struggling to identify the best data type to use for the equivalent property in a new OrientDB vertex. I'm hesitant to convert it a STRING, but I don't see an equivalent variant type. Any recommendations?

OrientDB Teleporter is a tool that synchronizes a RDBMS to OrientDB database. You can use Teleporter to:
Import your existing RDBMS to OrientDB
Keep your OrientDB database synchronized with changes from the RDBMS. In this case the database on RDBMS remains the primary and the database on OrientDB a synchronized copy. Synchronization is one way, so all the changes in OrientDB database will not be propagated to the RDBMS
Teleporter is fully compatible with several RDBMS that have a JDBC driver: we successfully tested Teleporter with Oracle, SQLServer, MySQL, PostgreSQL and HyperSQL. Teleporter manages all the necessary type conversions between the different DBMSs and imports all your data as Graph in OrientDB.
NOTE: This feature is available both for the OrientDB Enterprise Edition and the OrientDB Community Edition. But beware: in community edition you can migrate your source relational database but you cannot enjoy the synchronize feature, only available in the enterprise edition.
How Teleporter works
Teleporter looks for the specific DBMS meta-data in order to perform a logical inference of the source DB schema for the building of a corresponding graph model. Eventually the data importing phase is performed.
Teleporter has a pluggable importing strategy. Two strategies are provided out of the box:
naive strategy, the simplest one
naive-aggregate strategy. It performs a "naive" import of the data source. The data source schema is translated semi-directly in a correspondent and coherent graph model using an aggregation policy on the junction tables of dimension equals to 2
To learn more about the two different execution strategies click here.
For more information: http://orientdb.com/docs/3.0.x/teleporter/Teleporter-Home.html
Hope it helps
Regards

Related

Is pgmodeler only used for PostgreSQL?

pgmodeler is said to be PostgreSQL Database Modeler.
As far as I know it is for relational database design, and relational database design isn't RDMBS specific.
So is pgmodeler only used for PostgreSQL? Can it be used with other RDBMS, such as mysql, sqlserver, oracle database?
What part of pgmodeler is postgresql specific, and what part of it is not?
Thanks.
It is specific to postgresql in the sense that it supports everything that posgresql does : sql extensions ("create table like..."), its procedural language pl/pgsql, foreign data wrappers, table partitioning, among many many others ; and these are usually totally incompatible with other RDBMS.
But the main developper is studying closely an integration with pgloader, which would make such a compatibility a thing in a near future.
If you stick to the pure design features of pgmodeler, "keep it classic" and never go for an implementation, then pgmodeler is somehow universal.
Edit : To answer more precisely, the model is "universal", the code produced when you export the model to a database is specific to postgresql (sql data types, extensions...).

sync normalize tables vs json table in postgresql, so i can use graphql and sql, future neo4j

I have not found real sync from postgreSql to new graph database like neo4j, so I've decide to use same postgresql to sync one normalise tables with json table on the same postgresql with a differenta name for a database. So i have the best of two worlds, sql and nosql database.
When i see sql is more fast than graphql i can choose, and in the future, when i moved the nosql tables to a real graph database like neo4j and i ll be able to sync, i dont need to change the app that can use both database synced
Someone did already this? or it's a dumm idea? Or someone already use automatic libraries to sync from postgresql to neo4j ? and the another sens too ? or must I write sync scripts from scratch if i want to sync two databases?

How to keep oracle and orientdb database in sync?

I want to keep oracle and orientdb databases in near real time sync and vice versa. Is there any tool/ mechanism to follow.
OrientDB had just released a new tool that allows exactly what you want. Its name is Teleporter and you can use it to:
Import your existing RDBMS to OrientDB.
Keep your OrientDB database synchronized with changes from the RDBMS.
This tool supports migration and sync with Oracle, SQLServer, MySQL, PostgreSQL and HSQLDB DBMSs.
Teleported has been released few days ago with the new orientdb 2.2.0-beta version and even though is not yet integrated (it isn't a definitive release) is really easy to insall.
Here is the Teleporter page on orientdb.com:
http://orientdb.com/orientdb-labs/teleporter/
and here you can find the link to the documentation:
https://github.com/orientechnologies/orientdb-labs/blob/master/Teleporter-Index.md

Migrating to a Nosql DB from Oracle

I have a large code base of an online charging application that is tightly coupled to Oracle and relies extensively on SQL queries , PL/SQL procedures etc.
In case , we are to migrate to a NO SQL based DB , would all the code need to be rewritten or are there some already available libraries/drivers that do the job of translation of sql queries to no-sql queries automatically by simply having us define a mapping between the current Oracle Schema and the new underlying NO-SQL DB schema (designed afresh)?
Thanks
You are going to rewrite a lot of things.
Relational database and nosql "things" are so different. And nosql are not transactional, eccept for documents.
You can save money going to mysql or postgresql (suggested) but still you have to implement a lot of things and you need to study proxy, connection pooling when you need to scale.
But, you can save a lot of work with Postgres plus advanced server of enterprise db: http://www.enterprisedb.com/products-services-training/products/postgres-plus-advanced-server
They say you can switch db without a single line to be changed. And save money.
Then you can access things like partitioning that will cost a lot in enterprise version of Oracle.

DB2 external tables?

I just heard that Oracle has a feature called External Table that allows to access a flat file (for example a CSV file in the file system) from the database.
I just want to know if there is something similar in DB2 for LUW.
The closest thing I could see is to implement a Table function (written in Java, for example) that will read the file, and return a table with the data from the file. However, this procedure takes a long time (create the Java code, compile the Java and create the function in DB2 associating the Java class) and the implementation is not dynamic for different files with different quantity of columns (table function returns a predefined set of columns).
Here the documentation of Oracle External Tables: http://docs.oracle.com/cd/B28359_01/server.111/b28319/et_concepts.htm
Yes, IBM offers this as part of their InfoSphere Federation Server, which basically allows you to define nicknames inside a database to various data sources. Supported data sources
IBM Db2 11.5 has support for external tables that will allow you to do this.
This was formerly provided only by Netezza and this functionality has made its way to Db2.
See the manual page for CREATE EXTERNAL TABLE here https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r_create_ext_table.html
As mentioned, InfoSphere Federation Server is a good choice. There are two alternatives for DB2 UDB (Universal Database), which may be helpful in specific use cases:
DataLinks: it is basically another data type
that keeps a reference to your external file. It also provides
several levels of control over external data such as referential
integrity, access control, coordinated backup and recovery, and
transaction consistency.
DB2 Extenders: they extend functionality of the DB2 to operate on specific file formats, e.g. XML Extender provide set of features to operate on XML files inside DB2
There is also:
(a) external table support in the warehousing engine products (Db2 Warehouse, Db2 Warehouse on Cloud) (b) Data virtualization (aka federation/fluid query) in all Db2 products which may achieve the same thing.