Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between Oracle and Mysql when interpreting "Create Database "?

Tags:

mysql

oracle

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?

like image 727
Sawyer Avatar asked Dec 23 '22 00:12

Sawyer


1 Answers

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.

like image 200
Stellios Avatar answered Jan 14 '23 14:01

Stellios