企业应用NoSQL的关键
有关NoSQL能否胜任企业级数据库的功能的讨论现在是甚嚣尘上,其中人们关注的焦点就是NoSQL数据库的环境是不确定、变化的。一些No
有关NoSQL能否胜任企业级数据库的功能的讨论现在是甚嚣尘上,其中人们关注的焦点就是NoSQL数据库的环境是不确定、变化的。
一些NoSQL企业号称已经准备好企业级的服务了,但是事实上却是他们对企业需要的功能属性仍然是没有做到扎实的,甚至有的为了保证数据库的表现把相关的属性都移除了。这种情况对于测试原型或者非生产环境下当然可以接受,但是很难想象实际应用中,企业会把他们最关键的数据用这样危险的方式处理。
NoSQL数据库的特征是灵活、敏捷、快速和可扩展,同时还拥有灾难恢复和高的可用性。当然,如果开发一款企业级应用的NoSQL数据库,以上的特性还不够,最主要的还要能支持企业级应用的要求,,包括事务的一致性、SQL支持等。
如今,NoSQL已经进入了数据库行业的主流,数据中心的管理员们正在认真的研究这个新的技术,以保证他能够满足企业的所有要求,而不只是其中一部分。只有这样,企业才可以真正好好地发掘和管理好大量数据背后的价值,并且把操作规范化,同时避免了可能出现的风险。
事务
ACID事务原本是RDBMS的一个“独门绝技”,如今的NoSQL基本没有此类的内容。因为向一个本来就不以一致为目标的数据库中加入一致性功能,这个难度是可想而知的,因此后来才出现了“最终一致性”。有了“最终一致性”,虽然不能时刻保证数据的完全一致,但是也在很大程度上解决了一致性的问题,而且实际应用的情况下,“最终一致性”完全能满足大多数应用的要求。
此外,事务和NoSQL其实并不是对立的,完全可以实现事务和NoSQL的有机结合。对于企业级的应用,事务的存在能保证数据操作的安全性和可靠性。我认为企业级的NoSQL应该支持简单的事务操作,比如事务中的操作只能是插入数据、修改数据以及删除数据,在事务过程中执行的其它操作不会纳入事务范畴,也就是说事务回滚时非事务操作不会被执行回滚。如果一个表或表空间中有数据涉及事务操作,则该表或表空间不允许被删除。这样虽然功能不如RDBMS全面但是也已经能满足企业级应用的绝大多数需求了!
SQL支持
有些人认为,NoSQL本来就不能够也不应该支持SQL语句,其实我认为这个是一种误解。SQL语言原本也是基于关系型模型的操作,但是很多的操作和语句并不限定于关系型数据库,此外对于大多数数据库使用者和DBA而言,SQL的思维已经在他们脑中根深蒂固,一方面想要完全改变这种想法是很困难也没有必要的,同时SQL语言在很多的企业级应用场景中仍然是很适合的,我认为不能全盘否认SQL。
所以,我认为NoSQL对于SQL语言的支持也是很重要的。之前提到的SequoiaDB,它们就运用了自己开发的转换器,实现了对于PostgreSQL的支持。在我们的实际应用中,SQL的支持确实让我们节省了许多的学习时间。
读写分离
在数据库操作中,为了保证一致性特性,对于正在进行写操作的数据,其他的程序是无法调用的,这必然将影响到性能的表现。纵使文档型NoSQL的数据模型已经不是RDBMS的表结构,而是独立的JSON文档,已经很好的提升了性能,但是在遇到写操作时,仍然需要对写的那个文档“锁住”。因此,我认为读写分离对于企业级NoSQL是至关重要的。如SequoiaDB,他们应用了Master-Slave 的模式构建数据组,这样Master主节点的数据异步复制到Slave 从节点,Slave节点进行只读操作就而Master节点进行写入操作,这样就实现了读写分离,进一步提升了性能。
NoSQL在企业级别的应用已经不少,但是现在绝大多数NoSQL产品似乎没有针对企业级做出对应的功能和策略,大多还是由实际应用的团队自己解决这些问题,所以像SequoiaDB这种,设计之初就是面向企业级用户,并且为了企业级用户设计了专有功能的NoSQL数据库对于真正需要应用的企业来说才是首选!
《NoSQL数据库入门》,高清PDF 版下载见
NoSQL数据库的基础知识
本文永久更新链接地址:

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



To query the Oracle tablespace size, follow the following steps: Determine the tablespace name by running the query: SELECT tablespace_name FROM dba_tablespaces; Query the tablespace size by running the query: SELECT sum(bytes) AS total_size, sum(bytes_free) AS available_space, sum(bytes) - sum(bytes_free) AS used_space FROM dba_data_files WHERE tablespace_

Data import method: 1. Use the SQLLoader utility: prepare data files, create control files, and run SQLLoader; 2. Use the IMP/EXP tool: export data, import data. Tip: 1. Recommended SQL*Loader for big data sets; 2. The target table should exist and the column definition matches; 3. After importing, data integrity needs to be verified.

MySQL is chosen for its performance, reliability, ease of use, and community support. 1.MySQL provides efficient data storage and retrieval functions, supporting multiple data types and advanced query operations. 2. Adopt client-server architecture and multiple storage engines to support transaction and query optimization. 3. Easy to use, supports a variety of operating systems and programming languages. 4. Have strong community support and provide rich resources and solutions.

Uninstall method for Oracle installation failure: Close Oracle service, delete Oracle program files and registry keys, uninstall Oracle environment variables, and restart the computer. If the uninstall fails, you can uninstall manually using the Oracle Universal Uninstall Tool.

Creating an Oracle table involves the following steps: Use the CREATE TABLE syntax to specify table names, column names, data types, constraints, and default values. The table name should be concise and descriptive, and should not exceed 30 characters. The column name should be descriptive, and the data type specifies the data type stored in the column. The NOT NULL constraint ensures that null values are not allowed in the column, and the DEFAULT clause specifies the default values for the column. PRIMARY KEY Constraints to identify the unique record of the table. FOREIGN KEY constraint specifies that the column in the table refers to the primary key in another table. See the creation of the sample table students, which contains primary keys, unique constraints, and default values.

There are three ways to view instance names in Oracle: use the "sqlplus" and "select instance_name from v$instance;" commands on the command line. Use the "show instance_name;" command in SQL*Plus. Check environment variables (ORACLE_SID on Linux) through the operating system's Task Manager, Oracle Enterprise Manager, or through the operating system.

Oracle View Encryption allows you to encrypt data in the view, thereby enhancing the security of sensitive information. The steps include: 1) creating the master encryption key (MEk); 2) creating an encrypted view, specifying the view and MEk to be encrypted; 3) authorizing users to access the encrypted view. How encrypted views work: When a user querys for an encrypted view, Oracle uses MEk to decrypt data, ensuring that only authorized users can access readable data.

Oracle garbled problems can be solved by checking the database character set to ensure they match the data. Set the client character set to match the database. Convert data or modify column character sets to match database character sets. Use Unicode character sets and avoid multibyte character sets. Check that the language settings of the database and client are correct.
