I am trying copy an oracle table into postgres. One of the columns in the oracle table is of "sdo_geometry" type. I want to know what is the equivalent for that data type in postgresql and how I can copy that data into my postgres table and if it requires any transformation etc. I am not looking for any migration tool as it is just one table and I am manually copying the data which is very small in size.
Thanks!
PostgreSQL has a number of geometrical data types built in, see the documentation. These offer limited functionality, but if these types and the functions and operators available for them do the trick for you, it would be the simplest solution.
If you need more advanced geometry support, you'll have to install the PostGIS extension.
Related
I have a MariaDB database which uses dynamic columns.
There are around 10 such columns, because the data comes from many different devices and each of the device has different attributes. The devices send some binary data which is converted into csv and then inserted. I don't have control over this at all.
Now I am planning to migrate to oracle database 12.2 but not sure how to migrate the dynamic columns to Oracle. Any ideas please?
Oracle RDBMS doesn't support this feature natively, so you will have to write some procedures to implement something analogous to the MariaDB calls.
The closest functionality to dynamic columns is JSON. You're moving to Oracle 12.2 which has pretty JSON support. Find out more. Unless your data is very complicated with lots of nesting it should be trivial to turn CSV into JSON. Once you have JSON is easy to insert, maintain and retrieve the data using Oracle's functionality.
Hi I have to take the sdo_geometry field from an Oracle database and transfer the data to a SQL database (probably a geometry spatial data type). Could you help me on how to use FME for that purpose? Do I need FME to do this?
FME will certainly help make things easier, but it's possible to do your data ETL without it. You'll need to handle each of the different OGS types yourself, if you want to get around having to use a tool that is aware of the geometric datatypes like FME.
I am new to Oracle. Since we have rewritten an earlier application , we have to migrate the data from the earlier database in Oracle 9i to a new database , also in 9i, with totally different structures. The column names and types would be totally different. We need to map the tables and columns , try to export as much data as possible, eliminate duplicates, and fill empty values with defaults.
Are there any tools which can help in mapping the elements of the 2 databases , with rules to handle duplicates, and default values and migrate the data ?
Thanks,
Chak.
If your goal is to migrate data between two very different schemas you will probably need an ETL solution (ETL=Extract Transform Load).
An ETL will allow you to:
Select data from your source database(s) [Extract]
apply business logic to the selected data [Transform] (deal with duplicates, default values, map source tables/columns with destination tables/columns...)
insert the data into the new database [Load]
Most ETLs also allow some kind of automatisation and reporting of the loads (bad/discarded rows...)
Oracle's ETL is called Oracle Warehouse Builder (OWB). It is included in the Database licence and you can download it from the Oracle website. As most Oracle products it is powerful but the learning curve is a bit steep.
You may want to look into the [ETL] section here in SO, among others:
What ETL tool do you use?
ETL tools… what do they do exactly? In laymans terms please.
In many cases, creating a database link and some scripts a'la
insert into newtable select distinct foo, bar, 'defaultvalue' from oldtable#olddatabase where xxx
should do the trick
please help me connect spatials to oracle 10g XE
where can i find fun things to do with oracle spatial?
First, bookmark the reference, these are invaluable when you are writing spatial queries. If you it to be fast (particularly with joins) make sure you use SDO_RELATE (it was in the order of 100-1000x faster for spanning linestrings for me [over SDO_GEOM.RELATE oops]).
Second, Download SQL Developer (don't download 1.x, you will hate it), it will list the geometry column in its component parts instead of barfing at it like most utilities I have tried. So you don't need to spend time looking at the raw points, etc. When creating a geometry column, select the complex option, go to the MDSYS schema then scroll to SDO_GEOMETRY. When creating indexes for the spatial column click domain -> MDSYS then you should have RTREE and SPATIAL types. SDO_GEOMETRY also works as a type so you can pass it to and from procedures and functions within oracle.
As for what to do, that is up to you. I have done everything from making a service availability tool to writing utilities to span over linestrings with stop conditions. In most cases it will depend on your target field as to what is considered nifty and shiny.
Perhaps this might be of help:
Build a Google Earth Interface on Oracle Database XE
Ok the question is obviously wrong as it stands, but I'm wondering how can I choose storage implementations on Oracle as I would for MySQL, say I want one table to MyIsam like and another for Archiving only and one Black Hole style for test purposes. How would I go around to doing this within a single Schema, or something similar that would meet these needs?
Oracle does not have a storage engine concept like Mysql does. It stores all tables in its own format in datafiles. What you can do is use different tablespaces and store them on different disks whose performance characteristics may be different.
The concepts guide may help you understand how Oracle works.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/toc.htm
You may use ORGANIZATION EXTERNAL:
CREATE TABLE ORGANIZATION EXTERNAL
and select an access driver to use with it.
As for now, Oracle has ORACLE_LOADER to access CSV and like text tables (read-only), and ORACLE_DATAPUMP to read and write binary data (in custom format).