SlideShare a Scribd company logo
1 of 15
Workshop
@
Ramnshee Infotech
By Jainul Musani
SESSION:01
1
SESSION:01
History of MondoDB
 Till 1970 - Data Stored in Flat File Systems.
 Flat files-No standard structure, Search is biggest problem
 DBMS Database in Early 1980.
 E.F.Codd's rule for RDBMS in Early 1990.
 SQL is language to access database information.
 Problem with RDBMS is
 Data Volume is high, speed become slower.
 Various type of information in uniform structure is difficult to
manage.
 To overcome from this problems Document base database
is introduced as NoSQL database.
Databases can be divided in 3 types:
 RDBMS (Relational Database Management System)
 OLAP (Online Analytical Processing)
 NoSQL (recently developed database)
SESSION:01
What is NoSQL Database
 NoSQL Database is used to refer a non-SQL or non
relational database.
 It provides a mechanism for storage and retrieval of
data other than tabular relations model used in
relational databases.
 NoSQL database doesn't use tables for storing data. It
is generally used to store big data and real-time web
applications.
SESSION:01
Advantages of NoSQL
 Automatic Failover
 Horizontal Scaling - unlimited
 JSON support
 Expressive query language
 Simple to learn for developers
 Data as a code
 Fast performance.
SESSION:01
What is MongoDB [1]
 Mongo DB is an Open source product by 10gen - is
free to use.
 MongoDB is a No SQL database.
 Mongo DB is a document-oriented database.
 NoSchema
 Single Object Structure
 JSON like BSON == Binary JSON
 No Complex Join
SESSION:01
What is MongoDB [2]
 MongoDB stores data in flexible, JSON-like documents,
meaning fields can vary from document to document and data
 structure can be changed over time
 The document model maps to the objects in your application
code, making data easy to work with
 Ad hoc queries, indexing, and real time aggregation provide
powerful ways to access and analyze your data
 MongoDB is a distributed database at its core, so high
availability, horizontal scaling, and geographic distribution are
built in and easy to use
SESSION:01
Term Comparisons with RDBMS
 Document = Record
 Collection = Table
 Container = Database
 Field = column (key : value pair)
SESSION:01
Document Structure
 Example:
{
_id: 563479cc8a8a4246bd27d784,
customer_id: 11,
customer_name: Smith Taylor,
order_date: 20-Jun-2021
}
key component is : _id : object id
automatically assign by database
24 digits alpha-numeric
SESSION:01
Data Type Supports
 String
 Integer
 Boolean
 Double
 Min/Max key
 Arrays
 Object
 Null
 Symbol
 Date
SESSION:01
Download and Install MongoDB
 http://www.mongodb.org/downloads (Register
and then donwload)
 https://www.mongodb.com/try/download/commu
nity (Free trial version)
 Default port of MongoDB server is 27017
 connection : https://localhost:27017
SESSION:01
Start MongoDB
 JavaScript Driver : bin folder -> mongo.exe
 it will prompt for javascript prompt >
 write a sample javascript code i.e.
 > var name="Jainul"
 > print("My Name: ",name);
My Name: Jainul <<--- OUTPUT
 >
SESSION:01
Use GUI MongoDB
 Use MongoDB GUI by installing MongoDB Compass
 It will install "mongodb-compass...exe" in bin
folder
 It will run and provide GUI interface to interact
with database
 You can use Robo 3T / Studio 3T a GUI for
https://robomongo.org/
SESSION:01
Connecting MongoDB with front end
 --------JavaScript code for connection ------------
 import { MongoClient } from 'mongodb'
 export async function connect () {
 // Connection URL
 const url = 'mongodb://localhost:27017/my_database'
 let db
 try {
 db = await MongoClient.connect(url)
 console.log('Connected successfully!')
 } catch (err) {
 // Handle error
 }
 return db
 }
SESSION:01
Connecting MongoDB with front end
 ============ C# connectivity =============
 var client = new MongoClient();
 var database = client.GetDatabase("test");
 var collection =
database.GetCollection("restaurants");
 ------------------------------------------------------------
SESSION:01

More Related Content

What's hot (20)

Nosql seminar
Nosql seminarNosql seminar
Nosql seminar
 
NoSQL databases
NoSQL databasesNoSQL databases
NoSQL databases
 
NoSQL Slideshare Presentation
NoSQL Slideshare Presentation NoSQL Slideshare Presentation
NoSQL Slideshare Presentation
 
NoSQL Databases
NoSQL DatabasesNoSQL Databases
NoSQL Databases
 
Why no sql ? Why Couchbase ?
Why no sql ? Why Couchbase ?Why no sql ? Why Couchbase ?
Why no sql ? Why Couchbase ?
 
MongoDB: An Introduction - june-2011
MongoDB:  An Introduction - june-2011MongoDB:  An Introduction - june-2011
MongoDB: An Introduction - june-2011
 
Nosql databases
Nosql databasesNosql databases
Nosql databases
 
Appache Cassandra
Appache Cassandra  Appache Cassandra
Appache Cassandra
 
Introduction to NoSQL Database
Introduction to NoSQL DatabaseIntroduction to NoSQL Database
Introduction to NoSQL Database
 
Mongodb vs mysql
Mongodb vs mysqlMongodb vs mysql
Mongodb vs mysql
 
NoSql Data Management
NoSql Data ManagementNoSql Data Management
NoSql Data Management
 
Klevis Mino: MongoDB
Klevis Mino: MongoDBKlevis Mino: MongoDB
Klevis Mino: MongoDB
 
Selecting best NoSQL
Selecting best NoSQL Selecting best NoSQL
Selecting best NoSQL
 
My sql vs mongo
My sql vs mongoMy sql vs mongo
My sql vs mongo
 
Key-Value NoSQL Database
Key-Value NoSQL DatabaseKey-Value NoSQL Database
Key-Value NoSQL Database
 
An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDB
 
NoSQL databases
NoSQL databasesNoSQL databases
NoSQL databases
 
NoSql Databases
NoSql DatabasesNoSql Databases
NoSql Databases
 
Mongo db intro.pptx
Mongo db intro.pptxMongo db intro.pptx
Mongo db intro.pptx
 
An Intro to NoSQL Databases
An Intro to NoSQL DatabasesAn Intro to NoSQL Databases
An Intro to NoSQL Databases
 

Similar to MongoDB-SESION01

Redis Cashe is an open-source distributed in-memory data store.
Redis Cashe is an open-source distributed in-memory data store.Redis Cashe is an open-source distributed in-memory data store.
Redis Cashe is an open-source distributed in-memory data store.Artan Ajredini
 
3170722_BDA_GTU_Study_Material_Presentations_Unit-3_29092021094744AM.pdf
3170722_BDA_GTU_Study_Material_Presentations_Unit-3_29092021094744AM.pdf3170722_BDA_GTU_Study_Material_Presentations_Unit-3_29092021094744AM.pdf
3170722_BDA_GTU_Study_Material_Presentations_Unit-3_29092021094744AM.pdfKrishnaShah908060
 
1 introduction
1   introduction1   introduction
1 introductionNgeam Soly
 
Challenges Management and Opportunities of Cloud DBA
Challenges Management and Opportunities of Cloud DBAChallenges Management and Opportunities of Cloud DBA
Challenges Management and Opportunities of Cloud DBAinventy
 
Introduction to MongoDB and its best practices
Introduction to MongoDB and its best practicesIntroduction to MongoDB and its best practices
Introduction to MongoDB and its best practicesAshishRathore72
 
1. introduction to no sql
1. introduction to no sql1. introduction to no sql
1. introduction to no sqlAnuja Gunale
 
DEE 431 Introduction to DBMS Slide 1
DEE 431 Introduction to DBMS Slide 1DEE 431 Introduction to DBMS Slide 1
DEE 431 Introduction to DBMS Slide 1YOGESH SINGH
 
Database Management Systems
Database Management SystemsDatabase Management Systems
Database Management SystemsGeorge Grayson
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQLbalwinders
 
Non relational databases-no sql
Non relational databases-no sqlNon relational databases-no sql
Non relational databases-no sqlRam kumar
 
nosql [Autosaved].pptx
nosql [Autosaved].pptxnosql [Autosaved].pptx
nosql [Autosaved].pptxIndrani Sen
 
data base system to new data science lerne
data base system to new data science lernedata base system to new data science lerne
data base system to new data science lernetarunprajapati0t
 

Similar to MongoDB-SESION01 (20)

Redis Cashe is an open-source distributed in-memory data store.
Redis Cashe is an open-source distributed in-memory data store.Redis Cashe is an open-source distributed in-memory data store.
Redis Cashe is an open-source distributed in-memory data store.
 
Unit 3 MongDB
Unit 3 MongDBUnit 3 MongDB
Unit 3 MongDB
 
No Sql Databases
No Sql DatabasesNo Sql Databases
No Sql Databases
 
3170722_BDA_GTU_Study_Material_Presentations_Unit-3_29092021094744AM.pdf
3170722_BDA_GTU_Study_Material_Presentations_Unit-3_29092021094744AM.pdf3170722_BDA_GTU_Study_Material_Presentations_Unit-3_29092021094744AM.pdf
3170722_BDA_GTU_Study_Material_Presentations_Unit-3_29092021094744AM.pdf
 
1 introduction
1   introduction1   introduction
1 introduction
 
Challenges Management and Opportunities of Cloud DBA
Challenges Management and Opportunities of Cloud DBAChallenges Management and Opportunities of Cloud DBA
Challenges Management and Opportunities of Cloud DBA
 
Database
DatabaseDatabase
Database
 
Introduction to MongoDB and its best practices
Introduction to MongoDB and its best practicesIntroduction to MongoDB and its best practices
Introduction to MongoDB and its best practices
 
1. introduction to no sql
1. introduction to no sql1. introduction to no sql
1. introduction to no sql
 
DEE 431 Introduction to DBMS Slide 1
DEE 431 Introduction to DBMS Slide 1DEE 431 Introduction to DBMS Slide 1
DEE 431 Introduction to DBMS Slide 1
 
Database Management Systems
Database Management SystemsDatabase Management Systems
Database Management Systems
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
Mongo DB
Mongo DBMongo DB
Mongo DB
 
Non relational databases-no sql
Non relational databases-no sqlNon relational databases-no sql
Non relational databases-no sql
 
No sql
No sqlNo sql
No sql
 
nosql [Autosaved].pptx
nosql [Autosaved].pptxnosql [Autosaved].pptx
nosql [Autosaved].pptx
 
data base system to new data science lerne
data base system to new data science lernedata base system to new data science lerne
data base system to new data science lerne
 
SQL ARPIT YADAV.pptx
SQL ARPIT YADAV.pptxSQL ARPIT YADAV.pptx
SQL ARPIT YADAV.pptx
 
Report 1.0.docx
Report 1.0.docxReport 1.0.docx
Report 1.0.docx
 
Report 2.0.docx
Report 2.0.docxReport 2.0.docx
Report 2.0.docx
 

More from Jainul Musani

Python: The Versatile Programming Language - Introduction
Python: The Versatile Programming Language - IntroductionPython: The Versatile Programming Language - Introduction
Python: The Versatile Programming Language - IntroductionJainul Musani
 
Python a Versatile Programming Language - Introduction
Python a Versatile Programming Language - IntroductionPython a Versatile Programming Language - Introduction
Python a Versatile Programming Language - IntroductionJainul Musani
 
React js t8 - inlinecss
React js   t8 - inlinecssReact js   t8 - inlinecss
React js t8 - inlinecssJainul Musani
 
React js t7 - forms-events
React js   t7 - forms-eventsReact js   t7 - forms-events
React js t7 - forms-eventsJainul Musani
 
React js t6 -lifecycle
React js   t6 -lifecycleReact js   t6 -lifecycle
React js t6 -lifecycleJainul Musani
 
React js t4 - components
React js   t4 - componentsReact js   t4 - components
React js t4 - componentsJainul Musani
 
React js t1 - introduction
React js   t1 - introductionReact js   t1 - introduction
React js t1 - introductionJainul Musani
 
Fundamentals of JDBC
Fundamentals of JDBCFundamentals of JDBC
Fundamentals of JDBCJainul Musani
 

More from Jainul Musani (20)

Python: The Versatile Programming Language - Introduction
Python: The Versatile Programming Language - IntroductionPython: The Versatile Programming Language - Introduction
Python: The Versatile Programming Language - Introduction
 
Python a Versatile Programming Language - Introduction
Python a Versatile Programming Language - IntroductionPython a Versatile Programming Language - Introduction
Python a Versatile Programming Language - Introduction
 
React js t8 - inlinecss
React js   t8 - inlinecssReact js   t8 - inlinecss
React js t8 - inlinecss
 
React js t7 - forms-events
React js   t7 - forms-eventsReact js   t7 - forms-events
React js t7 - forms-events
 
React js t6 -lifecycle
React js   t6 -lifecycleReact js   t6 -lifecycle
React js t6 -lifecycle
 
React js t5 - state
React js   t5 - stateReact js   t5 - state
React js t5 - state
 
React js t4 - components
React js   t4 - componentsReact js   t4 - components
React js t4 - components
 
React js t3 - es6
React js   t3 - es6React js   t3 - es6
React js t3 - es6
 
React js t2 - jsx
React js   t2 - jsxReact js   t2 - jsx
React js t2 - jsx
 
React js t1 - introduction
React js   t1 - introductionReact js   t1 - introduction
React js t1 - introduction
 
ExpressJs Session01
ExpressJs Session01ExpressJs Session01
ExpressJs Session01
 
NodeJs Session03
NodeJs Session03NodeJs Session03
NodeJs Session03
 
NodeJs Session02
NodeJs Session02NodeJs Session02
NodeJs Session02
 
Nodejs Session01
Nodejs Session01Nodejs Session01
Nodejs Session01
 
Java exercise1
Java exercise1Java exercise1
Java exercise1
 
Fundamentals of JDBC
Fundamentals of JDBCFundamentals of JDBC
Fundamentals of JDBC
 
Core Java Special
Core Java SpecialCore Java Special
Core Java Special
 
Core Java Special
Core Java SpecialCore Java Special
Core Java Special
 
MongoDB-SESSION03
MongoDB-SESSION03MongoDB-SESSION03
MongoDB-SESSION03
 
4+1archi
4+1archi4+1archi
4+1archi
 

Recently uploaded

NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactisticshameyhk98
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptxJoelynRubio1
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationNeilDeclaro1
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 

Recently uploaded (20)

NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 

MongoDB-SESION01

  • 2. SESSION:01 History of MondoDB  Till 1970 - Data Stored in Flat File Systems.  Flat files-No standard structure, Search is biggest problem  DBMS Database in Early 1980.  E.F.Codd's rule for RDBMS in Early 1990.  SQL is language to access database information.  Problem with RDBMS is  Data Volume is high, speed become slower.  Various type of information in uniform structure is difficult to manage.  To overcome from this problems Document base database is introduced as NoSQL database.
  • 3. Databases can be divided in 3 types:  RDBMS (Relational Database Management System)  OLAP (Online Analytical Processing)  NoSQL (recently developed database) SESSION:01
  • 4. What is NoSQL Database  NoSQL Database is used to refer a non-SQL or non relational database.  It provides a mechanism for storage and retrieval of data other than tabular relations model used in relational databases.  NoSQL database doesn't use tables for storing data. It is generally used to store big data and real-time web applications. SESSION:01
  • 5. Advantages of NoSQL  Automatic Failover  Horizontal Scaling - unlimited  JSON support  Expressive query language  Simple to learn for developers  Data as a code  Fast performance. SESSION:01
  • 6. What is MongoDB [1]  Mongo DB is an Open source product by 10gen - is free to use.  MongoDB is a No SQL database.  Mongo DB is a document-oriented database.  NoSchema  Single Object Structure  JSON like BSON == Binary JSON  No Complex Join SESSION:01
  • 7. What is MongoDB [2]  MongoDB stores data in flexible, JSON-like documents, meaning fields can vary from document to document and data  structure can be changed over time  The document model maps to the objects in your application code, making data easy to work with  Ad hoc queries, indexing, and real time aggregation provide powerful ways to access and analyze your data  MongoDB is a distributed database at its core, so high availability, horizontal scaling, and geographic distribution are built in and easy to use SESSION:01
  • 8. Term Comparisons with RDBMS  Document = Record  Collection = Table  Container = Database  Field = column (key : value pair) SESSION:01
  • 9. Document Structure  Example: { _id: 563479cc8a8a4246bd27d784, customer_id: 11, customer_name: Smith Taylor, order_date: 20-Jun-2021 } key component is : _id : object id automatically assign by database 24 digits alpha-numeric SESSION:01
  • 10. Data Type Supports  String  Integer  Boolean  Double  Min/Max key  Arrays  Object  Null  Symbol  Date SESSION:01
  • 11. Download and Install MongoDB  http://www.mongodb.org/downloads (Register and then donwload)  https://www.mongodb.com/try/download/commu nity (Free trial version)  Default port of MongoDB server is 27017  connection : https://localhost:27017 SESSION:01
  • 12. Start MongoDB  JavaScript Driver : bin folder -> mongo.exe  it will prompt for javascript prompt >  write a sample javascript code i.e.  > var name="Jainul"  > print("My Name: ",name); My Name: Jainul <<--- OUTPUT  > SESSION:01
  • 13. Use GUI MongoDB  Use MongoDB GUI by installing MongoDB Compass  It will install "mongodb-compass...exe" in bin folder  It will run and provide GUI interface to interact with database  You can use Robo 3T / Studio 3T a GUI for https://robomongo.org/ SESSION:01
  • 14. Connecting MongoDB with front end  --------JavaScript code for connection ------------  import { MongoClient } from 'mongodb'  export async function connect () {  // Connection URL  const url = 'mongodb://localhost:27017/my_database'  let db  try {  db = await MongoClient.connect(url)  console.log('Connected successfully!')  } catch (err) {  // Handle error  }  return db  } SESSION:01
  • 15. Connecting MongoDB with front end  ============ C# connectivity =============  var client = new MongoClient();  var database = client.GetDatabase("test");  var collection = database.GetCollection("restaurants");  ------------------------------------------------------------ SESSION:01