Home Database Mysql Tutorial Oracle和SQLserver

Oracle和SQLserver

Jun 07, 2016 pm 03:51 PM
oracle sqlserver

Oracle和SQLserver区别,网上查了查,大致如下。 1、从平台的适应性来说。 Oracle支持多种操作系统,而sql server只支持windows。 2、从我们使用数据库的角度来讲。 Oracle给dba更多的灵活性,可以根据实际情况调整参数,使应用性能最佳,但是缺点就是很难上

Oracle和SQLserver区别,网上查了查,大致如下。

        1、从平台的适应性来说。

         Oracle支持多种操作系统,而sql server只支持windows。

        2、从我们使用数据库的角度来讲。

         Oracle给dba更多的灵活性,可以根据实际情况调整参数,使应用性能最佳,但是缺点就是很难上手。sqlserver则相反,较容易上手。

        3、从数据库系统的体系结构来讲。

             Oracle的文件体系结构为:

                数据文件:.dbf(真实数据)。

                日志文件:rdo

                控制文件:ctl

                参数文件:ora

              SqlServer的文件体系结构为:

                 .mdf(数据字典)

                 .ndf(数据文件)

                 .ldf(日志文件)

         4、从存储结构上来讲。

               Oracle存储结构:

                  Oracle里面两个参数块pctfree(填充因子)和pctused(复用因子),可控制块本身何时有,何时没有足够的空间接受新信息(对块的存储情况分析机制)。

                  这样可以降低数据行连接于行迁移的可能性。块的大小可以设置(olp块和dss块)。

                  在Oracle中,将连续的块组成区,可动态分配区(区的分配是等额的也可以使自增长的)可减少空间分配次数。

                  在Oracle里表可以分为多个段,段由多个区组成,每个段可指定分配在哪个表空间里(段的类型分为:数据段、索引段、回滚段、临时段、cash段)。Oracle里还可以对表进行分区,可以按照用户定义的业务规则、条件或规范,物理的分开磁盘上的数据。这样大大的降低了磁盘争用的可能性。

                  Oracle有七个空基本表空间:

                  .system表空间(存放数据字典和数据管理自身所需的信息)。

                  .temp临时表空间。

                  .tools交互式表空间。

                  .users用户默认表空间。

                  .indx索引表空间。

                  .dbsys福数据表空间

                   不同的数据存放在不同的表空间,在Oracle里基表是加密存储,任何人都无法访问。只能通过用户可视视图查看。

            SqlServer存储结构:

                以页为最小分配单位,每个页8K,可将8个连续的页组成一个“扩展”,以进一步减少分配时所消耗的资源。在SqlServer中数据以表的方式存放,而表是存放在数据库里。

                sqlserver有五个基本数据库:

                 .master(数据字典)

                 .mode(存放样版)

                 .tempdb(临时数据库)

                 .msdb(存放调度信息和日志信息)

                 .pubs(示例数据库)

                  真实数据与数据字典存放在一起,对系统参数信息无安全机制。

         5、登入管理。

               Oracle登入管理:

                  .system/manager(初始账户)

                  .sys/change_on_nstall

                  .install/oracle(安装账户)

                  .scott/tiger(示例数据库,测试用)

                   在oracle里默认的只有三个系统用户,oracle是通过用户登录。

               Sqlserver登入管理:

                    .sqlserver 身份验证。

                    .windows身份验证。

                    在sqlserver中是通过对windows用户账户或是用sqlserver身份验证连接数据库的。

        

             6、本质。

                   sqlserver不是一种语言,和oracle数据库一样传输指令的一种方式。而sql是一种结构化查询语言,oracle的结构化查询语言类似sql。

             7、从语言语法上。 

                   sql中的null既不是字符也不是数字,它是缺省值,而oracle提供了nvl函数来解决。

                   oracle中的字符串连接为string1||string2 ,sql中为string1+string2.

                   集合操作:在sql中只有union,oracle中包含minus(差操作)、interect(交操作)、union(并操作)

                   索引:sql索引分为聚集索引和非聚集索引,还包括全文索引。

                   oracle中的索引包括:b+索引,bitmap位图索引,函数索引,反序索引,主键索引,散列索引,本地索引。

                 数据类型:

                  Oracle中的数据类型比较复杂,有基本的数据类型,衍生型,列对象型,结构体型;

                  sql中的数据比较简单,只有一些简单的基本数据数据类型无法提供事务操作。

                 事务:

                  在sql中如果一个事务从开始执行到结束时错了,就会回滚到开始之前。

                  在oracle中它采用的是定点回滚,就是该事务函数化和精确的错误定位,用savepoint标记保存点,用rollback标记回滚错误的保存点。

                  游标:

                  在sql中游标的使用比较复杂,不能同时打开一个以上的游标,因为它只是一个全局变量。@@fast_statues而且声明游标也麻烦,关闭游标时也不清除内存的。

                  oracle中的游标是提高速度全部统一的单项游标,可以允许用户异步读取,而且声明比较简单,就一句declare cursor 游标名 is select 语句就可以了。

           

               容错机制:

               sql中的错误机制比较复杂,没有提供错误描述;Oracle中的容错类型有三种,一个是预定义错误,一个是非预定义错误,一个是用户自定义,其中在自定义错误中它有两个slq是不同的,那是sqlcode错误号、sqlerrm错误描述。

           8、安全性。

             sqlserver没有获得任何安全证书。oracle server获得最高认证级别的ISO标准认证。DB2获得最高认证级别的ISO标准认证。

           9、性能。

                sqlserver多用户性能不佳。

                oracle性能最高,保持windowsNT下的TPC-D和TPC-C的世界纪录。

                DB2适用于数据仓库和在线事务处理性能较高。

          10、客户端支持及应用模式。

                sql serverCS结构,只支持windows客户,可以用ADO,DAO,LOEDB,ODBC连接。

                oracle多层次网络计算,支持多种工业标准,可以用ODBC,JDBC,OCI等网络客户连接。

                DB2 是跨平台的,多层结构,支持ODBC,JDBC等客户。

         11、操作复杂和简单上。

                sqlserver操作简单,但只有图形界面。

                 oracle较复杂,同时提供GUI和命令行,在windowsNT和unix下操作相同。

                 DB2 操作简单,同时提供GUI和命令行,在windowsNT和unix下操作相同。

         12、使用风险。

                  sqlserver完全重写的代码,经历了长期的测试,不断延迟,许多功能需要时间来证明,并不十分兼容早起的产品。使用需要风险。

                  Oracle长时间的开发经验,完全向下兼容。得到广泛的应用,完全几乎没有风险。

                  DB2巨型企业广泛应用,向下兼容性好,风险小。

 

                对于初学oracle大概了解,以后在使用的过程中再和sqlserver进行比较和总结。

       

           

 

 


                    

 

自:http://www.2cto.com/database/201207/144792.html

    

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1670
14
PHP Tutorial
1274
29
C# Tutorial
1256
24
What to do if the oracle can't be opened What to do if the oracle can't be opened Apr 11, 2025 pm 10:06 PM

Solutions to Oracle cannot be opened include: 1. Start the database service; 2. Start the listener; 3. Check port conflicts; 4. Set environment variables correctly; 5. Make sure the firewall or antivirus software does not block the connection; 6. Check whether the server is closed; 7. Use RMAN to recover corrupt files; 8. Check whether the TNS service name is correct; 9. Check network connection; 10. Reinstall Oracle software.

How to solve the problem of closing oracle cursor How to solve the problem of closing oracle cursor Apr 11, 2025 pm 10:18 PM

The method to solve the Oracle cursor closure problem includes: explicitly closing the cursor using the CLOSE statement. Declare the cursor in the FOR UPDATE clause so that it automatically closes after the scope is ended. Declare the cursor in the USING clause so that it automatically closes when the associated PL/SQL variable is closed. Use exception handling to ensure that the cursor is closed in any exception situation. Use the connection pool to automatically close the cursor. Disable automatic submission and delay cursor closing.

How to create cursors in oracle loop How to create cursors in oracle loop Apr 12, 2025 am 06:18 AM

In Oracle, the FOR LOOP loop can create cursors dynamically. The steps are: 1. Define the cursor type; 2. Create the loop; 3. Create the cursor dynamically; 4. Execute the cursor; 5. Close the cursor. Example: A cursor can be created cycle-by-circuit to display the names and salaries of the top 10 employees.

How to export oracle view How to export oracle view Apr 12, 2025 am 06:15 AM

Oracle views can be exported through the EXP utility: Log in to the Oracle database. Start the EXP utility, specifying the view name and export directory. Enter export parameters, including target mode, file format, and tablespace. Start exporting. Verify the export using the impdp utility.

What to do if the oracle log is full What to do if the oracle log is full Apr 12, 2025 am 06:09 AM

When Oracle log files are full, the following solutions can be adopted: 1) Clean old log files; 2) Increase the log file size; 3) Increase the log file group; 4) Set up automatic log management; 5) Reinitialize the database. Before implementing any solution, it is recommended to back up the database to prevent data loss.

Oracle's Role in the Business World Oracle's Role in the Business World Apr 23, 2025 am 12:01 AM

Oracle is not only a database company, but also a leader in cloud computing and ERP systems. 1. Oracle provides comprehensive solutions from database to cloud services and ERP systems. 2. OracleCloud challenges AWS and Azure, providing IaaS, PaaS and SaaS services. 3. Oracle's ERP systems such as E-BusinessSuite and FusionApplications help enterprises optimize operations.

What steps are required to configure CentOS in HDFS What steps are required to configure CentOS in HDFS Apr 14, 2025 pm 06:42 PM

Building a Hadoop Distributed File System (HDFS) on a CentOS system requires multiple steps. This article provides a brief configuration guide. 1. Prepare to install JDK in the early stage: Install JavaDevelopmentKit (JDK) on all nodes, and the version must be compatible with Hadoop. The installation package can be downloaded from the Oracle official website. Environment variable configuration: Edit /etc/profile file, set Java and Hadoop environment variables, so that the system can find the installation path of JDK and Hadoop. 2. Security configuration: SSH password-free login to generate SSH key: Use the ssh-keygen command on each node

How to stop oracle database How to stop oracle database Apr 12, 2025 am 06:12 AM

To stop an Oracle database, perform the following steps: 1. Connect to the database; 2. Shutdown immediately; 3. Shutdown abort completely.

See all articles