Oracle中有“数据库”的概念。术语“数据库”在 Oracle 术语中的含义与该术语在 MySQL 或 SQL Server 中的含义不同。
由于您使用的是 express 版本,OracleCREATE DATABASE
会在安装过程中自动运行该语句。一台机器上只能有 1 个速成版数据库。如果您要安装不同的版本,您可以选择是让安装程序创建数据库作为安装过程的一部分,还是CREATE DATABASE
稍后通过语句手动执行。如果您刚刚学习 Oracle,最好让 Oracle 在安装时为您创建数据库——您只能通过命令行工具(而不是 SQL Developer)创建数据库,而且很少有人刚开始需要以安装程序没有提示您的方式调整数据库设置。
In Oracle, a "database" is a set of data files that includes the data files for the SYS
and SYSTEM
schemas which contain all the Oracle data dictionary tables, the data files for the TEMP
tablespace where sorts and other temporary operations occur, and the data files for whatever schemas you want to create. In SQL Server and other RDBMSs, these would be separate "databases". In SQL Server, you have a master
database, a tempdb
database, additional database for different products (i.e. msdb
for the SQL Server Agent), and then additional user-defined databases. In Oracle, these would all be separate schemas in a larger container that Oracle refers to as a "database".
Occasionally, a DBA will want to run multiple Oracle databases on the same server-- most commonly when there are different packaged applications that have different requirements about database versions or parameters. If you want to run application A that requires an 11.2 database and application B that doesn't support 11.2 yet, you would need to have two different databases on the server. The DBA could create a separate database and a separate instance but that doubles the memory requirements, doubles the number of background processes required to run the database, and generally makes things less scalable. It's necessary if you really want to run different versions of the database simultaneously but it's not ideal.