tags:

views:

122

answers:

2

I used to use mysql, and in mysql database hold tables, but these concepts doesn't apply to oracle, so I don't quite understand the differences.

Update: The problem I am facing is, I need to do migration from Mysql to Oracle. I have two switching databases called A and B, in Mysql all the tables are in their corresponding databases. In mysql database is a logical concept, it use database to hold tables, in oracle database is physical concept, I don't know how to design this in oracle. Do I need to use "CREATE DATABASE" to create two databases in oracle to achieve the same effect?

+1  A: 

Oracle's SQL Developer documentation has a chapter comparing MySQL with Oracle. Find it here. The reason it is here is because SQL Dev includes the Migration Workbench which supports migrating MySQL to Oracle. You might want to consider using the tool in your endeavours. It is free.

Anyway, the documentation has this answer to your specific question:

"When migrating MySQL databases to Oracle, SQL Developer maps each MySQL database to a tablespace in Oracle. Database objects, such as tables, indexes and views are stored in the respective tablespaces and are referenced from the Oracle schema for the user that owns them."

APC
+1  A: 

To answer your question you want to create a schema (CREATE USER) not an instance/database (CREATE DATABASE).

The Oracle definition of a database is the files on disk. These can be shared between instances (Real Application Clusters) or only used by a single instance (on the same server for example, the most common).

Background: The concept of "database" is different between database vendors. As an Oracle DBA I'm careful when talking to someone who is from an MySQL, DB2, SQL Server background, what they call a "database" in Oracle is a user/schema (difference between user and schema being a schema contains tables and a user is only a login). Whenever someone, developer especially, uses the word "database" question in what context.

Stellios