2. tmsoft.mn
A NoSQL (often interpreted as Not Only SQL database provides a mechanism
for storage and retrieval of data that is modeled in means other than the tabular relations
used in relational databases. (Wikipedia)
2
NoSQL өгөгдлийн сан
Non-relational, next generation
operational datastores and databases
6. tmsoft.mn
no joins support
no complex transactions support
Fast performance
Horizontally scalable architecture
Query language
-
+
6
NoSQL – Дутагдал, Давуу тал?
8. tmsoft.mn
Data model буюу Өгөгдлийн загвараар нь дараах бүлгүүдэд хувааж болох бөгөөд гол төлөөлөгчдийг нь харуулав.
8
NoSQL өгөгдлийн сангууд
Key/Value Column Graph Document
9. tmsoft.mn
Хамгийн их ашиглагддаг NoSQL өгөгдлийн сан
• C++ хэл дээр бичигдсэн (Кодчлол 2007 оноос эхэлсэн, 2009 онд анхны хувилбар )
• Нээлттэй эхтэй, чөлөөт програм
• Document-Oriented Storage - JSON-style documents with dynamic schemas offer simplicity and power.
• Full Index Support - Index on any attribute, just like you're used to.
• Replication & High Availability - Mirror across LANs and WANs for scale and peace of mind.
• Auto-Sharding - Scale horizontally without compromising functionality.
• Map/Reduce - Flexible aggregation and data processing.
• Production Support - Компани болон дэмжигчид
9
MongoDB - Open source, high performance database
10. tmsoft.mn
10
MongoDB – Document database
•JSON documents (BSON)
• Java, Javascript, C#, Python, PHP, Ruby, …, cross platform
•Rich data models (Төрөл бүрийн систем бүтээхэд ашиглах боломжтой)
•Seamlessly map to native programming language types (програмчлалын
хэлний өгөгдлийн төрлүүдтэй шууд холбогддог)
• Flexible for dynamic data
•Better data locality (Өгөгдлийг хайж олоход хялбар)
11. tmsoft.mn
11
MongoDB – Document database
Primary key
Array
Embedded data model
Document
Collection
DOCUMENT – (word, pdf документ гэсэн утгаар биш)
14. tmsoft.mn
14
MongoDB төрөл бүрийн системүүдэд хэрэглэгдсэн
3.5T of data
in 20 billion records
live dictionary
MongoDB was
2.5 times faster
than MySQL
Real time
analytics
Problem + existing solution space
Solution approach
Results
Data in all shapes and sizes
Relational Databases – schemas + Performance
* To normalise or not to normalise?
Tick Databases – Price vs. Performance
Files – Management
Caches
"There are only two hard problems in Computer Science: cache invalidation and naming things."
What do you do when you outgrow your storage?
Data in all shapes and sizes
Relational Databases – schemas + Performance
* To normalise or not to normalise?
Tick Databases – Price vs. Performance
Files – Management
Caches
"There are only two hard problems in Computer Science: cache invalidation and naming things."
What do you do when you outgrow your storage?
Data in all shapes and sizes
Relational Databases – schemas + Performance
* To normalise or not to normalise?
Tick Databases – Price vs. Performance
Files – Management
Caches
"There are only two hard problems in Computer Science: cache invalidation and naming things."
What do you do when you outgrow your storage?
Data in all shapes and sizes
Relational Databases – schemas + Performance
* To normalise or not to normalise?
Tick Databases – Price vs. Performance
Files – Management
Caches
"There are only two hard problems in Computer Science: cache invalidation and naming things."
What do you do when you outgrow your storage?
5-waysharded cluster with SSDs (1U)
Running MongoDB using the built-in sharding by symbol key
We collect timing statistics:
One strategy went from 20 minute run time against SQL -> 25s.