The document discusses MongoDB, a document-oriented NoSQL database. It provides an overview of MongoDB, explaining that it uses documents (rather than tables and rows), has dynamic schemas, and allows for easy horizontal scaling. It also covers some basic MongoDB concepts and operations like collections, embedded documents, and CRUD functions like insert, find, update, and remove.
- MongoDB is an open-source, high-performance, schema-free, document-oriented database. It bridges the gap between key-value stores and traditional relational databases.
- Documents in MongoDB are like JSON documents and can be dynamically updated without migrations. MongoDB supports aggregation, map-reduce functions, and rich queries.
- PyMongo is the Python driver for MongoDB. Documents can be easily inserted, queried, and manipulated from Python. Object-document mappers like MongoEngine allow defining schemas and models similarly to ORMs.
This document summarizes options for using MongoDB with Java, including raw drivers, object mapping libraries like Morphia, and examples of common operations. It discusses using the MongoDB Java driver to directly encode data to BSON format, as well as higher-level libraries that allow working with Java objects like with Morphia annotations and queries. Examples demonstrate basic CRUD operations, embedding vs referencing relationships, and updating documents.
This document provides an overview of Morphia, a Java object mapping library for MongoDB. It discusses Morphia's advantages over using raw MongoDB drivers, including type safety and the ability to work with POJOs rather than generic maps. Key features covered include annotation-based mapping of entities to collections, lifecycle callbacks, queries, updates, and support for relationships and object graphs. The document aims to demonstrate how Morphia simplifies common data access patterns while retaining performance.
Build your first MongoDB App in Ruby @ StrangeLoop 2013Steven Francia
This document provides an agenda and introduction for building a first MongoDB application. It discusses MongoDB fundamentals like documents, schemas, and queries. It then walks through setting up a Sinatra application scaffolded with folders, connecting it to a MongoDB database, and pre-populating the database with venue data. The document demonstrates basic CRUD operations in the MongoDB shell and indexes the venue location data geographically. Finally, it discusses starting the Sinatra server and opening the initial application in the browser.
MongoDB + Java - Everything you need to know Norberto Leite
Learn everything you need to know to get started building a MongoDB-based app in Java. We'll explore the relationship between MongoDB and various languages on the Java Virtual Machine such as Java, Scala, and Clojure. From there, we'll examine the popular frameworks and integration points between MongoDB and the JVM including Spring Data and object-document mappers like Morphia.
Relational databases are central to web applications, but they have also been the primary source of pain when it comes to scale and performance. Recently, non-relational databases (also referred to as NoSQL) have arrived on the scene. This session explains not only what MongoDB is and how it works, but when and how to gain the most benefit.
Elasticsearch document summarization:
- Elasticsearch calculates relevance scores (scores queries against documents) using a complex algorithm involving term frequency, inverse document frequency, field length norm, and other factors.
- It analyzes queries and documents, finds matching documents, then scores each match based on the algorithm. Higher scores indicate more relevant matches.
- Explain API and scoring details can show how Elasticsearch calculates relevance for specific queries and documents, breaking down factors like TF, IDF, coordination, etc. This helps understand and optimize search effectiveness.
- MongoDB is an open-source, high-performance, schema-free, document-oriented database. It bridges the gap between key-value stores and traditional relational databases.
- Documents in MongoDB are like JSON documents and can be dynamically updated without migrations. MongoDB supports aggregation, map-reduce functions, and rich queries.
- PyMongo is the Python driver for MongoDB. Documents can be easily inserted, queried, and manipulated from Python. Object-document mappers like MongoEngine allow defining schemas and models similarly to ORMs.
This document summarizes options for using MongoDB with Java, including raw drivers, object mapping libraries like Morphia, and examples of common operations. It discusses using the MongoDB Java driver to directly encode data to BSON format, as well as higher-level libraries that allow working with Java objects like with Morphia annotations and queries. Examples demonstrate basic CRUD operations, embedding vs referencing relationships, and updating documents.
This document provides an overview of Morphia, a Java object mapping library for MongoDB. It discusses Morphia's advantages over using raw MongoDB drivers, including type safety and the ability to work with POJOs rather than generic maps. Key features covered include annotation-based mapping of entities to collections, lifecycle callbacks, queries, updates, and support for relationships and object graphs. The document aims to demonstrate how Morphia simplifies common data access patterns while retaining performance.
Build your first MongoDB App in Ruby @ StrangeLoop 2013Steven Francia
This document provides an agenda and introduction for building a first MongoDB application. It discusses MongoDB fundamentals like documents, schemas, and queries. It then walks through setting up a Sinatra application scaffolded with folders, connecting it to a MongoDB database, and pre-populating the database with venue data. The document demonstrates basic CRUD operations in the MongoDB shell and indexes the venue location data geographically. Finally, it discusses starting the Sinatra server and opening the initial application in the browser.
MongoDB + Java - Everything you need to know Norberto Leite
Learn everything you need to know to get started building a MongoDB-based app in Java. We'll explore the relationship between MongoDB and various languages on the Java Virtual Machine such as Java, Scala, and Clojure. From there, we'll examine the popular frameworks and integration points between MongoDB and the JVM including Spring Data and object-document mappers like Morphia.
Relational databases are central to web applications, but they have also been the primary source of pain when it comes to scale and performance. Recently, non-relational databases (also referred to as NoSQL) have arrived on the scene. This session explains not only what MongoDB is and how it works, but when and how to gain the most benefit.
Elasticsearch document summarization:
- Elasticsearch calculates relevance scores (scores queries against documents) using a complex algorithm involving term frequency, inverse document frequency, field length norm, and other factors.
- It analyzes queries and documents, finds matching documents, then scores each match based on the algorithm. Higher scores indicate more relevant matches.
- Explain API and scoring details can show how Elasticsearch calculates relevance for specific queries and documents, breaking down factors like TF, IDF, coordination, etc. This helps understand and optimize search effectiveness.
Morphia: Simplifying Persistence for Java and MongoDBJeff Yemin
The document describes Morphia, an object document mapper for Java that simplifies working with MongoDB. It outlines Morphia's key features like model mapping with annotations, query and update APIs, and support for references and embedded objects. Examples are provided of defining entity classes with annotations, performing queries, updates, and indexing. The document recommends Morphia for working with MongoDB on the JVM and provides resources for learning more.
The document provides an overview of using Java to interact with MongoDB. It discusses connecting to MongoDB, working with collections, inserting and querying documents, using GridFS to store files, the object mapping library Morphia, and how Groovy and the Grails framework can simplify MongoDB development. The key topics covered include making connections, inserting and querying documents, GridFS for file storage, mapping objects with Morphia, dynamic queries in Groovy, and the MongoDB Grails plugin.
The document provides information about a talk on Java persistence frameworks for MongoDB given at MongoDB Berlin 2013. It discusses MongoDB Java Driver, Spring Data MongoDB, Morphia, and Hibernate OGM as frameworks for connecting Java applications to MongoDB. The talk covers connecting to MongoDB from Java, mapping objects to documents, and repository support features of the frameworks.
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...MongoDB
This document contains the slides from a webinar on building a basic MongoDB application. It introduces MongoDB concepts and terminology, shows how to install MongoDB, create a basic blogging application with articles, users and comments, and add and query data. Key steps include installing MongoDB, launching the mongod process, connecting with the mongo shell, inserting documents, finding and querying documents, and updating documents by adding fields and pushing to arrays.
Indexing in MongoDB works similarly to indexing in relational databases. An index is a data structure that can make certain queries more efficient by maintaining a sorted order of documents. Indexes are created using the ensureIndex() method and take up additional space and slow down writes. The explain() method is used to determine whether a query is using an index.
Back to Basics Webinar 2: Your First MongoDB ApplicationMongoDB
The document provides instructions for installing and using MongoDB to build a simple blogging application. It demonstrates how to install MongoDB, connect to it using the mongo shell, insert and query sample data like users and blog posts, update documents to add comments, and more. The goal is to illustrate how to model and interact with data in MongoDB for a basic blogging use case.
The document discusses Elastic search queries. It covers the basic query process, types of queries including basic and complex queries. It then describes different methods for constructing queries including using URI parameters, request body JSON, and provides examples. It also outlines the standard request body structure and includes some common additional options like pagination.
Java Development with MongoDB (James Williams)MongoSF
This document discusses various ways to interact with MongoDB from Java, including using the Java driver directly, Morphia for object mapping, and utilities for Groovy. It covers making connections, working with collections, inserting and querying documents, GridFS for files, mapping objects with Morphia, and plugins for Grails. It also briefly mentions dynamic finders and metaprogramming capabilities in Groovy.
Hadoop Papyrus is an open source project that allows Hadoop jobs to be run using a Ruby DSL instead of Java. It reduces complex Hadoop procedures to just a few lines of Ruby code. The DSL describes the Map, Reduce, and Job details. Hadoop Papyrus invokes Ruby scripts using JRuby during the Map/Reduce processes running on the Java-based Hadoop framework. It also allows writing a single DSL script to define different processing for each phase like Map, Reduce, or job initialization.
This presentation was given at the LDS Tech SORT Conference 2011 in Salt Lake City. The slides are quite comprehensive covering many topics on MongoDB. Rather than a traditional presentation, this was presented as more of a Q & A session. Topics covered include. Introduction to MongoDB, Use Cases, Schema design, High availability (replication) and Horizontal Scaling (sharding).
Groovy and MongoDB are well-suited for each other because Groovy is a more concise way to write Java code and MongoDB is a flexible, schemaless database. Groovy allows dynamic queries of MongoDB through dynamic finders that parse method names to build queries without a predefined schema. Several projects use Groovy and MongoDB together effectively.
Radu Gheorghe gives an introduction to Solr, an open source search engine based on Apache Lucene. He discusses when Solr would be used, such as for product search, as well as when it may not be suitable, such as for sparse data. The presentation covers how Solr works with inverted indexes and scoring documents, as well as features like facets, streaming aggregations, master-slave and SolrCloud architectures. A demo is offered to illustrate Solr functionality.
Getting started with Elasticsearch and .NETTomas Jansson
This document provides an introduction to using Elasticsearch with .NET and the NEST client library. It demonstrates how to install and configure Elasticsearch on Windows, define mappings and index documents using NEST, perform various queries including fuzzy, highlighted, faceted queries, and add filters. NEST provides a strongly typed, fluent abstraction over Elasticsearch that allows querying and filtering Elasticsearch in a similar manner to Elasticsearch JSON queries. The document encourages attendees to view the demo code on GitHub for examples of indexing, querying, highlighting, faceting, and filtering documents using NEST.
Back to Basics: My First MongoDB ApplicationMongoDB
- The document is a slide deck for a webinar on building a basic blogging application using MongoDB.
- It covers MongoDB concepts like documents, collections and indexes. It then demonstrates how to install MongoDB, connect to it using the mongo shell, and insert documents.
- The slide deck proceeds to model a basic blogging application using MongoDB, creating collections for users, articles and comments. It shows how to query, update, and import large amounts of seeded data.
Java Persistence Frameworks for MongoDBTobias Trelle
Tobias Trelle gave a presentation on Java persistence frameworks for MongoDB. He discussed the MongoDB Java driver, Spring Data MongoDB, Morphia, and Hibernate OGM. For each framework, he covered key features, configuration, object mapping, queries, and examples. He concluded by comparing the frameworks and suggesting which may be best based on the level of abstraction and standards needed.
Webinar: MongoDB Persistence with Java and MorphiaMongoDB
MongoDB is the leading noSQL database and as with any new technology, some of the biggest questions are about tools and integration. This webinar will cover how to use MongoDB from a Java application and introduce Morphia, the object document mapping library. It will cover the essential features of the framework with examples before moving on to some of the more advanced and upcoming features such as text search and aggregation framework support.
This document provides an overview of Elasticsearch and how to use it with .NET. It discusses what Elasticsearch is, how to install it, how Elasticsearch provides scalability through its architecture of clusters, nodes, shards and replicas. It also covers topics like indexing and querying data through the REST API or NEST client for .NET, performing searches, aggregations, highlighting hits, handling human language through analyzers, and using suggesters.
Te has preguntado alguna vez ¿Existe vida después de ActiveRecord::Base? si es así, en esta charla vamos descubrir que Rails es algo más que un simple MVC, es un framework repleto de herramientas cuyo conocimiento nos va a facilitar enormemente la vida.
Con estas herramientas vas a poder extender Rails de una forma que no habías imaginado hasta ahora: crearas tus propios validadores, responders y renderers; serás capaz de enviar datos por streaming, de interceptar mails o añadir un nuevo middleware a tu stack.
Queremos mostrar 10 de estas herramientas junto con ejemplos de uso de cada una de ellas, para que las puedas incorporar poco a poco en tu día a día y descubras el mundo de posibilidades que realmente tienes en tus manos.
El conjunto de herramientas que vamos a mostrar es:
ActiveModel::Model
ActiveModel::Validator
ActiveSupport::Concern
ActionSupport::Notifications
ActionController::Renderers
ActionController::Responder
ActionController::Live
ActionView::Resolvers
ActionMailer Interceptors
Rack Middleware
This document provides an overview of the Python programming language. It discusses Python's creator Guido van Rossum and the language's origins. Key aspects of Python covered include its multi-paradigm design, dynamic typing, syntax, conventions, control structures, and large community of users and packages. The "zen of Python" philosophy emphasizes readability and simplicity.
Morphia: Simplifying Persistence for Java and MongoDBJeff Yemin
The document describes Morphia, an object document mapper for Java that simplifies working with MongoDB. It outlines Morphia's key features like model mapping with annotations, query and update APIs, and support for references and embedded objects. Examples are provided of defining entity classes with annotations, performing queries, updates, and indexing. The document recommends Morphia for working with MongoDB on the JVM and provides resources for learning more.
The document provides an overview of using Java to interact with MongoDB. It discusses connecting to MongoDB, working with collections, inserting and querying documents, using GridFS to store files, the object mapping library Morphia, and how Groovy and the Grails framework can simplify MongoDB development. The key topics covered include making connections, inserting and querying documents, GridFS for file storage, mapping objects with Morphia, dynamic queries in Groovy, and the MongoDB Grails plugin.
The document provides information about a talk on Java persistence frameworks for MongoDB given at MongoDB Berlin 2013. It discusses MongoDB Java Driver, Spring Data MongoDB, Morphia, and Hibernate OGM as frameworks for connecting Java applications to MongoDB. The talk covers connecting to MongoDB from Java, mapping objects to documents, and repository support features of the frameworks.
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...MongoDB
This document contains the slides from a webinar on building a basic MongoDB application. It introduces MongoDB concepts and terminology, shows how to install MongoDB, create a basic blogging application with articles, users and comments, and add and query data. Key steps include installing MongoDB, launching the mongod process, connecting with the mongo shell, inserting documents, finding and querying documents, and updating documents by adding fields and pushing to arrays.
Indexing in MongoDB works similarly to indexing in relational databases. An index is a data structure that can make certain queries more efficient by maintaining a sorted order of documents. Indexes are created using the ensureIndex() method and take up additional space and slow down writes. The explain() method is used to determine whether a query is using an index.
Back to Basics Webinar 2: Your First MongoDB ApplicationMongoDB
The document provides instructions for installing and using MongoDB to build a simple blogging application. It demonstrates how to install MongoDB, connect to it using the mongo shell, insert and query sample data like users and blog posts, update documents to add comments, and more. The goal is to illustrate how to model and interact with data in MongoDB for a basic blogging use case.
The document discusses Elastic search queries. It covers the basic query process, types of queries including basic and complex queries. It then describes different methods for constructing queries including using URI parameters, request body JSON, and provides examples. It also outlines the standard request body structure and includes some common additional options like pagination.
Java Development with MongoDB (James Williams)MongoSF
This document discusses various ways to interact with MongoDB from Java, including using the Java driver directly, Morphia for object mapping, and utilities for Groovy. It covers making connections, working with collections, inserting and querying documents, GridFS for files, mapping objects with Morphia, and plugins for Grails. It also briefly mentions dynamic finders and metaprogramming capabilities in Groovy.
Hadoop Papyrus is an open source project that allows Hadoop jobs to be run using a Ruby DSL instead of Java. It reduces complex Hadoop procedures to just a few lines of Ruby code. The DSL describes the Map, Reduce, and Job details. Hadoop Papyrus invokes Ruby scripts using JRuby during the Map/Reduce processes running on the Java-based Hadoop framework. It also allows writing a single DSL script to define different processing for each phase like Map, Reduce, or job initialization.
This presentation was given at the LDS Tech SORT Conference 2011 in Salt Lake City. The slides are quite comprehensive covering many topics on MongoDB. Rather than a traditional presentation, this was presented as more of a Q & A session. Topics covered include. Introduction to MongoDB, Use Cases, Schema design, High availability (replication) and Horizontal Scaling (sharding).
Groovy and MongoDB are well-suited for each other because Groovy is a more concise way to write Java code and MongoDB is a flexible, schemaless database. Groovy allows dynamic queries of MongoDB through dynamic finders that parse method names to build queries without a predefined schema. Several projects use Groovy and MongoDB together effectively.
Radu Gheorghe gives an introduction to Solr, an open source search engine based on Apache Lucene. He discusses when Solr would be used, such as for product search, as well as when it may not be suitable, such as for sparse data. The presentation covers how Solr works with inverted indexes and scoring documents, as well as features like facets, streaming aggregations, master-slave and SolrCloud architectures. A demo is offered to illustrate Solr functionality.
Getting started with Elasticsearch and .NETTomas Jansson
This document provides an introduction to using Elasticsearch with .NET and the NEST client library. It demonstrates how to install and configure Elasticsearch on Windows, define mappings and index documents using NEST, perform various queries including fuzzy, highlighted, faceted queries, and add filters. NEST provides a strongly typed, fluent abstraction over Elasticsearch that allows querying and filtering Elasticsearch in a similar manner to Elasticsearch JSON queries. The document encourages attendees to view the demo code on GitHub for examples of indexing, querying, highlighting, faceting, and filtering documents using NEST.
Back to Basics: My First MongoDB ApplicationMongoDB
- The document is a slide deck for a webinar on building a basic blogging application using MongoDB.
- It covers MongoDB concepts like documents, collections and indexes. It then demonstrates how to install MongoDB, connect to it using the mongo shell, and insert documents.
- The slide deck proceeds to model a basic blogging application using MongoDB, creating collections for users, articles and comments. It shows how to query, update, and import large amounts of seeded data.
Java Persistence Frameworks for MongoDBTobias Trelle
Tobias Trelle gave a presentation on Java persistence frameworks for MongoDB. He discussed the MongoDB Java driver, Spring Data MongoDB, Morphia, and Hibernate OGM. For each framework, he covered key features, configuration, object mapping, queries, and examples. He concluded by comparing the frameworks and suggesting which may be best based on the level of abstraction and standards needed.
Webinar: MongoDB Persistence with Java and MorphiaMongoDB
MongoDB is the leading noSQL database and as with any new technology, some of the biggest questions are about tools and integration. This webinar will cover how to use MongoDB from a Java application and introduce Morphia, the object document mapping library. It will cover the essential features of the framework with examples before moving on to some of the more advanced and upcoming features such as text search and aggregation framework support.
This document provides an overview of Elasticsearch and how to use it with .NET. It discusses what Elasticsearch is, how to install it, how Elasticsearch provides scalability through its architecture of clusters, nodes, shards and replicas. It also covers topics like indexing and querying data through the REST API or NEST client for .NET, performing searches, aggregations, highlighting hits, handling human language through analyzers, and using suggesters.
Te has preguntado alguna vez ¿Existe vida después de ActiveRecord::Base? si es así, en esta charla vamos descubrir que Rails es algo más que un simple MVC, es un framework repleto de herramientas cuyo conocimiento nos va a facilitar enormemente la vida.
Con estas herramientas vas a poder extender Rails de una forma que no habías imaginado hasta ahora: crearas tus propios validadores, responders y renderers; serás capaz de enviar datos por streaming, de interceptar mails o añadir un nuevo middleware a tu stack.
Queremos mostrar 10 de estas herramientas junto con ejemplos de uso de cada una de ellas, para que las puedas incorporar poco a poco en tu día a día y descubras el mundo de posibilidades que realmente tienes en tus manos.
El conjunto de herramientas que vamos a mostrar es:
ActiveModel::Model
ActiveModel::Validator
ActiveSupport::Concern
ActionSupport::Notifications
ActionController::Renderers
ActionController::Responder
ActionController::Live
ActionView::Resolvers
ActionMailer Interceptors
Rack Middleware
This document provides an overview of the Python programming language. It discusses Python's creator Guido van Rossum and the language's origins. Key aspects of Python covered include its multi-paradigm design, dynamic typing, syntax, conventions, control structures, and large community of users and packages. The "zen of Python" philosophy emphasizes readability and simplicity.
Este documento ofrece consejos sobre cómo estimar de manera efectiva el tiempo y esfuerzo requeridos para completar proyectos. Recomienda que las estimaciones se presenten dentro de un rango probable en lugar de una sola cifra, usando un "cono de la incertidumbre" para comunicar claramente el nivel de incertidumbre involucrado. También sugiere usar un enfoque probabilístico al dividir los posibles escenarios en percentiles para apostar de manera más informada sobre el tiempo de completión.
The document discusses using decorators and presenters in Ruby on Rails to keep views tidy and move logic out of the views. Decorators and presenters both act as wrappers around models to help with presentation. Decorators can add additional responsibilities to objects dynamically, while presenters maintain object-oriented logic in the views. The draper gem facilitates using the decorator pattern in Rails apps.
Big data amb Cassandra i Celery ##bbmnkSanti Camps
The document discusses using Cassandra and Celery to solve big data problems. Cassandra is described as a distributed, fault-tolerant, and scalable NoSQL database that stores data as key-value pairs. Celery is presented as a tool for distributing tasks across multiple machines by adding tasks to queues. An example architecture is proposed using RabbitMQ to connect an application to Celery workers that interface with the Cassandra database. Configuration and usage of Cassandra, Celery, and their integration are outlined.
The document summarizes transactional memory (TM) and software transactional memory (STM) approaches for concurrency in Python. It discusses removing the global interpreter lock (GIL) in Python through fine-grained locking, shared-nothing, and STM approaches. It provides examples of STM usage in Python and describes the hardware and software support for STM. It also outlines some current limitations of the PyPy STM implementation for Python including memory and performance limitations.
This document provides tips and tricks for behavior-driven development (BDD). It discusses what BDD is, including that it is a requirements gathering and team alignment tool. It emphasizes building the right product and building the product right. The document separates problem and solution domains and recommends short user stories that can be developed in two days. It suggests various BDD best practices like separate acceptance criteria from scenarios, deliver features frequently, and observe users interacting with software. Examples are given to illustrate acceptance criteria versus scenarios. The document also discusses testing techniques like separate documentation, unit, and integration tests and avoiding over-automating scenarios. It emphasizes listening to users and releasing feedback.
The document discusses test-driven development (TDD) approaches for web applications with Python. It recommends testing the domain model first with unit tests before integrating it with controllers and views. This allows exercising the domain logic independently before integration. It also suggests replacing conditionals in views with polymorphism for better testability and using unittest over Django's built-in test case for more flexibility. The goal is to enable fast, reliable unit and integration testing while limiting fragile end-to-end UI tests.
This document provides an overview of using MongoDB with Python. It introduces pymongo, the official Python driver for MongoDB, and covers connecting to MongoDB, performing CRUD operations, aggregation, GridFS for large files, indexing, and ODM frameworks. The presenter is Norberto Leite, a MongoDB Technical Evangelist based in Madrid, Spain.
Knowing your garbage collector - PyCon Italy 2015fcofdezc
The document discusses garbage collection in Python. It introduces concepts like the heap, mutator, and collector. It then describes the reference counting algorithm used by CPython, which has challenges with cyclic references. It also discusses mark and sweep garbage collection used by PyPy, which can collect cyclic garbage but requires stopping program execution. The document aims to provide an overview of memory management techniques in Python.
Volunteering assistance to online geocoding services through a distributed kn...José Pablo Gómez Barrón S.
Work presented in RICH-VGI: enRICHment of volunteered geographic information (VGI): Techniques, practices and current state of knowledge, Workshop at the 18th AGILE Conference on Geographic Information Science, June 9th, 2015, Lisboa, Portugal.
Knowing your Garbage Collector / Python Madridfcofdezc
The document discusses garbage collection in Python. It introduces concepts like the heap, mutator, and collector. It then describes the reference counting algorithm used by CPython as well as techniques for handling cycles. It also discusses the mark and sweep algorithm used by PyPy as an alternative approach.
Este documento presenta Zotero, un gestor bibliográfico gratuito y de código abierto que permite organizar referencias bibliográficas, archivos PDF, y notas. Zotero puede sincronizar datos entre dispositivos y ofrece formatos bibliográficos automáticos. El documento explica cómo instalar y utilizar Zotero, sus funciones principales como la búsqueda de texto dentro de PDF, y cómo funciona el plugin de Zotero en procesadores de texto como LibreOffice.
This document discusses three main ways to access remote Linked Data: 1) making HTTP requests to resource URIs, 2) using SPARQL queries, and 3) getting a local copy of a dataset. It then provides more details on each method, including making HTTP requests to retrieve RDF data, examples of SPARQL queries to endpoints, and getting local copies through SPARQL constructs, crawling, or direct downloads. The document also lists several RDF libraries and provides a hands-on example of a SPARQL query.
Presentación de Álex González (@nihilistbird) en el #DataBeers del 29 de noviembre de 2014 (Madrid). ¿Por qué sumergirse? Esto nos otorga más dimensiones de representación. Capacidad de recrear entornos reales. Nuevas sensaciones asociadas a datos. Y mucho más.
El documento presenta un taller de introducción a Python. Incluye información sobre la historia del lenguaje, características como tipos de datos y sintaxis, módulos útiles como PyGame y OpenCV, y herramientas como PEP 8 y RunSnakeRun. El taller cubre conceptos básicos de Python y ejemplos prácticos de su uso.
Conferencia Big Data en #MenorcaConnectaSanti Camps
El documento habla sobre el Big Data y cómo puede ser útil para las empresas. Explica que el Big Data permite analizar grandes volúmenes de datos no estructurados para encontrar patrones e información útil que las empresas no sabían que necesitaban. También menciona ejemplos como cómo Walmart utilizó el Big Data para detectar embarazos tempranos y cómo las apuestas deportivas usan el Big Data para predecir resultados. Finalmente, explica cómo incluso las pequeñas empresas pueden aprovechar el Big Data usando redes sociales y analizando tendencias de su
Este documento presenta una introducción a las migraciones de Django. Explica que las migraciones permiten realizar cambios iterativos en el esquema de datos de una base de datos de manera sistemática y sincronizada con la aplicación. También describe algunos de los comandos y operaciones de migración comunes y compara cómo funcionan las migraciones con diferentes motores de bases de datos como PostgreSQL, MySQL y SQLite.
Norberto Leite gives an introduction to MongoDB. He discusses that MongoDB is a document database that is open source, high performance, and horizontally scalable. He demonstrates how to install MongoDB, insert documents into collections, query documents, and update documents. Leite emphasizes that MongoDB allows for flexible schema design and the ability to evolve schemas over time to match application needs.
The document provides an overview of a 7-week MongoDB course. It includes the course syllabus which covers topics such as CRUD operations, schema design, performance, aggregation framework, application engineering, and case studies. Key concepts taught in Week 1 include what MongoDB is, how it differs from relational databases, and how to install and use MongoDB with Python and the Bottle framework. The document also provides an example of building a "Hello World" app with MongoDB.
This talk will introduce the philosophy and features of the open source, NoSQL MongoDB. We’ll discuss the benefits of the document-based data model that MongoDB offers by walking through how one can build a simple app to store books. We’ll cover inserting, updating, and querying the database of books.
Dev Jumpstart: Build Your First App with MongoDBMongoDB
This document provides an overview of MongoDB and how to build a simple blogging application with it. It describes MongoDB as a document database where documents are analogous to JSON objects and collections are analogous to tables in a relational database. It demonstrates how to install and run MongoDB, insert sample data for users and blog posts, query the data, and update documents. The document also lists various MongoDB drivers and provides pointers for next steps in learning about data modeling, replication, performance, and scaling in MongoDB.
MongoDB is a cross-platform document-oriented database program that uses JSON-like documents with dynamic schemas, commonly referred to as a NoSQL database. It allows for embedding of documents and arrays within documents, hierarchical relationships between data, and indexing of data for efficient queries. MongoDB is developed by MongoDB Inc. and commonly used for big data and content management applications due to its scalability and ease of horizontal scaling.
MongoDB is a document-oriented NoSQL database that stores data in flexible JSON-like documents. It does not enforce a schema on collections of documents and allows embedding related data. Key features include dynamic schemas, indexing, replication for high availability, and horizontal scaling through sharding of data across machines. Documents are organized into collections, databases are containers for collections, and the basic components include the _id field, collections, cursors, databases, documents, fields, and storage of data in JSON format.
Back to Basics 2017: Mí primera aplicación MongoDBMongoDB
Descubra:
Cómo instalar MongoDB y usar el shell de MongoDB
Las operaciones básicas de CRUD
Cómo analizar el rendimiento de las consultas y añadir un índice
This document provides an introduction to MongoDB, including:
1) MongoDB is a schemaless database that supports features like replication, sharding, indexing, file storage, and aggregation.
2) The main concepts include databases containing collections of documents like tables containing rows in SQL databases, but documents can have different structures.
3) Examples demonstrate inserting, querying, updating, and embedding documents in MongoDB collections.
This document provides an introduction to MongoDB, a non-relational NoSQL database. It discusses what NoSQL databases are and their benefits compared to SQL databases, such as being more scalable and able to handle large, changing datasets. It then describes key features of MongoDB like high performance, rich querying, and horizontal scalability. The document outlines concepts like document structure, collections, and CRUD operations in MongoDB. It also covers topics such as replication, sharding, and installing MongoDB.
This webinar will walk you through building a simple location-based check-in app in MongoDB. We’ll cover the basics of MongoDB’s document model, query language, map reduce framework, and deployment architecture.
In this webinar you will discover:
- Why MongoDB is being adopted in organizations large and small
- How easy it is to start building applications with MongoDB
- Key features for manipulating and accessing data
- High availability and scale-out architecture
MongoDB is a document-oriented NoSQL database used for high volume data storage. It is a database that came into light around the mid-2000s and falls under the category of a NoSQL database. MongoDB uses a document model where data is stored in documents that can vary in structure and size, unlike traditional relational databases that enforce schema uniformity.
MongoDB is an open-source document database that provides high performance, high availability, and automatic scaling. MongoDB obviates the need for an Object Relational Mapping (ORM) to facilitate development.
Back to Basics, webinar 2: La tua prima applicazione MongoDBMongoDB
Questo è il secondo webinar della serie Back to Basics che ti offrirà un'introduzione al database MongoDB. In questo webinar ti dimostreremo come creare un'applicazione base per il blogging in MongoDB.
- MongoDB is a schema-free document database that stores data in BSON format.
- It aims to bridge the gap between relational and non-relational databases by providing scalability and flexibility similar to non-relational databases while also supporting richer queries than typical key-value stores.
- MongoDB installations involve downloading the MongoDB software, setting up a data directory, starting the MongoDB process, and connecting to it using the mongo shell for basic CRUD operations on databases and collections of documents.
Creating, Updating and Deleting Document in MongoDBWildan Maulana
This document discusses various methods for creating, updating, and deleting documents in MongoDB collections, including inserting documents, batch inserts, removing documents, updating documents using modifiers like $set and $inc, and choosing appropriate write speeds and safety levels. Key points covered include using batch inserts to speed up multiple document inserts, removing entire collections being faster than removing individual documents, and partial document updates being done efficiently using atomic update modifiers.
MongoDB is a non-relational database that stores data in flexible, JSON-like documents. It does not have a predefined schema, so documents in a collection do not need to have the same fields. Documents can also embed other documents to efficiently represent relationships between data. MongoDB is scalable and supports features like sharding. While it lacks rigid schema enforcement and referential integrity of SQL databases, MongoDB allows for rapid development and can handle diverse data types and scale easily.
MongoDB is a document-oriented, open source database that is high performing, horizontally scalable, and full featured. It uses a flexible schema and stores data in flexible JSON-like documents which allows for an evolving schema. MongoDB can be easily scaled out across commodity servers and provides high availability with automatic replication and recovery. It supports dynamic queries and indexing and has drivers for many languages.
The document discusses MongoDB and the Mongoid ORM for Ruby. It provides examples of using Mongoid to define MongoDB document schemas and associations, perform queries, and leverage features like validation, versioning, and aggregation. Overall, the document shows how Mongoid allows developers to interact with MongoDB documents in a similar way to ActiveRecord while taking advantage of MongoDB's flexible document data model.
Building Your First Application with MongoDBMongoDB
- MongoDB is a document database where documents (equivalent to JSON objects) are stored in collections rather than rows in tables.
- It is horizontally scalable, supports rich queries, and works with many programming languages through official drivers.
- To build a simple blog application, documents like users, posts, and comments can be directly inserted into their respective collections without needing to define a schema first. Properties like embedded documents and arrays allow flexible modeling of relationships.
Similar to The emerging world of mongo db csp (20)
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIVladimir Iglovikov, Ph.D.
Presented by Vladimir Iglovikov:
- https://www.linkedin.com/in/iglovikov/
- https://x.com/viglovikov
- https://www.instagram.com/ternaus/
This presentation delves into the journey of Albumentations.ai, a highly successful open-source library for data augmentation.
Created out of a necessity for superior performance in Kaggle competitions, Albumentations has grown to become a widely used tool among data scientists and machine learning practitioners.
This case study covers various aspects, including:
People: The contributors and community that have supported Albumentations.
Metrics: The success indicators such as downloads, daily active users, GitHub stars, and financial contributions.
Challenges: The hurdles in monetizing open-source projects and measuring user engagement.
Development Practices: Best practices for creating, maintaining, and scaling open-source libraries, including code hygiene, CI/CD, and fast iteration.
Community Building: Strategies for making adoption easy, iterating quickly, and fostering a vibrant, engaged community.
Marketing: Both online and offline marketing tactics, focusing on real, impactful interactions and collaborations.
Mental Health: Maintaining balance and not feeling pressured by user demands.
Key insights include the importance of automation, making the adoption process seamless, and leveraging offline interactions for marketing. The presentation also emphasizes the need for continuous small improvements and building a friendly, inclusive community that contributes to the project's growth.
Vladimir Iglovikov brings his extensive experience as a Kaggle Grandmaster, ex-Staff ML Engineer at Lyft, sharing valuable lessons and practical advice for anyone looking to enhance the adoption of their open-source projects.
Explore more about Albumentations and join the community at:
GitHub: https://github.com/albumentations-team/albumentations
Website: https://albumentations.ai/
LinkedIn: https://www.linkedin.com/company/100504475
Twitter: https://x.com/albumentations
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
“An Outlook of the Ongoing and Future Relationship between Blockchain Technologies and Process-aware Information Systems.” Invited talk at the joint workshop on Blockchain for Information Systems (BC4IS) and Blockchain for Trusted Data Sharing (B4TDS), co-located with with the 36th International Conference on Advanced Information Systems Engineering (CAiSE), 3 June 2024, Limassol, Cyprus.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/building-and-scaling-ai-applications-with-the-nx-ai-manager-a-presentation-from-network-optix/
Robin van Emden, Senior Director of Data Science at Network Optix, presents the “Building and Scaling AI Applications with the Nx AI Manager,” tutorial at the May 2024 Embedded Vision Summit.
In this presentation, van Emden covers the basics of scaling edge AI solutions using the Nx tool kit. He emphasizes the process of developing AI models and deploying them globally. He also showcases the conversion of AI models and the creation of effective edge AI pipelines, with a focus on pre-processing, model conversion, selecting the appropriate inference engine for the target hardware and post-processing.
van Emden shows how Nx can simplify the developer’s life and facilitate a rapid transition from concept to production-ready applications.He provides valuable insights into developing scalable and efficient edge AI solutions, with a strong focus on practical implementation.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
20 Comprehensive Checklist of Designing and Developing a WebsitePixlogix Infotech
Dive into the world of Website Designing and Developing with Pixlogix! Looking to create a stunning online presence? Look no further! Our comprehensive checklist covers everything you need to know to craft a website that stands out. From user-friendly design to seamless functionality, we've got you covered. Don't miss out on this invaluable resource! Check out our checklist now at Pixlogix and start your journey towards a captivating online presence today.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
2. scheduler
Reflexion
What's NOSQL means
We're thinking in changes
How is MongoDB
Let's get started MongoDB
What's going wrong?
Document structure
Basic Operations CRUD
Index Explain Hint
Data Model: be quiet - the answer
Sharding -scaling
3. {
"Name" : "Carlos Sánchez Pérez",
Name
"Love" : "Web Dev",
Love
"Title" : "Rough Boy",
Title
"Twitter" : "@carlossanchezp",
Twitter
"Blog" : "carlossanchezperez.wordpress.com",
Blog
"Job" : "ASPgems",
Job
"Github" : "carlossanchezp"
Github
}
4. REFLEXION
Through all this time one thing has stayed constant—relational
databases store the data and our decision is almost always implied
6. Because the true spirit of “NoSQL” does not consist in the
way data is queried. It consists in the way data is stored.
NoSQL is all about data storage.
“NoSQL” should be called “SQL with alternative storage
models”
8. ●
How will we add new machines?
●
Are their any single points of failure?
●
Do the writes scale as well?
●
How much administration will the system require?
●
If its open source, is there a healthy community?
How much time and effort would we have to expend to deploy and
integrate it?
●
●
Does it use technology which we know we can work with?
11. MongoDB is a powerful, flexible, and scalable
general-purpose database
12. Ease of Use
MongoDB is a document-oriented database, not a relational one.
One of the reason for moving away from the relational model is to make
scaling out easier.
13. Ease of Use
A document-oriented database replaces the concept
“row” with a more flexible model: “document”.
By allowing embedded documents and arrays, the document-oriented
approach makes it possible to represent complex hierarchical
relationships with a single record.
14. Ease of Use
Without a fixed schema, adding or removing fields as needed
becomes easier.
This makes development faster as developers can quickly iterate.
It is also easier to experiment.
Developers can try a lot of models for the data and then choose the
best one.
15. Easy Scaling
Data set sizes for applications are growing at an incredible pace.
As the amount of data that developers need to store grows, developers
face a difficult decision:
how should they scale their databases?
Scaling a database comes down to the choice between:
scaling up : getting a bigger machine.
scaling out : partitioning data across more machines.
17. Let's see some of the basic concepts of MongoDB:
• A document is the basic unit of data for MongoDB and is
equivalent to a row in a Relational Database.
• Collection can be thought of as a table with a dynamic schema.
• A single instance of MongoDB can host multiple independent
databases, each of which can have its own collections.
• One document has a special key, "_id", that is unique within a
collection.
• Awesome JavaScript shell, which is useful for the administration
and data manipulation.
18. Schemaless dynamics
MongoDB is a "schemaless" but it doesn't mean that you don't
need to thinking about design your schema!!
MongoDB is a “schemaless dynamic”, the meaning is don't
have an ALTER TABLE and migration.
19. At the core of MongoDB is the document: an ordered set of keys
with associated values.
In JavaScript, for example, documents are represented as objects:
{"name" : "Hello, MongoDB world!"}
{"name" : "Hello, MongoDB world!", "foo" : 3}
{"name" : "Hello, MongoDB world!",
"foo" : 3,
"fruit": ["pear","apple"]}
22. The keys in a document are strings. Any UTF-8 character is allowed in
a key, with a few notable exceptions:
• Keys must not contain the character 0 (the null character). This
character is used to signify the end of a key.
• The . and $ characters have some special properties and should be
used only in certain circumstances, but in general, they should be
considered reserved.
30. Or my Owner
By default ID
{ _id: ObjectID('4bd9e8e17cefd644108961bb'),
By default ID
title: 'My own Adventures in Databases',
url: 'http://example.com/exampledatabases.txt',
author: 'csp',
vote_count: 5,
Array
tags: ['databases', 'mongodb', 'indexing'],
Array
image: {
url: 'http://example.com/db.jpg',
caption: '',
SubDoc
type: 'jpg',
SubDoc
size: 75381,
data: "Binary"
},
comments: [ { user: 'abc',text: 'Nice article!'},
{ user: 'jkl',text: 'Another related article is at
http://example.com/db/mydb.txt'}
]
}
DOCUMENT
_id: 1
Array + SubDoc
Array + SubDoc
31. Collections
Like a
Table SQL
{“title” : “First”, “edge” : 34}
{“title” : “First”, “edge” : 34}
{“title” : “First”, “edge” : 34}
Collections
Document
Document
Like a row SQL
A collection is a group of documents. If a document is the
MongoDB analog of a row in a relational database, then a
collection can be thought of as the analog to a table.
32. Dynamic Schemas
Collections have dynamic schemas. This means that the
documents within a single collection can have any number of
different “shapes.”
For example, both of this documents could be stored in a single
collection:
{"greeting" : "Hello, mongoDB world!"}
{"foo" : 23}
33. Subcollections
One convention for organizing collections is to use namespaced
subcollections separated by the “.” character.
For example, an a Blog application might have a collection
named blog.posts and a separate collection named
blog.authors.
35. Basic Operations
CREATE: The insert function adds a document to a collection.
> post = {"title" : "My first post in my blog",
... "content" : "Here's my blog post.",
... "date" : new Date()}
> db.blog.insert(post)
> db.blog.find()
{
"_id" : ObjectId("5037ee4a1084eb3ffeef7228"),
"title" : "My first post in my blog",
"content" : "Here's my blog post.",
"date" : ISODate("2013-10-05T16:13:42.181Z")
}
36.
37. this.insertEntry = function (title, body, tags, author, callback) {
"use strict";
console.log("inserting blog entry" + title + body);
// fix up the permalink to not include whitespace
var permalink = title.replace( /s/g, '_' );
permalink = permalink.replace( /W/g, '' );
// Build a new post
var post = {"title": title,
"author": author,
"body": body,
"permalink":permalink,
"tags": tags,
"comments": [],
"date": new Date()}
// now insert the post
posts.insert(post, function (err, post) {
"use strict";
if (!err) {
console.log("Inserted new post");
console.dir("Successfully inserted: " + JSON.stringify(post));
return callback(null, post);
}
return callback(err, null);
});
}
38. Basic Operations
FIND: find and findOne can be used to query a collection.
> db.blog.findOne()
{
"_id" : ObjectId("5037ee4a1084eb3ffeef7228"),
"title" : "My first post in my blog",
"content" : "Here's my blog post.",
"date" : ISODate("2012-08-24T21:12:09.982Z")
}
41. Basic Operations
UPDATE: If we would like to modify our post, we can use update. update takes (at
least) two parameters: the first is the criteria to find which document to update,
and the second is the new document.
> post.comments = []
> db.blog.update({title : "My first post in my blog"}, post)
> db.blog.find()
{
"_id" : ObjectId("5037ee4a1084eb3ffeef7228"),
"title" : "My first post in my blog",
"content" : "Here's my blog post.",
"date" : ISODate("2013-10-05T16:13:42.181Z"),
"comments" : [ ]
}
43. Basic Operations
DELETE: remove permanently deletes documents from the database. Called with
no parameters, it removes all documents from a collection. It can also take a
document specifying criteria for removal.
> db.blog.remove({title : "My first post in my blog"})
> db.blog.find()
{
"_id" : ObjectId("5037ee4a1084eb3ffeef7228"),
"title" : "My second post in my blog",
"content" : "Here's my second blog post.",
"date" : ISODate("2013-10-05T16:13:42.181Z"),
"comments" : [ ]
}
44. Comparison
Name Description
$gt Matches values that are greater than the value specified in the query.
$gteMatches values that are equal to or greater than the value specified in the query.
$in Matches any of the values that exist in an array specified in the query.
$lt Matches values that are less than the value specified in the query.
$lte Matches values that are less than or equal to the value specified in the query.
$ne Matches all values that are not equal to the value specified in the query.
$ninMatches values that do not exist in an array specified to the query.
Logical
Name Description
$or Joins query clauses with a logical OR returns all documents that match the
conditions of either clause.
$and
Joins query clauses with a logical AND returns all documents that match the
conditions of both clauses.
$not
Inverts the effect of a query expression and returns documents that do not
match the query expression.
$nor
Joins query clauses with a logical NOR returns all documents that fail to
match both clauses.
48. > db.users.find({username: "user999999"}).explain()
{
"cursor" : "BasicCursor",
"isMultiKey" : false,
"n" : 1,
Others means:
Others means:
"nscannedObjects" : 1000000,
"nscanned" : 1000000,
The query could be
The query could be
"nscannedObjectsAllPlans" : 1000000,
returned 5 documents --n
returned 5 documents n
"nscannedAllPlans" : 1000000,
scanned 9 documents
scanned 9 documents
"scanAndOrder" : false,
from the index --nscanned
from the index nscanned
"indexOnly" : false,
and then read 5
and then read 5
"nYields" : 1,
full documents from
full documents from
"nChunkSkips" : 0,
the collection
the collection
"millis" : 392,
--nscannedObjects
nscannedObjects
"indexBounds" : {
},
"server" : "desarrollo:27017"
}
49. The results of explain() describe the details of how MongoDB executes the query.
Some of relevant fields are:
cursor: A result of BasicCursor indicates a non-indexed query. If we had used an
indexed query, the cursor would have a type of BtreeCursor.
nscanned and nscannedObjects: The difference between these two similar fields is
distinct but important. The total number of documents scanned by the query is
represented by nscannedObjects. The number of documents and indexes is
represented by nscanned. Depending on the query, it's possible for nscanned to be
greater than nscannedObjects.
n: The number of matching objects.
millis: Query execution duration.
53. Where are the answers?
1) Embedded or Link
2) 1 : 1
3) 1: many
4) 1:few
4) many:many
5) few:few
So gimme just a minute and I'll tell you why
54. Because any document can be put into any collection,
then i wonder:
“Why do we need separate collections at all?”
with no need for separate schemas for different kinds of
documents,
why should we use more than one collection?
56. Model One-to-One Relationships with Embedded Documents
{
_id: "csp",
name: "Carlos Sánchez Pérez"
}
{
2 Collections
patron_id: "csp",
street: "123 Aravaca",
city: "Madrid",
Number: "25 3º A",
zip: 12345
1) Frequency access
Thinking about the memory.
All information load
2) Growing size at the items
Writen of data
separated or embedbed
3) > 16Mb
4) Atomicity of data
}
If the address data is frequently retrieved with the name information, then with
referencing, your application needs to issue multiple queries to resolve the reference.
60. Model One-to-Many Relationships with Document
References
People
{
_id: "csp",
name: "Carlos Sánchez Pérez"
City: “MD”,
….................
}
City
{
_id: "MD",
Name: …..
….................
}
If you are thinking in
If you are thinking in
Embedded: ititnot a good
Embedded: not a good
solution in this case
solution in this case
Why?
Why?
Redundance information
Redundance information
61. Model One-to-Many Relationships with Document
References
BLOG
BLOG
Embedded itita good
Embedded a good
solution in this case
solution in this case
One-to-few
One-to-few
post {
title: “My first tirle”,
author : “Carlos Sánchez Pérez” ,
date : “19/08/2013″,
comments : [ {name: "Antonio López", comment : "my comment" }, { .... } ],
tags : ["tag1","tag2","tag3"]
}
autor { _id : “Carlos Sánchez Pérez “, password; “”,…….. }
62. Model Many-to-Many Relationships
Books and Authors
Books
{
:id: 12
title: "MongoDB: My Definitive easy Guide",
author: [32]
…........................
}
Authors
{
:id: 32
author: "Peter Garden",
books: [12,34,5,6,78,65,99]
…........................
}
MODEL
MODEL
Few-to-few
Few-to-few
Embedded books: ititnot a good
Embedded books: not a good
solution in this case
solution in this case
65. Sharding
Vertical scaling adds more CPU and storage resources to increase
capacity. Scaling by adding capacity has limitations: high performance
systems with large numbers of CPUs and large amount of RAM are
disproportionately more expensive than smaller systems. Additionally,
cloud-based providers may only allow users to provision smaller
instances. As a result there is a practical maximum capability for
vertical scaling.
Sharding, or horizontal scaling, by contrast, divides the data set and
distributes the data over multiple servers, or shards. Each shard is an
independent database, and collectively, the shards make up a single
logical database.