Module 01 · Introducing NoSQL
Reading: NoSQL Database Deployment OptionsNoSQL 数据库部署选项
Database deployment options refer to the various methods and strategies for implementing and managing databases within an organization. Choosing the right deployment option is crucial for optimizing performance, scalability, and efficiency. Here, you'll explore some common database deployment options and their key characteristics
数据库部署选项是指组织内部实施和管理数据库的各种方法和策略。选择正确的部署选项对于优化性能、可扩展性和效率至关重要。在这里,你将探讨一些常见的数据库部署选项及其关键特征。
What you will learn 您将学到
After completing this reading, you'll be able to
完成本阅读后,你将能够
- Identify methods for deploying NoSQL databases
识别部署 NoSQL 数据库的方法 - List examples of NoSQL database deployments
列举 NoSQL 数据库部署的实例 - Describe some of the advantages and challenges associated with deploying NoSQL databases
描述一些与部署 NoSQL 数据库相关的优势和挑战
On-premises deployment 本地部署
On-premises deployment involves hosting the entire database infrastructure within the organization's physical location or a dedicated data center.
本地部署涉及将整个数据库基础设施托管在组织的物理位置或专用数据中心内。

Example 示例
An organization manages customer relationship data using an on-premises Oracle Database installed on dedicated servers within its corporate data center.
某组织在其企业数据中心内专用的服务器上安装本地 Oracle 数据库来管理客户关系数据。
Advantages 优势
Full control: Organizations have complete control over hardware specifications, software configurations, and security measures.
完全控制:组织对硬件规格、软件配置和安全措施拥有完全控制权。
Compliance: On-premises solutions might be necessary for industries with stringent regulatory or compliance requirements.
合规性:对于有严格监管或合规要求的行业,本地解决方案可能是必要的。
Challenges 挑战
Upfront costs: High initial investments in hardware, infrastructure, and skilled personnel.
前期成本:硬件、基础设施和专业人员的高额初始投资。
Scalability: Limited scalability compared to cloud alternatives, which might result in challenges during periods of rapid growth.
可扩展性:与云替代方案相比,可扩展性有限,这可能导致在快速增长时期出现挑战。
Cloud deployment 云部署
Cloud deployment involves utilizing cloud service providers to host and manage databases over the internet.
云部署涉及利用云服务提供商通过互联网托管和管理数据库。

Example 示例
A startup leverages Amazon Web Services (AWS) to deploy and host its e-commerce database, utilizing Amazon relational database service (RDS) for scalability and managed database services.
一家初创公司利用亚马逊云服务(AWS)部署和托管其电子商务数据库,利用亚马逊关系型数据库服务(RDS)实现可扩展性和托管数据库服务。
Advantages 优势
Scalability: Resources can be scaled up or down based on demand, providing flexibility and cost savings.
可扩展性:资源可以根据需求进行扩展或缩减,提供灵活性和成本节约。
Cost-effectiveness: Pay-as-you-go pricing allows organizations to pay only for the resources they consume.
成本效益:按需付费定价允许组织仅为其使用的资源付费。
Automation: Cloud providers handle routine maintenance tasks, updates, and backups.
自动化:云服务提供商处理常规维护任务、更新和备份。
Challenges 挑战
Connectivity dependencies: Relies on internet connectivity, which might pose issues in areas with limited or unreliable access.
连接依赖性:依赖于互联网连接,这可能在网络覆盖有限或不稳定的地区引发问题。
Security concerns: Requires robust security measures to protect sensitive data from unauthorized access.
安全顾虑:需要强大的安全措施来保护敏感数据免受未经授权的访问。
Hybrid deployment 混合部署
Hybrid deployment combines on-premises and cloud solutions, allowing organizations to distribute data and workloads based on specific needs.
混合部署结合了本地和云解决方案,允许组织根据特定需求分配数据和任务负载。

Example 示例
A financial institution stores sensitive customer information, such as account balances, in an on-premises database while utilizing a cloud-based service, like AWS Lambda, for processing non-sensitive data analytics workloads.
一家金融机构将敏感的客户信息(如账户余额)存储在本地数据库中,同时利用基于云的服务(如 AWS Lambda)处理非敏感数据分析任务负载。
Advantages 优势
Flexibility: Companies can keep sensitive data on-premises while using the cloud for scalable and dynamic workloads.
灵活性:企业可以将敏感数据保留在本地,同时利用云服务处理可扩展和动态的工作负载。
Disaster recovery: Companies can use cloud storage for backups, enhancing disaster recovery capabilities.
灾难恢复:企业可以使用云存储进行备份,从而增强灾难恢复能力。
Challenges 挑战
Integration complexity: Integration complexities require effective integration between on-premises and cloud environments for seamless operation.
集成复杂度:集成复杂度要求在本地和云环境之间进行有效集成,以实现无缝运行。
Management overhead: Monitoring and managing two different environments might increase administrative complexity.
管理开销:监控和管理两个不同的环境可能会增加管理复杂性。
Database as a service (DBaaS) 数据库即服务(DBaaS)
DBaaS provides a fully managed database solution where the service provider handles administrative tasks, allowing organizations to focus on application development.
DBaaS 提供一种完全管理的数据库解决方案,其中服务提供者处理管理任务,使组织能够专注于应用程序开发。

Example 示例
A software development company uses Microsoft Azure SQL Database as a DBaaS solution to host and manage its relational databases, allowing developers to focus on application development rather than database administration tasks.
一家软件开发公司使用 Microsoft Azure SQL Database 作为 DBaaS 解决方案来托管和管理其关系数据库,使开发者能够专注于应用程序开发,而不是数据库管理任务。
Advantages 优点
Reduced overhead: Organizations benefit from reduced administrative tasks, including maintenance, backups, and updates.
降低开销:组织受益于减少的管理任务,包括维护、备份和更新。
Rapid deployment: Quick deployment without the need for in-depth database expertise.
快速部署:无需深入数据库专业知识即可快速部署。
Challenges 挑战
Limited control: Organizations have less control over underlying infrastructure, which might be a concern for some organizations.
有限控制:组织对底层基础设施的控制力较弱,这可能对某些组织构成问题。
Data security: Trusting a third-party provider with sensitive data raises security and privacy considerations.
数据安全:将敏感数据托付给第三方供应商会引发安全和隐私方面的考虑。
Containerized deployment 容器化部署
Containerization involves packaging the database and its dependencies into containers for consistent deployment across various environments.
容器化涉及将数据库及其依赖项打包到容器中,以便在各种环境中进行一致的部署。

Example 示例
A tech company adopts Docker containers to deploy its microservices-based application, with each microservice encapsulating a specific function and a separate container running a MongoDB database.
一家科技公司采用 Docker 容器来部署其基于微服务的应用程序,每个微服务封装了特定的功能,并有一个单独的容器运行 MongoDB 数据库。
Advantages 优点
Portability: Containers ensure consistent operation across development, testing, and production environments.
便携性:容器确保在开发、测试和生产环境中运行一致。
Resource efficiency: Lightweight containers consume fewer resources compared to traditional virtual machines.
资源效率:轻量级容器与传统虚拟机相比,消耗更少的资源。
Challenges 挑战
Orchestration complexity: Production-scale deployment requires knowledge of container orchestration tools like Kubernetes.
编排复杂性:生产规模部署需要了解如 Kubernetes 之类的容器编排工具。
Learning curve: Teams might need to familiarize themselves with containerization concepts and tools.
学习曲线:团队可能需要熟悉容器化概念和工具。
Serverless deployment 无服务器部署
Serverless architecture provisions and scales database resources automatically based on demand, with organizations paying for actual usage.
无服务器架构根据需求自动提供和扩展数据库资源,组织只需为实际使用付费。

Example 示例
A mobile app developer utilizes Google Cloud Firestore as a serverless NoSQL database for storing user data, where the database scales automatically based on demand, and the developer only pays for the data storage and operations used by the app.
一位移动应用开发者使用 Google Cloud Firestore 作为无服务器的 NoSQL 数据库来存储用户数据,该数据库根据需求自动扩展,开发者只需为应用程序使用的存储和操作付费。
Advantages 优势
No manual provisioning: No need for manual provisioning or maintenance of server resources.
无需手动配置:无需手动配置或维护服务器资源。
Cost savings: Efficient resource utilization leads to cost savings as organizations only pay for the resources consumed.
成本节约:高效的资源利用带来了成本节约,因为组织只需为其使用的资源付费。
Challenges 挑战
Limited control: Organizations have less control over underlying infrastructure, which might concern some organizations.
控制有限:组织对底层基础设施的控制力较弱,这可能会让一些组织感到担忧。
Applicability: Serverless might not be suitable for all types of databases or workloads due to architectural constraints.
适用性:由于架构限制,无服务器可能并不适用于所有类型的数据库或工作负载。
Recap 回顾
In this reading, you learned that:
在本阅读中,你学习了:
- The choice of a database deployment option depends on organizational priorities, budget constraints, scalability needs, and how the company manages the nature of the data. It's essential to carefully evaluate these options in alignment with specific use cases to ensure optimal performance and efficiency.
数据库部署选项的选择取决于组织优先级、预算限制、可扩展性需求以及公司如何管理数据的性质。在特定用例的指导下,仔细评估这些选项对于确保最佳性能和效率至关重要。 - On-premises deployment involves hosting the entire database infrastructure within the organization's physical location or a dedicated data center, providing full control and compliance with regulatory requirements but with high upfront costs and limited scalability.
本地部署涉及将整个数据库基础设施部署在组织的物理位置或专用数据中心内,提供完全控制权并符合监管要求,但前期成本高且可扩展性有限。 - Cloud deployment uses cloud service providers to host and manage databases. Cloud deployment offers scalability, cost-effectiveness, and automation. However, cloud deployments have connectivity dependencies and can be prone to security concerns.
云部署利用云服务提供商来托管和管理数据库。云部署提供可扩展性、成本效益和自动化。然而,云部署存在连接依赖性,且可能存在安全风险。 - Hybrid deployment combines on-premises and cloud solutions, allowing organizations to distribute data and workloads based on specific needs, providing flexibility and enhanced disaster recovery capabilities; however, effective integration between on-premises and cloud environments requires increased administrative complexity and costs.
混合部署结合本地和云解决方案,允许组织根据特定需求分配数据和任务,提供灵活性和增强的灾难恢复能力;然而,本地和云环境之间的有效集成需要增加管理复杂性和成本。 - Database as a Service (DBaaS) provides a fully managed database solution where the company's choice service provider handles administrative tasks. When using DBaaS, organizations focus on application development but usually have limited control over underlying infrastructure and data security.
数据库即服务(DBaaS)提供完全管理的数据库解决方案,其中公司的选择服务提供商处理管理任务。在使用 DBaaS 时,组织专注于应用开发,但通常对底层基础设施和数据安全控制有限。 - Containerized deployment involves packaging the database and its dependencies into containers for consistent deployment across various environments, which can ensure consistent operations and resource efficiency—however, if containerization practices are not already in place, the company will need time for employees to gain knowledge of container orchestration tools and implement them.
容器化部署涉及将数据库及其依赖项打包到容器中,以便在各种环境中进行一致的部署,这可以确保一致的运行和资源效率——然而,如果尚未实施容器化实践,公司需要时间让员工掌握容器编排工具并实施它们。 - Serverless deployment provisions and scales database resources automatically based on demand, with organizations paying for actual usage, eliminating manual provisioning and maintenance of server resources, and leading to cost savings. However, companies usually have limited control over the underlying infrastructure, and serverless deployments might not be technically suitable for all databases or workloads.
无服务器部署根据需求自动提供和扩展数据库资源,组织按实际使用付费,消除了服务器资源的手动配置和维护,并导致成本节约。然而,公司通常对底层基础设施的控制有限,无服务器部署可能并非所有数据库或工作负载的技术上都适用。