4

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?

2
  • 1
    I think you'll find Oracle does indeed have the notion of 'table'. Perhaps you could be more specific about the difficulty you are having? Commented Aug 22, 2010 at 9:58
  • 1
    I believe the equivalent Oracle concept is schema... Commented Aug 22, 2010 at 20:56

2 Answers 2

6

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.

Sign up to request clarification or add additional context in comments.

Comments

5

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."

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.