0% found this document useful (0 votes)
6 views11 pages

NoSql Report SR

The document outlines various types of NoSQL databases, including key-value, column-oriented, document-oriented, and graph databases, along with their functionalities and use cases. It also covers fundamental database concepts, MySQL built-in functions, SQL joins, subqueries, and CRUD operations in DynamoDB. Additionally, it discusses the advantages of non-relational databases, misconceptions about NoSQL, and provides guidance on connecting to MongoDB using Node.js.

Uploaded by

siddharth.rana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views11 pages

NoSql Report SR

The document outlines various types of NoSQL databases, including key-value, column-oriented, document-oriented, and graph databases, along with their functionalities and use cases. It also covers fundamental database concepts, MySQL built-in functions, SQL joins, subqueries, and CRUD operations in DynamoDB. Additionally, it discusses the advantages of non-relational databases, misconceptions about NoSQL, and provides guidance on connecting to MongoDB using Node.js.

Uploaded by

siddharth.rana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Mid Term/Practice Examination

STUDENT NAME: Siddharth Rana

URN: 2020-B-22112000
COURSE NAME: NoSQL Database
COURSE CODE: CSC356
PROGRAM &
BCA DS Sem-V
SPECIALIZATION:
ACADEMIC YEAR: 2022-2023

MOOC TITLE:
Types of Nosql Databases

Link:
https://www.mygreatlearning.com/academy/courses/1377531/64939/#?utm _sourc
e=share_with_friends

NoSQL database types:


• Based on key-value pairs
• column-oriented graph
• document oriented
• Graph database
Key-value pairs
Data is stored in key-value pairs. Designed to handle large amounts of data and
heavy loads.
Key-value pair storage Databases store data as hash tables. Each key is unique and
the value can be JSON, BLOB (binary large object), string, etc. This is one of the
most basic examples of NoSQL databases. His NoSQL databases of this type are
used as collections, dictionaries, associative arrays, etc. A key-value store helps
developers store schemaless data. Perfect for cart contents.
Redis, Dynamo, Riak are his NoSQL examples of key-value store databases. They
are all based on Amazon's Dynamo papers.

Column based database


Columnar databases work in columns and are based on Google's BigTable paper.
Each column is processed individually. Single-column database values are stored
contiguously. Aggregate queries such as SUM, COUNT, AVG, and MIN perform
well because the data in the columns is readily available.
Column-based NoSQL database for data warehouses, business intelligence, CRM,
library card catalogs,
HBase, Cassandra, HBase, Hypertable are examples of his NoSQL queries for
columnar databases.

Document oriented
A document-oriented NoSQL database stores and retrieves data as key-value pairs,
but stores the value portion as a document. Documents are saved in JSON or XML
format. The value is known by the DB and can be queried. On the left side of this
diagram, you can see a document database with rows and columns and a JSONlike
structure on the right side. For a relational database, you need to know which
columns are there and so on. However, for document databases, there is a data store
that looks like a JSON object. You don't have to define what is flexible.
MOOC TITLE:
Introduction to the Fundamentals of
Databases

Link: https://lms.simplilearn.com/courses/4653/Introduction-to-the- Fundamentals-of-


Databases/syllabus

This course gives us a brief about:


Database and DBMS
• Built-in functions of MySQL
• Group by and having clause
• Joins in SQL
• Subqueries
• MongoDB Tutorial

Databases and DBMS

A database is a set of related data about people, locations, or things. A database


management system (DBMS) is a set of packages that will let you create, manage,
and perform different operations on a a database.

Database management system. It is described as database management system


(DBMS) as a "software program system that allows users to define, create, store
and manage access to the database". Examples of DBMS`s consist of MySQL,
PostgreSQL, Microsoft SQL Server, Oracle Database, and Microsoft Access.
Built-in functions of MySQL

Built in functions are features which are shipped with MySQL. They may be
categorized according to the data types that they function on i.e. strings, date and
numeric built in features. Stored functions are created through the person inside
MySQL server and may be utilized in SQL statements.
▪ Strings functions – perform on string data types
▪ Numeric functions – perform on numeric data types
▪ Date functions – perform on date data types
▪ Aggregate functions – perform on all the above data types and bring
summarized end result sets.
▪ Other functions – MySQL additionally helps different forms of built in
functions however we are able to restrict our lesson to the above named
functions only.

Group by and having clause

The HAVING clause is used in place of WHERE with aggregate functions. While
the GROUP BY Clause groups rows which have the equal values into summary
rows. The having clause is used with the where clause in order to locate rows with
some given conditions. The having clause is usually used after the group.

Joins in SQL

(INNER) JOIN: Returns data which have matching values in both tables

LEFT (OUTER) JOIN: Returns all information from the left table, and the
matched information from the right table

RIGHT (OUTER) JOIN: Returns all information from the right table, and the
matched information from the left table
FULL (OUTER) JOIN: Returns all information while there is a match in either left
or right table

Subqueries

A subquery is a SQL query nested inside a larger query.

A subquery might also additionally occur in :


- A SELECT clause
- A FROM clause
- A WHERE clause

The subquery may be nested inside a SELECT, INSERT, UPDATE, or DELETE


statement or inside any other subquery.A subquery is commonly added in the
WHERE Clause of another SQL SELECT statement.
You can use the comparison operators, consisting of >, <, or =. The comparison
operator also can be a multiple-row operator, such as IN, ANY, or ALL.

MongoDB

▪ MongoDB is a document database.


▪ It stores and maintains data in a form of JSON format known as BSON.
▪ A record in MongoDB is a file, that is a data structure composed of key
value pairs much like the structure of JSON objects.
▪ Records in a MongoDB database are referred to as documents, additionally
include numbers, strings, booleans, arrays, or maybe nested documents
MOOC TITLE:
AWS Hands-on
Link : shorturl.at/cFKOR

We prefer Non-relational Databases due to following reasons:

• Non-relational databases are both suitable for operational and transaction


data.
• They are also suitable for unstructured big data.
• Non-relational databases always offer higher performance and availability.
• Flexible schema help the non-relational databases to store more data of
varied types that can be changed without major schema changes.

CRUD is an acronym that comes from the computer programming and refers to the
four functions that are considered necessary to implementing a persistent storage
application: create, read, update and delete.

Performing CRUD operations with DynamoDB using the ASP.NET Core


Tools & Frameworks
1. Step 1: Creating a DynamoDB table in the AWS account.
2. Step 2: Creating an ASP.NET Core project.
3. Step 3: Installing NuGet packages for DynamoDB.
4. Step 4: Loading AWS credentials in SDK.
5. Step 5: Configuring Dependency Injection in Program.
• Amazon Relational Database Service is a relational database in the cloud
that is easy to set up, work with, and scale. It stores data in tables.
• To create an RDS database programmatically, you need to create an RDS
PostgreSQL instance. You can make this instance by using a method called
create_db_instance.
• Amazon DynamoDB is a NoSQL database (meaning you don't have to use
SQL programming language to query the database). It is considered fast and
scalable. It also stores data in tables.
• NoSQL Workbench for Amazon DynamoDB is a cross-platform for
clientside GUI application for modern database development and operations
and also available for Windows, macOS, and Linux. NoSQL Workbench is
a visual IDE tool that provides data modeling, data visualization, and query
development features to help us design, create, query, and manage
DynamoDB tables.

MOOC TITLE:
NoSQL Database
NoSQL databases (aka "not simplest SQL") are non-tabular databases and store
information in a different way than relational tables. NoSQL databases are
available in a number of kinds based on their data model. The fundamental types
are document, key-value, wide-column, and graph. They offer flexible schemas
and scale effortlessly with large amounts of information and excessive user loads.

Each NoSQL database has its very own specific functions. At a high level, many
NoSQL databases have below given functions:

• Flexible schemas
• Horizontal scaling
• Fast queries because of the data model
• Ease of use for developers

Difference between RDBMS and NoSQL databases


While a lot of variations exist among relational database management systems
(RDBMS) and NoSQL databases, one of the key variations is the manner the data
is modeled in the database.
NoSQL?
NoSQL databases are utilized in almost each industry. Use cases vary from the
quite critical (e.g., storing financial information and healthcare records) to the more
fun and frivolous (e.g., storing IoT readings from a smart kitty litter box).
When should NoSQL be used?
When figuring out which database to use, decision-makers usually discover one or
more of the following elements cause them to select a NoSQL database:

• Fast-paced Agile development


• Storage of structured and semi-structured information
• Huge volumes of information
• Requirements for scale-out architecture
Modern software paradigms like microservices and real-time streaming.

NoSQL database misconceptions


Over the years, many misconceptions about NoSQL databases have spread
throughout the developer community.
Relationship data is best suitable for relational databases.
NoSQL databases do not support ACID transactions.

Misconception: NoSQL databases don`t support ACID transactions


Another common misconception is that NoSQL databases do not guide ACID
transactions. Some NoSQL databases like MongoDB do, in fact, do support ACID
transactions.

Note that the way information is modeled in NoSQL databases can get rid of the
need for multi-file transactions in many of the use cases. In order to ensure data
about a user and their hobbies was up to date collectively in a relational database,
we might want to use a transaction to update information in tables. In order to do
the same in a report database, we should update a single document — no
multirecord transaction required.

MOOC TITLE:
CONNECTING TO MongoDB
MongoDB Shell (mongosh)
The MongoDB Shell, mongosh, is a fully functional JavaScript and Node.js 16.x
REPL environment for interacting with MongoDB deployments. You can use the
MongoDB Shell to test queries and operations directly with your database.
The MongoDB Shell versus the Legacy mongo Shell
The legacy mongo shell was deprecated in MongoDB 5.0 and removed in
MongoDB 6.0. The new MongoDB Shell, mongosh, offers numerous advantages
over the legacy shell. The new shell has improved:

Some legacy methods are unavailable or have been replaced with updated methods
in mongosh. To maintain backwards compatibility, the legacy methods that
mongosh supports use the same syntax as the corresponding methods in the mongo
shell.
Connect to a MongoDB Database Using Node.js
Install Node.js

First, make sure you have a supported version of Node.js installed. The current
version of MongoDB Node.js Driver requires Node 4.x or greater. For these
examples, I've used Node.js 14.15.4. See the MongoDB Compatability.
docs for more information on which version of Node.js is required for each
version of the Node.js driver.
Install the MongoDB Node.js Driver
The MongoDB Node.js Driver allows you to easily interact with MongoDB
databases from within Node.js applications. You'll need the driver in order to
connect to your database and execute the queries described in this Quick Start
series.
If you don't have the MongoDB Node.js Driver installed, you can install it with
the following command. 1 npm install mongodb copyIcon
At the time of writing, this installed version 3.6.4 of the driver. Running npm list
mongodb will display the currently installed driver version number. For more
details on the driver and installation, see the official documentation.

Create a Free MongoDB Atlas Cluster and Load the Sample Data
Next, you'll need a MongoDB database. The easiest way to get started with
MongoDB is to use Atlas, MongoDB's fully-managed database-as-a-service.
Head over to Atlas and create a new cluster in the free tier. At a high level, a cluster
is a set of nodes where copies of your database will be stored. Once your tier is
created, load the sample data.
Connect to Your Database from a Node.js Application
Now that everything is set up, it's time to code! Let's write a Node.js script that
connects to your database and lists the databases in your cluster.
Import MongoClient
The MongoDB module exports MongoClient, and that's what we'll use to connect
to a MongoDB database. We can use an instance of MongoClient to connect to a
cluster, access the database in that cluster, and close the connection to that cluster.

You might also like