Oracle中的Schema是否等同于Microsoft SQL Server中的Database?

时间:2022-02-19 12:44:27

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

我是Oracle数据库的新手,我想在Oracle中创建一个数据库。我按照这个链接创建了一个数据库:

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?

在Microsoft SQL Server中,当我们创建数据库时,我们使用create database命令并且数据库创建是瞬时的[在几分之一秒内],但上面链接中描述的数据库工具花了几分钟来创建数据库。 Oracle中的数据库创建速度要慢得多吗?

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?

更多地了解它,我觉得在Oracle中使用上述工具创建的这个数据库并不等同于我们在SQL Server中创建的数据库。相反,oracle中的模式/用户似乎等同于SQL Server中的数据库。这是真的吗?

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?

那么,如果我想要Oracle中的多个数据库,我是否要在该单个数据库中创建一个数据库,然后创建多个模式?然后那些多个架构是我的数据库吗?

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?

我对这一切非常困惑。有人可以请我参考一篇很好的文章/书,详细解释oracle中的这些内容吗?

2 个解决方案

#1


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

对于大多数用途,是的,您确实会将SQL Server数据库映射到Oracle架构(= 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.

Oracle中的术语“数据库”与SQL Server中的含义不同。 Oracle“数据库”(从技术角度来看)更像是SQL Server实例/安装,而不是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)

SQL Server有两个级别的命名空间:数据库和架构。 Oracle只有一个级别的命名空间:一个模式(与用户的关系为1:1)

#2


SQL Server and Oracle both support Schema.

SQL Server和Oracle都支持Schema。

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

Schema就像一个新数据库,但它不是一个新数据库

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

也许你很困惑,Mysql不支持模式,但SQL服务器提供完全支持。

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

在mysql中,您的数据库是一个模式,唯一的区别是它不支持多模式

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

对于创建多个数据库或单个数据库的部分,如果多个模式都取决于您的具体情况,您应该测试认为性能和您想花多少钱,多数据库方法可能非常昂贵,不像多模式方法

#1


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

对于大多数用途,是的,您确实会将SQL Server数据库映射到Oracle架构(= 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.

Oracle中的术语“数据库”与SQL Server中的含义不同。 Oracle“数据库”(从技术角度来看)更像是SQL Server实例/安装,而不是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)

SQL Server有两个级别的命名空间:数据库和架构。 Oracle只有一个级别的命名空间:一个模式(与用户的关系为1:1)

#2


SQL Server and Oracle both support Schema.

SQL Server和Oracle都支持Schema。

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

Schema就像一个新数据库,但它不是一个新数据库

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

也许你很困惑,Mysql不支持模式,但SQL服务器提供完全支持。

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

在mysql中,您的数据库是一个模式,唯一的区别是它不支持多模式

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

对于创建多个数据库或单个数据库的部分,如果多个模式都取决于您的具体情况,您应该测试认为性能和您想花多少钱,多数据库方法可能非常昂贵,不像多模式方法