Mongo db vs (My Sql OR Sql Server) 分类应用
Mongo db vs (My Sql OR Sql Server) for a classified application
我们有一个分类网站。我读了一些东西,但仍然没有充分的理由在这些之间做出选择。
我的要求是创建用户、列出和管理这些。这些是付费列表,因此会有货币交易。
根据我的研究 (https://www.mongodb.com/compare/mongodb-mysql),我发现 mongo 数据库比复杂事务以外的其他选项更具优势。在这种情况下什么是复杂交易?有具体的例子吗?
选择前我应该考虑哪些因素。我有使用 My SQL 和 Entity framework 的经验,所以它现在对我更有吸引力,但与 mongo 相比,这些真的不利于缩放吗?
请随意提出除这些选项之外的任何其他性能好的选项。
mongoDB 和 MySQL 或 SQL 服务器之间存在巨大差异。
MongoDB 是一个 NoSQL 数据库,这意味着它是无模式的并且不遵循 RDBMS 的 CODD 规则,而 MySQL/SQL 服务器是关系数据库。
每个都适用于不同的用例。根据 mongoDB doc
Why use MongoDB instead of MySQL?
Organizations of all sizes are adopting MongoDB because it enables them to build applications faster, handle highly diverse data types, and manage applications more efficiently at scale.
Development is simplified as MongoDB documents map naturally to modern, object-oriented programming languages. Using MongoDB removes the complex object-relational mapping (ORM) layer that translates objects in code to relational tables.
MongoDB’s flexible data model also means that your database schema can evolve with business requirements. For example, the ALTER TABLE command required to add a single, new field to Craiglist’s MySQL database would take months to execute. The Craigslist team migrated to MongoDB because it can accommodate changes to the data model without such costly schema migrations.
MongoDB can also be scaled within and across multiple distributed data centers, providing new levels of availability and scalability previously unachievable with relational databases like MySQL. As your deployments grow in terms of data volume and throughput, MongoDB scales easily with no downtime, and without changing your application. In contrast, to achieve scale with MySQL often requires significant, custom engineering work.
What are common use cases for MongoDB?
MongoDB is a general purpose database that is used for a variety of use cases. The most common use cases for MongoDB include Single View, Internet of Things, Mobile, Real-Time Analytics, Personalization, Catalog, and Content Management.
When would MySQL be a better fit?
While most modern applications require a flexible, scalable system like MongoDB, there are use cases for which a relational database like MySQL would be better suited. Applications that require complex, multi-row transactions (e.g., a double-entry bookkeeping system) would be good examples. MongoDB is not a drop-in replacement for legacy applications built around the relational data model and SQL.
A concrete example would be the booking engine behind a travel reservation system, which also typically involves complex transactions. While the core booking engine might run on MySQL, those parts of the app that engage with users – serving up content, integrating with social networks, managing sessions – would be better placed in MongoDB
由于没有join的概念MongoDB所以如果你想存储数据,要么你必须创建一个hack来将数据存储在两个table中(虽然它很昂贵加入 MongoDB) 或您必须将数据存储为单个文档,使您的文档也如此 complex.In 这些情况 MySQL 具有优势。
我们有一个分类网站。我读了一些东西,但仍然没有充分的理由在这些之间做出选择。
我的要求是创建用户、列出和管理这些。这些是付费列表,因此会有货币交易。
根据我的研究 (https://www.mongodb.com/compare/mongodb-mysql),我发现 mongo 数据库比复杂事务以外的其他选项更具优势。在这种情况下什么是复杂交易?有具体的例子吗?
选择前我应该考虑哪些因素。我有使用 My SQL 和 Entity framework 的经验,所以它现在对我更有吸引力,但与 mongo 相比,这些真的不利于缩放吗?
请随意提出除这些选项之外的任何其他性能好的选项。
mongoDB 和 MySQL 或 SQL 服务器之间存在巨大差异。 MongoDB 是一个 NoSQL 数据库,这意味着它是无模式的并且不遵循 RDBMS 的 CODD 规则,而 MySQL/SQL 服务器是关系数据库。
每个都适用于不同的用例。根据 mongoDB doc
Why use MongoDB instead of MySQL?
Organizations of all sizes are adopting MongoDB because it enables them to build applications faster, handle highly diverse data types, and manage applications more efficiently at scale.Development is simplified as MongoDB documents map naturally to modern, object-oriented programming languages. Using MongoDB removes the complex object-relational mapping (ORM) layer that translates objects in code to relational tables.
MongoDB’s flexible data model also means that your database schema can evolve with business requirements. For example, the ALTER TABLE command required to add a single, new field to Craiglist’s MySQL database would take months to execute. The Craigslist team migrated to MongoDB because it can accommodate changes to the data model without such costly schema migrations.
MongoDB can also be scaled within and across multiple distributed data centers, providing new levels of availability and scalability previously unachievable with relational databases like MySQL. As your deployments grow in terms of data volume and throughput, MongoDB scales easily with no downtime, and without changing your application. In contrast, to achieve scale with MySQL often requires significant, custom engineering work.
What are common use cases for MongoDB? MongoDB is a general purpose database that is used for a variety of use cases. The most common use cases for MongoDB include Single View, Internet of Things, Mobile, Real-Time Analytics, Personalization, Catalog, and Content Management.
When would MySQL be a better fit? While most modern applications require a flexible, scalable system like MongoDB, there are use cases for which a relational database like MySQL would be better suited. Applications that require complex, multi-row transactions (e.g., a double-entry bookkeeping system) would be good examples. MongoDB is not a drop-in replacement for legacy applications built around the relational data model and SQL.
A concrete example would be the booking engine behind a travel reservation system, which also typically involves complex transactions. While the core booking engine might run on MySQL, those parts of the app that engage with users – serving up content, integrating with social networks, managing sessions – would be better placed in MongoDB
由于没有join的概念MongoDB所以如果你想存储数据,要么你必须创建一个hack来将数据存储在两个table中(虽然它很昂贵加入 MongoDB) 或您必须将数据存储为单个文档,使您的文档也如此 complex.In 这些情况 MySQL 具有优势。