SlideShare a Scribd company logo
1 of 128
Download to read offline

›
›
›

›
›
›

›
›

›
›
›
“Drum prüfe,
wer sich ewig bindet.”
Friedrich Schiller


› SET note1:title "Mittag"
› SET note1:message "nicht vergessen"
› KEYS note1:*
› GET note1:title
› DEL note1:title note1:message
›
›
›
›
›
›
›
›
›
›
›
›
›
›
using (var documentStore = new EmbeddableDocumentStore{
RunInMemory = true}.Initialize())
{
using (var session = documentStore.OpenSession())
{
// Run complex test scenarious
}
}
›
›
›
›
›
Ayende Rahien on the HTTP API - http://ravendb.net/documentation/docs-http-api-restful
›
›
›
C:>curl -X GET http://localhost:8080/docs/Categories/1 -i
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
ETag: 00000000-0000-0200-0000-000000000004
{
"Name" : "Normal Importance",
"Color" : "green"
}
IBM’s
IMS
Codd publishes
relational model paper
in 1970
1966 1969 1970 1985 2000 2004 2007
Agile becoming more
popular
1990’s 2009
CODASYL model
published
Term “object-oriented
database” appears
Brewer’s
CAP born
Google
BigTable
Amazon
Dynamo
Apache Cassandra
initial release
2008
MongoDB initial
release
1973 1974
INGRES
SQL
invented
1977
Oracle
founded
10gen
founded
NoSQL
Movement
›
›
›
–
› use WebNote
› db.Notes.save(
{
Title: 'Mittag',
Message: 'nicht vergessen‘
}
);
› db.Notes.save
–
for(i=0; i<1000; i++) {
['quiz', 'essay', 'exam'].forEach(function(name) {
var score = Math.floor(Math.random() * 50) + 50;
db.scores.save({student: i, name: name, score:
score});
});
}
db.scores.count();
–
› db.Notes.find();
› db.Notes.find({ Title: /Test/i });
› db.Notes.find(
{ "Categories.Color": "red"}).limit(1);
–
› db.Notes.update({Title: 'Test'},
{'$set': {Categories: []}});
› db.Notes.update({Title: 'Test'},
{'$push': {
Categories:
{Color: 'Red'}
}
});
–
› db.dropDatabase();
› db.Notes.drop();
› db.Notes.remove();
use digg
db.stories.findOne();
› use digg;
› db.people.update({name: 'Smith'},
{'$set': {interests: []}});
› db.people.update({name: 'Smith'},
{'$push': {interests: ['chess']}});
var map = function() {
emit(this.user.name, {diggs: this.diggs,
posts: 0});
};
var reduce = function(key, values) {
var diggs = 0;
var posts = 0;
values.forEach(function(doc) {
diggs += doc.diggs;
posts += 1;
});
return {diggs: diggs, posts: posts};
};
db.stories.mapReduce(map, reduce, {out:
'digg_users'});
db.digg_users.find();
http://bsonspec.org

> db.shapes.find()
› { _id: "1", type: "c", area: 3.14, radius: 1}
› { _id: "2", type: "s", area: 4, length: 2}
› { _id: "3", type: "r", area: 10, length: 5, width: 2}
// Shapes mit radius > 0 finden
> db.shapes.find( { radius: { $gt: 0 } } )
blogs: {
author : “Johannes",
date : ISODate("2011-09-18T09:56:06.298Z"),
comments : [
{
author : “Klaus",
date : ISODate("2011-09-19T09:56:06.298Z"),
text : “toller Artikel"
}
]
}
blogs: { _id: 1000,
author: “Johannes",
date: ISODate("2011-09-18"),
comments: [ {comment : 1)} ]}
comments : { _id : 1,
blog: 1000,
author : “Klaus",
date : ISODate("2011-09-19")}
> blog = db.blogs.find({ text: "Destination Moon" });
> db.comments.find( { blog: blog._id } );
// Jedes Produkt verlinkt die IDs der Kategorien
products:
{ _id: 10, name: "Destination Moon",
category_ids: [ 20, 30 ] }
// Jedes Produkt verlinkt die IDs der Kategorien
products:
{ _id: 10, name: "Destination Moon",
category_ids: [ 20, 30 ] }
// Jede Kategorie verlinkt die IDs der Produkte
categories:
{ _id: 20, name: "adventure",
product_ids: [ 10, 11, 12 ] }
categories:
{ _id: 21, name: "movie",
product_ids: [ 10 ] }
// Jedes Produkt verlinkt die IDs der Kategorien
products:
{ _id: 10, name: "Destination Moon",
category_ids: [ 20, 30 ] }
// Jede Kategorie verlinkt die IDs der Produkte
categories:
{ _id: 20, name: "adventure",
product_ids: [ 10, 11, 12 ] }
categories:
{ _id: 21, name: "movie",
product_ids: [ 10 ] }
// Alle Kategorien für ein Produkt
> db.categories.find( { product_ids: 10 } )
// Jedes Produkt verlinkt die IDs der Kategorien
products:
{ _id: 10, name: "Destination Moon",
category_ids: [ 20, 30 ] }
// Kategorien beinhalten keine Assoziationen
categories:
{ _id: 20,
name: "adventure"}
// Jedes Produkt verlinkt die IDs der Kategorien
products:
{ _id: 10, name: "Destination Moon",
category_ids: [ 20, 30 ] }
// Kategorien beinhalten keine Assoziationen
categories:
{ _id: 20,
name: "adventure"}
// Alle Produkte für eine Kategorie
> db.products.find( { category_ids: 20 } )
// Jedes Produkt verlinkt die IDs der Kategorien
products:
{ _id: 10, name: "Destination Moon",
category_ids: [ 20, 30 ] }
// Kategorien beinhalten keine Assoziationen
categories:
{ _id: 20,
name: "adventure"}
// Alle Produkte für eine Kategorie
> db.products.find( { category_ids: 20 } )
// Alle Kategorien für ein Produkt product
> product = db.products.find( { _id: some_id } )
> db.categories.find({_id: {$in : product.category_ids}})
“ ”
J.B. Rainsberger

using (var documentStore = new EmbeddableDocumentStore{
RunInMemory = true}.Initialize())
{
using (var session = documentStore.OpenSession())
{
// Run complex test scenarious
}
}
2017 - NoSQL Vorlesung Mosbach
2017 - NoSQL Vorlesung Mosbach
2017 - NoSQL Vorlesung Mosbach
2017 - NoSQL Vorlesung Mosbach

More Related Content

What's hot

Assalamualaykum warahmatullahi wabarakatuu
Assalamualaykum warahmatullahi wabarakatuuAssalamualaykum warahmatullahi wabarakatuu
Assalamualaykum warahmatullahi wabarakatuuiswan_di
 
Jquery Preparation
Jquery PreparationJquery Preparation
Jquery Preparationumesh patil
 
Php codigos interfaces fredy guzman cusihunca
Php codigos interfaces   fredy guzman cusihuncaPhp codigos interfaces   fredy guzman cusihunca
Php codigos interfaces fredy guzman cusihuncaTigger_Fred
 
MySQL Э.Насанжаргал
MySQL Э.НасанжаргалMySQL Э.Насанжаргал
MySQL Э.НасанжаргалSingleton
 
アプリ設定の保存をシンプルに
アプリ設定の保存をシンプルにアプリ設定の保存をシンプルに
アプリ設定の保存をシンプルにsusan335
 
RxSwift 예제로 감잡기
RxSwift 예제로 감잡기RxSwift 예제로 감잡기
RxSwift 예제로 감잡기Yongha Yoo
 
Javascript per applicazioni complesse - Lo Stretto digitale
Javascript per applicazioni complesse - Lo Stretto digitaleJavascript per applicazioni complesse - Lo Stretto digitale
Javascript per applicazioni complesse - Lo Stretto digitaleGiuseppe Pizzimenti
 
Practical JavaScript Programming - Session 2/8
Practical JavaScript Programming - Session 2/8Practical JavaScript Programming - Session 2/8
Practical JavaScript Programming - Session 2/8Wilson Su
 
Dennis zapana perez
Dennis zapana perezDennis zapana perez
Dennis zapana perezdennis_elvis
 
Lab 10 rus razvan
Lab 10   rus razvanLab 10   rus razvan
Lab 10 rus razvanRazvan Rus
 
Introduction to Service Worker
Introduction to Service WorkerIntroduction to Service Worker
Introduction to Service WorkerShogo Sensui
 
Documentacion edderson callpa_ortiz
Documentacion edderson callpa_ortizDocumentacion edderson callpa_ortiz
Documentacion edderson callpa_ortizEdderson J. Ortiz
 

What's hot (20)

Assalamualaykum warahmatullahi wabarakatuu
Assalamualaykum warahmatullahi wabarakatuuAssalamualaykum warahmatullahi wabarakatuu
Assalamualaykum warahmatullahi wabarakatuu
 
Jquery2
Jquery2Jquery2
Jquery2
 
With enter
With enterWith enter
With enter
 
Jquery Preparation
Jquery PreparationJquery Preparation
Jquery Preparation
 
Php codigos interfaces fredy guzman cusihunca
Php codigos interfaces   fredy guzman cusihuncaPhp codigos interfaces   fredy guzman cusihunca
Php codigos interfaces fredy guzman cusihunca
 
MySQL Э.Насанжаргал
MySQL Э.НасанжаргалMySQL Э.Насанжаргал
MySQL Э.Насанжаргал
 
Sis quiz
Sis quizSis quiz
Sis quiz
 
アプリ設定の保存をシンプルに
アプリ設定の保存をシンプルにアプリ設定の保存をシンプルに
アプリ設定の保存をシンプルに
 
es6.concurrency()
es6.concurrency()es6.concurrency()
es6.concurrency()
 
RxSwift 예제로 감잡기
RxSwift 예제로 감잡기RxSwift 예제로 감잡기
RxSwift 예제로 감잡기
 
Iteratory
IteratoryIteratory
Iteratory
 
Jsq
JsqJsq
Jsq
 
Javascript per applicazioni complesse - Lo Stretto digitale
Javascript per applicazioni complesse - Lo Stretto digitaleJavascript per applicazioni complesse - Lo Stretto digitale
Javascript per applicazioni complesse - Lo Stretto digitale
 
Practical JavaScript Programming - Session 2/8
Practical JavaScript Programming - Session 2/8Practical JavaScript Programming - Session 2/8
Practical JavaScript Programming - Session 2/8
 
Dennis zapana perez
Dennis zapana perezDennis zapana perez
Dennis zapana perez
 
Lab 10 rus razvan
Lab 10   rus razvanLab 10   rus razvan
Lab 10 rus razvan
 
Introduction to Service Worker
Introduction to Service WorkerIntroduction to Service Worker
Introduction to Service Worker
 
Test
TestTest
Test
 
Documentacion edderson callpa_ortiz
Documentacion edderson callpa_ortizDocumentacion edderson callpa_ortiz
Documentacion edderson callpa_ortiz
 
jQuery入門
jQuery入門jQuery入門
jQuery入門
 

Viewers also liked

2012-08-29 - NoSQL Bootcamp (Redis, RavenDB & MongoDB für .NET Entwickler)
2012-08-29 - NoSQL Bootcamp (Redis, RavenDB & MongoDB für .NET Entwickler)2012-08-29 - NoSQL Bootcamp (Redis, RavenDB & MongoDB für .NET Entwickler)
2012-08-29 - NoSQL Bootcamp (Redis, RavenDB & MongoDB für .NET Entwickler)Johannes Hoppe
 
DMDW Lesson 05 + 06 + 07 - Data Mining Applied
DMDW Lesson 05 + 06 + 07 - Data Mining AppliedDMDW Lesson 05 + 06 + 07 - Data Mining Applied
DMDW Lesson 05 + 06 + 07 - Data Mining AppliedJohannes Hoppe
 
DMDW Lesson 01 - Introduction
DMDW Lesson 01 - IntroductionDMDW Lesson 01 - Introduction
DMDW Lesson 01 - IntroductionJohannes Hoppe
 
Ria 09 trends_and_technologies
Ria 09 trends_and_technologiesRia 09 trends_and_technologies
Ria 09 trends_and_technologiesJohannes Hoppe
 
DMDW Lesson 08 - Further Data Mining Algorithms
DMDW Lesson 08 - Further Data Mining AlgorithmsDMDW Lesson 08 - Further Data Mining Algorithms
DMDW Lesson 08 - Further Data Mining AlgorithmsJohannes Hoppe
 
DMDW Lesson 03 - Data Warehouse Theory
DMDW Lesson 03 - Data Warehouse TheoryDMDW Lesson 03 - Data Warehouse Theory
DMDW Lesson 03 - Data Warehouse TheoryJohannes Hoppe
 
2013 02-26 - Software Tests with Mongo db
2013 02-26 - Software Tests with Mongo db2013 02-26 - Software Tests with Mongo db
2013 02-26 - Software Tests with Mongo dbJohannes Hoppe
 
2012-09-17 - WDC12: Node.js & MongoDB
2012-09-17 - WDC12: Node.js & MongoDB2012-09-17 - WDC12: Node.js & MongoDB
2012-09-17 - WDC12: Node.js & MongoDBJohannes Hoppe
 
DMDW Extra Lesson - NoSql and MongoDB
DMDW  Extra Lesson - NoSql and MongoDBDMDW  Extra Lesson - NoSql and MongoDB
DMDW Extra Lesson - NoSql and MongoDBJohannes Hoppe
 
Patterns / Antipatterns with NoSQL
Patterns / Antipatterns with NoSQLPatterns / Antipatterns with NoSQL
Patterns / Antipatterns with NoSQLLuca Bonmassar
 
DMDW Lesson 04 - Data Mining Theory
DMDW Lesson 04 - Data Mining TheoryDMDW Lesson 04 - Data Mining Theory
DMDW Lesson 04 - Data Mining TheoryJohannes Hoppe
 
2015 02-09 - NoSQL Vorlesung Mosbach
2015 02-09 - NoSQL Vorlesung Mosbach2015 02-09 - NoSQL Vorlesung Mosbach
2015 02-09 - NoSQL Vorlesung MosbachJohannes Hoppe
 
Getting Release Management Right for SQL Server
Getting Release Management Right for SQL ServerGetting Release Management Right for SQL Server
Getting Release Management Right for SQL ServerAlex Yates
 
Presto: Distributed SQL on Anything - Strata Hadoop 2017 San Jose, CA
Presto: Distributed SQL on Anything -  Strata Hadoop 2017 San Jose, CAPresto: Distributed SQL on Anything -  Strata Hadoop 2017 San Jose, CA
Presto: Distributed SQL on Anything - Strata Hadoop 2017 San Jose, CAkbajda
 
Multi-model database
Multi-model databaseMulti-model database
Multi-model databaseJiaheng Lu
 
Exkurs: Save the pixel
Exkurs: Save the pixelExkurs: Save the pixel
Exkurs: Save the pixelJohannes Hoppe
 
Jeudis du Libre - MySQL comme Document Store
Jeudis du Libre - MySQL comme Document StoreJeudis du Libre - MySQL comme Document Store
Jeudis du Libre - MySQL comme Document StoreFrederic Descamps
 
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)SANG WON PARK
 
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
NOSQL Meets Relational - The MySQL Ecosystem Gains More FlexibilityNOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
NOSQL Meets Relational - The MySQL Ecosystem Gains More FlexibilityIvan Zoratti
 

Viewers also liked (20)

NoSQL - Hands on
NoSQL - Hands onNoSQL - Hands on
NoSQL - Hands on
 
2012-08-29 - NoSQL Bootcamp (Redis, RavenDB & MongoDB für .NET Entwickler)
2012-08-29 - NoSQL Bootcamp (Redis, RavenDB & MongoDB für .NET Entwickler)2012-08-29 - NoSQL Bootcamp (Redis, RavenDB & MongoDB für .NET Entwickler)
2012-08-29 - NoSQL Bootcamp (Redis, RavenDB & MongoDB für .NET Entwickler)
 
DMDW Lesson 05 + 06 + 07 - Data Mining Applied
DMDW Lesson 05 + 06 + 07 - Data Mining AppliedDMDW Lesson 05 + 06 + 07 - Data Mining Applied
DMDW Lesson 05 + 06 + 07 - Data Mining Applied
 
DMDW Lesson 01 - Introduction
DMDW Lesson 01 - IntroductionDMDW Lesson 01 - Introduction
DMDW Lesson 01 - Introduction
 
Ria 09 trends_and_technologies
Ria 09 trends_and_technologiesRia 09 trends_and_technologies
Ria 09 trends_and_technologies
 
DMDW Lesson 08 - Further Data Mining Algorithms
DMDW Lesson 08 - Further Data Mining AlgorithmsDMDW Lesson 08 - Further Data Mining Algorithms
DMDW Lesson 08 - Further Data Mining Algorithms
 
DMDW Lesson 03 - Data Warehouse Theory
DMDW Lesson 03 - Data Warehouse TheoryDMDW Lesson 03 - Data Warehouse Theory
DMDW Lesson 03 - Data Warehouse Theory
 
2013 02-26 - Software Tests with Mongo db
2013 02-26 - Software Tests with Mongo db2013 02-26 - Software Tests with Mongo db
2013 02-26 - Software Tests with Mongo db
 
2012-09-17 - WDC12: Node.js & MongoDB
2012-09-17 - WDC12: Node.js & MongoDB2012-09-17 - WDC12: Node.js & MongoDB
2012-09-17 - WDC12: Node.js & MongoDB
 
DMDW Extra Lesson - NoSql and MongoDB
DMDW  Extra Lesson - NoSql and MongoDBDMDW  Extra Lesson - NoSql and MongoDB
DMDW Extra Lesson - NoSql and MongoDB
 
Patterns / Antipatterns with NoSQL
Patterns / Antipatterns with NoSQLPatterns / Antipatterns with NoSQL
Patterns / Antipatterns with NoSQL
 
DMDW Lesson 04 - Data Mining Theory
DMDW Lesson 04 - Data Mining TheoryDMDW Lesson 04 - Data Mining Theory
DMDW Lesson 04 - Data Mining Theory
 
2015 02-09 - NoSQL Vorlesung Mosbach
2015 02-09 - NoSQL Vorlesung Mosbach2015 02-09 - NoSQL Vorlesung Mosbach
2015 02-09 - NoSQL Vorlesung Mosbach
 
Getting Release Management Right for SQL Server
Getting Release Management Right for SQL ServerGetting Release Management Right for SQL Server
Getting Release Management Right for SQL Server
 
Presto: Distributed SQL on Anything - Strata Hadoop 2017 San Jose, CA
Presto: Distributed SQL on Anything -  Strata Hadoop 2017 San Jose, CAPresto: Distributed SQL on Anything -  Strata Hadoop 2017 San Jose, CA
Presto: Distributed SQL on Anything - Strata Hadoop 2017 San Jose, CA
 
Multi-model database
Multi-model databaseMulti-model database
Multi-model database
 
Exkurs: Save the pixel
Exkurs: Save the pixelExkurs: Save the pixel
Exkurs: Save the pixel
 
Jeudis du Libre - MySQL comme Document Store
Jeudis du Libre - MySQL comme Document StoreJeudis du Libre - MySQL comme Document Store
Jeudis du Libre - MySQL comme Document Store
 
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)
 
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
NOSQL Meets Relational - The MySQL Ecosystem Gains More FlexibilityNOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
 

More from Johannes Hoppe

Einführung in Angular 2
Einführung in Angular 2Einführung in Angular 2
Einführung in Angular 2Johannes Hoppe
 
MDC kompakt 2014: Hybride Apps mit Cordova, AngularJS und Ionic
MDC kompakt 2014: Hybride Apps mit Cordova, AngularJS und IonicMDC kompakt 2014: Hybride Apps mit Cordova, AngularJS und Ionic
MDC kompakt 2014: Hybride Apps mit Cordova, AngularJS und IonicJohannes Hoppe
 
2012-06-25 - MapReduce auf Azure
2012-06-25 - MapReduce auf Azure2012-06-25 - MapReduce auf Azure
2012-06-25 - MapReduce auf AzureJohannes Hoppe
 
2013-06-25 - HTML5 & JavaScript Security
2013-06-25 - HTML5 & JavaScript Security2013-06-25 - HTML5 & JavaScript Security
2013-06-25 - HTML5 & JavaScript SecurityJohannes Hoppe
 
2013-06-24 - Software Craftsmanship with JavaScript
2013-06-24 - Software Craftsmanship with JavaScript2013-06-24 - Software Craftsmanship with JavaScript
2013-06-24 - Software Craftsmanship with JavaScriptJohannes Hoppe
 
2013-06-15 - Software Craftsmanship mit JavaScript
2013-06-15 - Software Craftsmanship mit JavaScript2013-06-15 - Software Craftsmanship mit JavaScript
2013-06-15 - Software Craftsmanship mit JavaScriptJohannes Hoppe
 
2013 05-03 - HTML5 & JavaScript Security
2013 05-03 -  HTML5 & JavaScript Security2013 05-03 -  HTML5 & JavaScript Security
2013 05-03 - HTML5 & JavaScript SecurityJohannes Hoppe
 
2013-03-23 - NoSQL Spartakiade
2013-03-23 - NoSQL Spartakiade2013-03-23 - NoSQL Spartakiade
2013-03-23 - NoSQL SpartakiadeJohannes Hoppe
 
2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best Practices
2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best Practices2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best Practices
2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best PracticesJohannes Hoppe
 
2012-10-16 - WebTechCon 2012: HTML5 & WebGL
2012-10-16 - WebTechCon 2012: HTML5 & WebGL2012-10-16 - WebTechCon 2012: HTML5 & WebGL
2012-10-16 - WebTechCon 2012: HTML5 & WebGLJohannes Hoppe
 
2012-09-18 - HTML5 & WebGL
2012-09-18 - HTML5 & WebGL2012-09-18 - HTML5 & WebGL
2012-09-18 - HTML5 & WebGLJohannes Hoppe
 
2012-05-14 NoSQL in .NET - mit Redis und MongoDB
2012-05-14 NoSQL in .NET - mit Redis und MongoDB2012-05-14 NoSQL in .NET - mit Redis und MongoDB
2012-05-14 NoSQL in .NET - mit Redis und MongoDBJohannes Hoppe
 
2012-05-10 - UG Karlsruhe: NoSQL in .NET - mit Redis und MongoDB
2012-05-10 - UG Karlsruhe: NoSQL in .NET - mit Redis und MongoDB2012-05-10 - UG Karlsruhe: NoSQL in .NET - mit Redis und MongoDB
2012-05-10 - UG Karlsruhe: NoSQL in .NET - mit Redis und MongoDBJohannes Hoppe
 
2012-04-12 - AOP .NET UserGroup Niederrhein
2012-04-12 - AOP .NET UserGroup Niederrhein2012-04-12 - AOP .NET UserGroup Niederrhein
2012-04-12 - AOP .NET UserGroup NiederrheinJohannes Hoppe
 
2012-03-20 - Getting started with Node.js and MongoDB on MS Azure
2012-03-20 - Getting started with Node.js and MongoDB on MS Azure2012-03-20 - Getting started with Node.js and MongoDB on MS Azure
2012-03-20 - Getting started with Node.js and MongoDB on MS AzureJohannes Hoppe
 
2012-01-31 NoSQL in .NET
2012-01-31 NoSQL in .NET2012-01-31 NoSQL in .NET
2012-01-31 NoSQL in .NETJohannes Hoppe
 
2011-12-13 NoSQL aus der Praxis
2011-12-13 NoSQL aus der Praxis2011-12-13 NoSQL aus der Praxis
2011-12-13 NoSQL aus der PraxisJohannes Hoppe
 
2011-06-27 - AOP - .NET User Group Rhein Neckar
2011-06-27 - AOP - .NET User Group Rhein Neckar2011-06-27 - AOP - .NET User Group Rhein Neckar
2011-06-27 - AOP - .NET User Group Rhein NeckarJohannes Hoppe
 
DMDW 8. Student Presentation - Groovy to MongoDB
DMDW 8. Student Presentation - Groovy to MongoDBDMDW 8. Student Presentation - Groovy to MongoDB
DMDW 8. Student Presentation - Groovy to MongoDBJohannes Hoppe
 
DMDW 5. Student Presentation - Pentaho Data Integration (Kettle)
DMDW 5. Student Presentation - Pentaho Data Integration (Kettle)DMDW 5. Student Presentation - Pentaho Data Integration (Kettle)
DMDW 5. Student Presentation - Pentaho Data Integration (Kettle)Johannes Hoppe
 

More from Johannes Hoppe (20)

Einführung in Angular 2
Einführung in Angular 2Einführung in Angular 2
Einführung in Angular 2
 
MDC kompakt 2014: Hybride Apps mit Cordova, AngularJS und Ionic
MDC kompakt 2014: Hybride Apps mit Cordova, AngularJS und IonicMDC kompakt 2014: Hybride Apps mit Cordova, AngularJS und Ionic
MDC kompakt 2014: Hybride Apps mit Cordova, AngularJS und Ionic
 
2012-06-25 - MapReduce auf Azure
2012-06-25 - MapReduce auf Azure2012-06-25 - MapReduce auf Azure
2012-06-25 - MapReduce auf Azure
 
2013-06-25 - HTML5 & JavaScript Security
2013-06-25 - HTML5 & JavaScript Security2013-06-25 - HTML5 & JavaScript Security
2013-06-25 - HTML5 & JavaScript Security
 
2013-06-24 - Software Craftsmanship with JavaScript
2013-06-24 - Software Craftsmanship with JavaScript2013-06-24 - Software Craftsmanship with JavaScript
2013-06-24 - Software Craftsmanship with JavaScript
 
2013-06-15 - Software Craftsmanship mit JavaScript
2013-06-15 - Software Craftsmanship mit JavaScript2013-06-15 - Software Craftsmanship mit JavaScript
2013-06-15 - Software Craftsmanship mit JavaScript
 
2013 05-03 - HTML5 & JavaScript Security
2013 05-03 -  HTML5 & JavaScript Security2013 05-03 -  HTML5 & JavaScript Security
2013 05-03 - HTML5 & JavaScript Security
 
2013-03-23 - NoSQL Spartakiade
2013-03-23 - NoSQL Spartakiade2013-03-23 - NoSQL Spartakiade
2013-03-23 - NoSQL Spartakiade
 
2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best Practices
2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best Practices2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best Practices
2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best Practices
 
2012-10-16 - WebTechCon 2012: HTML5 & WebGL
2012-10-16 - WebTechCon 2012: HTML5 & WebGL2012-10-16 - WebTechCon 2012: HTML5 & WebGL
2012-10-16 - WebTechCon 2012: HTML5 & WebGL
 
2012-09-18 - HTML5 & WebGL
2012-09-18 - HTML5 & WebGL2012-09-18 - HTML5 & WebGL
2012-09-18 - HTML5 & WebGL
 
2012-05-14 NoSQL in .NET - mit Redis und MongoDB
2012-05-14 NoSQL in .NET - mit Redis und MongoDB2012-05-14 NoSQL in .NET - mit Redis und MongoDB
2012-05-14 NoSQL in .NET - mit Redis und MongoDB
 
2012-05-10 - UG Karlsruhe: NoSQL in .NET - mit Redis und MongoDB
2012-05-10 - UG Karlsruhe: NoSQL in .NET - mit Redis und MongoDB2012-05-10 - UG Karlsruhe: NoSQL in .NET - mit Redis und MongoDB
2012-05-10 - UG Karlsruhe: NoSQL in .NET - mit Redis und MongoDB
 
2012-04-12 - AOP .NET UserGroup Niederrhein
2012-04-12 - AOP .NET UserGroup Niederrhein2012-04-12 - AOP .NET UserGroup Niederrhein
2012-04-12 - AOP .NET UserGroup Niederrhein
 
2012-03-20 - Getting started with Node.js and MongoDB on MS Azure
2012-03-20 - Getting started with Node.js and MongoDB on MS Azure2012-03-20 - Getting started with Node.js and MongoDB on MS Azure
2012-03-20 - Getting started with Node.js and MongoDB on MS Azure
 
2012-01-31 NoSQL in .NET
2012-01-31 NoSQL in .NET2012-01-31 NoSQL in .NET
2012-01-31 NoSQL in .NET
 
2011-12-13 NoSQL aus der Praxis
2011-12-13 NoSQL aus der Praxis2011-12-13 NoSQL aus der Praxis
2011-12-13 NoSQL aus der Praxis
 
2011-06-27 - AOP - .NET User Group Rhein Neckar
2011-06-27 - AOP - .NET User Group Rhein Neckar2011-06-27 - AOP - .NET User Group Rhein Neckar
2011-06-27 - AOP - .NET User Group Rhein Neckar
 
DMDW 8. Student Presentation - Groovy to MongoDB
DMDW 8. Student Presentation - Groovy to MongoDBDMDW 8. Student Presentation - Groovy to MongoDB
DMDW 8. Student Presentation - Groovy to MongoDB
 
DMDW 5. Student Presentation - Pentaho Data Integration (Kettle)
DMDW 5. Student Presentation - Pentaho Data Integration (Kettle)DMDW 5. Student Presentation - Pentaho Data Integration (Kettle)
DMDW 5. Student Presentation - Pentaho Data Integration (Kettle)
 

2017 - NoSQL Vorlesung Mosbach

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 16. “Drum prüfe, wer sich ewig bindet.” Friedrich Schiller
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. › SET note1:title "Mittag" › SET note1:message "nicht vergessen" › KEYS note1:* › GET note1:title › DEL note1:title note1:message
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 33.
  • 35.
  • 36.
  • 38.
  • 40. using (var documentStore = new EmbeddableDocumentStore{ RunInMemory = true}.Initialize()) { using (var session = documentStore.OpenSession()) { // Run complex test scenarious } }
  • 42. Ayende Rahien on the HTTP API - http://ravendb.net/documentation/docs-http-api-restful
  • 43. › › › C:>curl -X GET http://localhost:8080/docs/Categories/1 -i HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 ETag: 00000000-0000-0200-0000-000000000004 { "Name" : "Normal Importance", "Color" : "green" }
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49. IBM’s IMS Codd publishes relational model paper in 1970 1966 1969 1970 1985 2000 2004 2007 Agile becoming more popular 1990’s 2009 CODASYL model published Term “object-oriented database” appears Brewer’s CAP born Google BigTable Amazon Dynamo Apache Cassandra initial release 2008 MongoDB initial release 1973 1974 INGRES SQL invented 1977 Oracle founded 10gen founded NoSQL Movement
  • 50.
  • 51.
  • 53.
  • 54. – › use WebNote › db.Notes.save( { Title: 'Mittag', Message: 'nicht vergessen‘ } ); › db.Notes.save
  • 55. – for(i=0; i<1000; i++) { ['quiz', 'essay', 'exam'].forEach(function(name) { var score = Math.floor(Math.random() * 50) + 50; db.scores.save({student: i, name: name, score: score}); }); } db.scores.count();
  • 56. – › db.Notes.find(); › db.Notes.find({ Title: /Test/i }); › db.Notes.find( { "Categories.Color": "red"}).limit(1);
  • 57. – › db.Notes.update({Title: 'Test'}, {'$set': {Categories: []}}); › db.Notes.update({Title: 'Test'}, {'$push': { Categories: {Color: 'Red'} } });
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 74.
  • 75. › use digg; › db.people.update({name: 'Smith'}, {'$set': {interests: []}}); › db.people.update({name: 'Smith'}, {'$push': {interests: ['chess']}});
  • 76.
  • 77.
  • 78.
  • 79. var map = function() { emit(this.user.name, {diggs: this.diggs, posts: 0}); };
  • 80. var reduce = function(key, values) { var diggs = 0; var posts = 0; values.forEach(function(doc) { diggs += doc.diggs; posts += 1; }); return {diggs: diggs, posts: posts}; };
  • 82.
  • 83.
  • 84.
  • 86.
  • 87.
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.
  • 93.
  • 94.
  • 95.
  • 96.
  • 97. > db.shapes.find() › { _id: "1", type: "c", area: 3.14, radius: 1} › { _id: "2", type: "s", area: 4, length: 2} › { _id: "3", type: "r", area: 10, length: 5, width: 2} // Shapes mit radius > 0 finden > db.shapes.find( { radius: { $gt: 0 } } )
  • 98.
  • 99. blogs: { author : “Johannes", date : ISODate("2011-09-18T09:56:06.298Z"), comments : [ { author : “Klaus", date : ISODate("2011-09-19T09:56:06.298Z"), text : “toller Artikel" } ] }
  • 100.
  • 101. blogs: { _id: 1000, author: “Johannes", date: ISODate("2011-09-18"), comments: [ {comment : 1)} ]} comments : { _id : 1, blog: 1000, author : “Klaus", date : ISODate("2011-09-19")} > blog = db.blogs.find({ text: "Destination Moon" }); > db.comments.find( { blog: blog._id } );
  • 102.
  • 103. // Jedes Produkt verlinkt die IDs der Kategorien products: { _id: 10, name: "Destination Moon", category_ids: [ 20, 30 ] }
  • 104. // Jedes Produkt verlinkt die IDs der Kategorien products: { _id: 10, name: "Destination Moon", category_ids: [ 20, 30 ] } // Jede Kategorie verlinkt die IDs der Produkte categories: { _id: 20, name: "adventure", product_ids: [ 10, 11, 12 ] } categories: { _id: 21, name: "movie", product_ids: [ 10 ] }
  • 105. // Jedes Produkt verlinkt die IDs der Kategorien products: { _id: 10, name: "Destination Moon", category_ids: [ 20, 30 ] } // Jede Kategorie verlinkt die IDs der Produkte categories: { _id: 20, name: "adventure", product_ids: [ 10, 11, 12 ] } categories: { _id: 21, name: "movie", product_ids: [ 10 ] } // Alle Kategorien für ein Produkt > db.categories.find( { product_ids: 10 } )
  • 106.
  • 107. // Jedes Produkt verlinkt die IDs der Kategorien products: { _id: 10, name: "Destination Moon", category_ids: [ 20, 30 ] } // Kategorien beinhalten keine Assoziationen categories: { _id: 20, name: "adventure"}
  • 108. // Jedes Produkt verlinkt die IDs der Kategorien products: { _id: 10, name: "Destination Moon", category_ids: [ 20, 30 ] } // Kategorien beinhalten keine Assoziationen categories: { _id: 20, name: "adventure"} // Alle Produkte für eine Kategorie > db.products.find( { category_ids: 20 } )
  • 109. // Jedes Produkt verlinkt die IDs der Kategorien products: { _id: 10, name: "Destination Moon", category_ids: [ 20, 30 ] } // Kategorien beinhalten keine Assoziationen categories: { _id: 20, name: "adventure"} // Alle Produkte für eine Kategorie > db.products.find( { category_ids: 20 } ) // Alle Kategorien für ein Produkt product > product = db.products.find( { _id: some_id } ) > db.categories.find({_id: {$in : product.category_ids}})
  • 110.
  • 111.
  • 112.
  • 113.
  • 114.
  • 115.
  • 117.
  • 118.
  • 119.
  • 120.
  • 121.
  • 122.
  • 123.
  • 124. using (var documentStore = new EmbeddableDocumentStore{ RunInMemory = true}.Initialize()) { using (var session = documentStore.OpenSession()) { // Run complex test scenarious } }