#thread
#thread
Below are example of NoSQL databases:
1. CouchDB
2. Cassandra
3. MongoDB
4. HBase
5. DB2
#thread
#thread
1. MySQL
2. MariaDB
3. Oracle
4. MS SQL
5. PostgreSQL
SQL databases are inflexible (upon data that have complex connection between them) storage systems and are used for only structured data.
#thread
NoSQL databases are flexible (upon data with simple connections between them) storage systems and are used for both structured and unstructured data.
Take a break now and look at this short article that share more Pros/Cons on POPULAR DATABASES:
keycdn.com/blog/popular-d…
Now, lets cast our minds back to this image below as we now discuss the CAP theorem which relates to the image. Don't panic.. It's not mathematics
#thread
The theorem just emphasizes the fact that you only choose 2 out of 3 features
e.g CA, CP, AP from CAP
#thread
What does CONSISTENCY in a database really mean ?
It means that when there's data inside a database, barring no further updates, if a read (query operation) is executed upon the database, it retrieves the data
#thread
There are 2 types of CONSISTENCY:
1. IMMEDIATE / STRONG CONSISTENCY
2. EVENTUAL / WEAK CONSISTENCY
Most databases that employ #transactions have STRONG CONSISTENCY
#thread
So where is CONSISTENCY useful in choosing a database for a web/desktop software ?
1. a stock-trading software
2. a banking app
3. a scored-based multiplayer hyper-casual 2D/3D game.
4. a location-aware social app (think foursquare / snapchat)
5. chat apps
#thread
#thread
1. Twitter Trends / Tweets (Yours Truly)
2. Recommender Systems (think Amazon / Yelp)
3. DNS
4. Analytics Systems
#thread
Which brings us to AVAILABILITY next!
#thread
AVAILABILITY simple means that at any time a query is made to a database, the query must not return void (no errors or timeouts) and the query must return in the shortest time possible.
Mostly, this points to reliability
#thread
Also AVAILABILITY point to recoverability
That a database is recoverable means if an error occurs, it can be rectified quickly
When a database has very good AVAILABILITY, it is said to be HIGHLY AVAILABLE. When a database has not too good AVAILABILITY, it is said to be BASELY AVAILABLE
#thread
Now, lets go back to our earlier image:
#thread
Now, lets go back to our app/software example of a banking app or stock-trading software.
From the user features of such, you know it must IMMEDIATELY (STRONG) CONSISTENT...
#thread
Well yes! we can choose #MariaDB over #MySQL or #PostgreSQL
#thread
PARTITION-TOLERANCE simply means that when a database is broken up into parts (partitions), it's ability to function optimally for CONSISTENCY / AVAILABILITY doesn't get impacted.
#thread
#thread
#thread
#thread
See the image below that gives an idea of how to chose a NoSQL database based on the scale and performance needed
#thread
We see that NoSQL databases like #Cassandra have EVENTUAL CONSISTENCY/ HIGH AVAILABILITY but also easier to partition (actual partition - using partition keys) than it's SQL counterparts on the other side of the triangle.
#thread
This little detail should be kept in mind
#thread
So, if you were building a #BuyPowerNG for example..
#MongoDB is easier to scale than #PostegreSQL
#thread
#thread
What database do you think an #InventoryManagement or #VendorProcurementsSoftware should be built with ?
Let me have your answers in the replies and let's have a discussion
What database will be best suited for an #ElectronicMedicalRecord software system ?