You are on page 1of 3

MBENGMO VOUTSA YVAN SWE III

ROY

ASSIGNMENT NoSQL and DaaS

1) Define properly NoSQL : NoSQL, also known as "Not only SQL," is a type of database
management system that diverges from the traditional relational database

2) Traditional RDBMS applications have focused on ACID transactions. What is ACID stand
for? : ACID stands for Atomicity, Consistency, Isolation, Durability. It's a set of properties
ensuring database transactions are processed reliably.

3) What is the relationship between CAP, ACID and NoSQL?

- ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties that ensure


reliable and robust transactions in traditional relational database management
systems (RDBMS).

- CAP (Consistency, Availability, Partition Tolerance) theorem states that it's impossible
for a distributed data store to simultaneously provide all three of these guarantees.

- NoSQL databases often prioritize availability and partition tolerance over strong
consistency, making them more aligned with the CAP theorem rather than the strict
ACID properties of traditional RDBMS.

4) List 4 advantages of NoSQL :

- Scalability: NoSQL databases can easily handle large amounts of data and high
traffic loads because they're designed to scale out horizontally across multiple
servers.

- Flexibility: NoSQL databases offer flexible schemas, which means you can store
different types of data together without needing to define a rigid schema beforehand.

- Performance: NoSQL databases often provide faster read and write operations
compared to relational databases, especially for applications that require low-latency
access to data.

6) What are the differences between NoSQL and RDBMS


Data Model:

RDBMS (Relational Database Management System): Uses tables with rows and columns to
organize data in a structured manner.
NoSQL (Not Only SQL): Offers various data models like key-value pairs, documents,
column-family, or graphs, providing more flexibility in handling different types of data.
Schema:

RDBMS: Requires a fixed schema where you define the structure of your data before storing
it.
NoSQL: Often doesn't require a predefined schema, allowing for dynamic and evolving data
structures.
Scalability:

RDBMS: Typically scales vertically, meaning you add more resources (like CPU, RAM) to a
single server.
NoSQL: Designed to scale horizontally, allowing you to distribute data across multiple
servers, providing better scalability for large datasets and high-traffic applications.
Consistency:

RDBMS: Emphasizes strong consistency (ACID properties), ensuring that data remains
consistent across all transactions.
NoSQL: Offers flexible consistency models, allowing for eventual consistency where data
might be temporarily inconsistent but will converge to a consistent state over time.
Query Language:

RDBMS: Typically uses SQL (Structured Query Language) for querying and manipulating
data.
NoSQL: May support SQL or provide their own query languages tailored to specific data
models.

7) What are the approach of NoSQL

- Flexibility in Data Modeling: NoSQL databases are more flexible when it comes to
storing different types of data.

- Scalability: NoSQL databases are designed to scale easily. They can handle a large
amount of data and high traffic without sacrificing performance.

- High Availability: NoSQL databases prioritize availability, meaning they aim to


remain operational even if some parts of the system fail.

- Speed: NoSQL databases are often optimized for speed.

8) Base on the knowledge you have acquire on the types of NoSQL we have experiment in
class answer the following questions by providing the commands:

a. Create a database called ShoppingDB:


- Using MongoDB : use ShoppingDB

b. Get a summary of the database. :


use ShoppingDB
db.stats()

d. Retrieve the document knowing that _id is document-uuid; and _rev is 1- Revision-UUID;

answer: with CouchDB:


curl -X GET
http://localhost:5984/ShoppingDB/document-uuid?rev=1-Revision-UUID

e. Update the document by defining name as “TSEKANE ADI”. Note that the revision that is
being updated is required and that it has been updated: what will be the response?

answer: with CouchDB: curl -X PUT


http://localhost:5984/ShoppingDB/document-uuid -d '{"_id":"document-uuid",
"_rev":"1-Revision-UUID", "name":"TSEKANE ADI"}' -H "Content-Type: application/json"

f. Delete the document. :


answer: with CouchDB:
curl -X DELETE http://localhost:5984/ShoppingDB/document-uuid?rev=1-Revision-UUID

h. Inserting a record into userprofile collection

with MongoDB:

use ShoppingDB // where ShoppingDB is the name of your database

db.userprofile.insertOne({
"username": "example_user",
"email": "user@example.com",
"age": 25,
"gender": "male",
"location": "City"
})

You might also like