This document discusses different data modeling techniques for MongoDB including embedding documents, linking documents by ID, and handling many-to-many relationships. It provides code examples of saving documents, querying, and updating in MongoDB. It also briefly covers software testing strategies for MongoDB applications.
42. using (var documentStore = new EmbeddableDocumentStore{
RunInMemory = true}.Initialize())
{
using (var session = documentStore.OpenSession())
{
// Run complex test scenarious
}
}
54. CODASYL model SQL Agile becoming more Google MongoDB initial
published invented popular BigTable release
IBM’s Oracle Brewer’s Amazon
IMS INGRES founded CAP born Dynamo
1966 1969 1970 1973 1974 1977 1985 1990’s 2000 2004 2007 2008 2009
10gen NoSQL
Codd publishes Term “object-oriented founded Movement
relational model paper database” appears
in 1970 Apache Cassandra
initial release
136. using (var documentStore = new EmbeddableDocumentStore{
RunInMemory = true}.Initialize())
{
using (var session = documentStore.OpenSession())
{
// Run complex test scenarious
}
}
139. using (var runner = MongoDbRunner.Start())
{
var collection = new MongoClient(runner.ConnectionString)
.GetServer()
.GetDatabase("TestDatabase")
.GetCollection<TestDocument>("TestCollection");
// Run complex test scenarious
}