Is Schema in Oracle is equivalent to Database in Microsoft SQL Server?

偶尔善良 提交于 2019-12-25 04:15:42

问题


I am new to Oracle database and I wanted to create a database in Oracle. I followed this link to create a database:

http://www.fehily.com/books/createdb/createdb_oracle_11g_2.html

In Microsoft SQL Server, when we create a database, we use the create database command and the database creation is instantaneous [within fraction of seconds], but the Database Tool as described in link above took couple of minutes to create the database. Is database creation in Oracle this much slower?

Searching more about it, I have a feeling that this database created using above tool in Oracle is not equivalent to the database we create in SQL Server. Rather, the schema/user in oracle is appearing to be equivalent to database in SQL Server. Is it true?

So, If I want multiple databases in Oracle, do I create a single database and then multiple schemas inside that single database? And then are those multiple Schemas are my databases?

I am very much confused about all this. Can someone please refer me to a nice article/book that explains these things in oracle in detail?


回答1:


For most purposes, yes you would indeed map a SQL server database to an Oracle schema (=user).

The term "database" in Oracle does not mean the same as in SQL Server. An Oracle "database" (from a technical point of view) is more like a SQL Server instance/installation, rather than a "database" in SQL Server.

SQL Server has two levels of namespace: database and schema. Whereas Oracle only has a single level of namespaces: a schema (which has a 1:1 relation to a user)




回答2:


SQL Server and Oracle both support Schema.

A Schema is like a new database but it is not a new database

Maybe you are confused, Mysql doesn't support schemas but SQL server offers full support for it.

In mysql your database is a schema, to only difference is that it doesn't support multi schemas

For the part of creating multi databases or a single database if multiple schemas it all depend in your specific situation, you should test thinks like performance and how much money you want to spend, a multi database approach can be very expensive unlike a multi Schema approach



来源:https://stackoverflow.com/questions/30097846/is-schema-in-oracle-is-equivalent-to-database-in-microsoft-sql-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!