简体   繁体   English

使用mongodb通过架构构建数据库

[英]using mongodb for building database with schema

I am making a travel portal(airline booking site like make my trip...) 我正在建立旅游门户网站(像我的旅程这样的航空公司预订网站...)

I wanted to use mongodb as database for it instead of mysql, mongodb is schemaless and my mentor told me not every database can be used for every application, but why, its just a database, we perform CRUD operation and use it? 我想将mongodb用作数据库而不是mysql,mongodb是无模式的,导师告诉我并不是每个数据库都可以用于每个应用程序,但是为什么它只是一个数据库,我们执行CRUD操作并使用它?

A finer answer to your question would involve explaining things that make up the database. 对您的问题的更好解答将包括解释构成数据库的内容。 Not every database (not necessarily relational) has the features mentioned below 并非每个数据库(不一定是关系数据库)都具有以下功能

  • Eventual consistency 最终一致性
  • Referential integrity 参照完整性
  • Linking between objects 对象之间的链接
  • Metadata attached to data objects 附加到数据对象的元数据
  • In-built Sharding through hashing 通过散列的内置分片
  • Transaction isloation 交易隔离
  • ... and so on ... 等等

An application should use a database that best helps it perform its raison d'etre . 应用程序应该使用能够最好地帮助其执行生存的数据库。 There is no single database that can fit the bill for all use cases. 没有任何一个数据库可以满足所有用例的需求。 In fact certain no-sql stores do not even have a concept of 'transactions'. 实际上,某些非SQL存储甚至没有“事务”的概念。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM