Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
gfnork node.js workshop Lesson #5 node.js datab...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
gfnork
June 20, 2014
Programming
0
470
gfnork node.js workshop Lesson #5 node.js databases
Redis, NoSQL, MongoDB, drivers
gfnork
June 20, 2014
Tweet
Share
More Decks by gfnork
See All by gfnork
Basic Mobile Application Design
freundschaft
0
510
gfnork node.js workshop Lesson #1 JavaScript Basics
freundschaft
0
960
gfnork node.js workshop Lesson #2 JavaScript Async
freundschaft
0
960
gfnork node.js workshop Lesson #3 node.js basics
freundschaft
0
470
gfnork node.js workshop Lesson #4 middleware for node
freundschaft
0
520
gfnork node.js workshop Lesson #6 Unit testing
freundschaft
0
460
Other Decks in Programming
See All in Programming
CSC307 Lecture 06
javiergs
PRO
0
690
MUSUBIXとは
nahisaho
0
140
Data-Centric Kaggle
isax1015
2
780
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6.1k
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
130
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
140
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
200
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.3k
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
180
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
210
並行開発のためのコードレビュー
miyukiw
0
240
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
Featured
See All Featured
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
83
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
640
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
190
Paper Plane (Part 1)
katiecoart
PRO
0
4.3k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
53
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
96
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
Faster Mobile Websites
deanohume
310
31k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
96
Transcript
None
2
3
4
5
6
7 http://redis.io/download
8
9
10 Import the redis driver make an Instance of a
connection
11
12 Insert Command Value Callback Key
13
14 Load Command Key Callback
15
16
17
18
19
20
21 Node 1 Primary Node 1 Secondary Node 1 Secondary
22 Node 1 Node 1 Secondary Node 1 Secondary Election
23 Node 1 Node 1 Node 1 Secondary Primary
24 Node 1 Node 1 Secondary Node 1 Secondary Primary
25
26 a c d Shard1 b e Shard2
27 a c1 d Shard1 b e Shard2 c2
28 a c1 d Shard1 b e Shard2 c2
29 mongod mongod mongod Replica Set mongod mongod mongod Replica
Set mongod mongod mongod Replica Set mongod mongod mongod Config Servers mongos Client
30
31 http://www.mongodb.org/downloads
32
33
34
35
36
37
38
39 assigning Connection to db import Connectiong to db Host
Adress Port Database Name
40
41 Get a Collection Collection Name Insert Command A Java
Script Object Callback
42
43
44
45 Returns a Collection Search Command Converts a Cursor to
an Array
46 Returns a single Object can be used like any
other Object
47
48
49 import Connectiong to db Host Adress Port Database Name
assigning Connection to Variable db
50 assigning Connection to Variable db
51
52 Reactiong to Event Event Name Handling Error Where the
Ountput gets piped to String attached to Error Message
53
54 Event that will only be done once Event Name
55
56 Schema Name Mongoose Object Function for defining Schemas Variables
57
58 Model Name Function for creating Models Model Name Schema
Name
59
60
61
62 Creating new Instance of Model JS Object matching Schema
63
64 Function for saving
65
66
67
68 Returns An Array of Objects
69
70
71
72 Key Searches Objects with the Name 'Geek' and returns
the Value for the Key 'skills'
73
74
75
76
77 Get a Collection Command for making Indexes Name of
the Key that has to be indexed 1 = Ascending 2 = Descending
78
79
80
81
82
83
84
85
86
87