background preloader

The MongoDB 3.0 Manual — MongoDB Manual 3.0.5

The MongoDB 3.0 Manual — MongoDB Manual 3.0.5

Nested Categories The nested categories schema design pattern targets the hierarchical structures traditionally found in a product catalog on an line e-commerce website. Trees using Paths Let’s insert the category /electronics/embedded and a product that belongs in this category. In the Trees as Paths we are using what looks like file directory paths from UNIX. Together with regular expressions we can slice the paths as we need to efficiently retrieve any level of the tree structure. A couple of notes about the schema above. Lets fetch all the categories just below the top level / Notice the regular expression /^\/$/. Locate the entire tree structure below the cases level /cases Notice the regular expression /^\/cases\/$/. To locate all the products for the /electronics/embedded category This will match any documents where the categories array contains the string /electronics/embedded. Indexes Covered Indexes Let’s rewrite the query of all the categories just below the top level / and look at the explain plan.

NoSQL and Document Oriented Databases Chances are, you've spent your entire database life with relational databases. Data gets organized into columns, and stored in rows. You manipulate data with SQL (Structured Query Language) and there's really no other way to do it. NoSQL is not a specific piece of software, but rather a philosophy. Horizontally Scalable The problem is that SQL doesn't scale well. Document-oriented databases (such as CouchDB and MongoDB) are designed for horizontal scalability. These types of databases operate on something similar to distributed hash tables (DHTs). One of the advantages here is that this is extremely easy to parallelize. Schema-less Another defining feature of document-oriented databases is that they're schemaless. Though, while these documents are schemaless, they're not freeform. One example of this is compactness. But that has further implications. Cloud Model The trend in web applications (and many other fields) is toward that of cloud computing.

MySQL Cluster Sandbox MySQL Cluster Sandbox let's you get going within seconds. The packages contains a number of scripts to install, setup, and run MySQL CLuster and are intended for localhost installation only. They can be used for evaluation and development, as well as getting familiar with MySQL Cluster. Disk intensive, i.e write intensive apps, should use a real distributed setup. The packages comes with: 1 management server 2 data nodes 2 mysql servers All processes are running on localhost! You can install the packages as any user! Choose if you want to use the Pre-packaged configurations (fixed ports) or create a Custom configuration where you set the ports yourself. Whatever you chose the scripts can automatically download and compile the latest source code release, or you can download the latest binary release from dev.mysql.com/downloads/cluster mac osx users install GNU getopt from MacPorts ( port install getopt )download macos.sh and put in mysqlcluster-71-smallsh macosh.sh Small Medium Large

Data Model Design — MongoDB Manual 3.0 Effective data models support your application needs. The key consideration for the structure of your documents is the decision to embed or to use references. Embedded Data Models With MongoDB, you may embed related data in a single structure or document. Embedded data models allow applications to store related pieces of information in the same database record. In general, use embedded data models when: you have “contains” relationships between entities. In general, embedding provides better performance for read operations, as well as the ability to request and retrieve related data in a single database operation. However, embedding related data in documents may lead to situations where documents grow after creation. In version 3.0.0, MongoDB uses Power of 2 Sized Allocations as the default allocation strategy for MMAPv1 in order to account for document growth, minimizing the likelihood of data fragmentation. Normalized Data Models In general, use normalized data models:

Cloud Computing Overview The right cloud can solve IT problems today while leaving your business open to future innovation. But many cloud initiatives fail to deliver the promise of agility and value to the business. Based on open technologies, Red Hat's comprehensive solutions build scalable, interoperable private and hybrid clouds. So you can quickly deliver services that make your IT efficient and your business agile—now and in the future. Ready for a private cloud now? Red Hat does it right: fast, reliably, and securely while preparing you to evolve to an open hybrid cloud. Get started today Why open hybrid cloud? It solves real business problems by providing interoperability, workload and data portability, open APIs, and freedom of choice across new and existing heterogeneous infrastructures. Learn more

Réinvention de la gestion des informations Authentification sous MongoDB « Throrïn's Studio Aujourd’hui, changement complet de technologie. Depuis quelques semaines au travail, nous migrons notre projet PHP/MySQL/JS vers du NodeJS/MongoDB avec une API REST. Je vais donc partager avec vous un point avec lequel j’ai eu un peu de mal : L’authentification avec MongoDB. Je tiens à préciser que cet article ne remplace pas la documentation officielle et qu’ici, il ne s’agit que d’une mise en application à travers ce que j’ai compris. Si j’ai fait une erreur, merci de me le préciser en commentaires. Je ne m’attarderai pas sur qu’est-ce que MongoDB et quelles sont les différences avec une base de donnée relationnelle. Si vous avez mongoDB installé sur votre serveur, vous savez aussi que vous avez, à l’instar de MySQL, un client disponible en ligne de commande, à savoir pour MongoDB : mongo. Ensuite, il faut savoir que pour l’authentification, et ce peu importe la base de donnée cible, MongoDB s’appuie sur la liste des utilisateurs présents dans la base admin. auth = true

Specification 1. Introduction GeoJSON is a format for encoding a variety of geographic data structures. A GeoJSON object may represent a geometry, a feature, or a collection of features. GeoJSON supports the following geometry types: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection. Features in GeoJSON contain a geometry object and additional properties, and a feature collection represents a list of features. A complete GeoJSON data structure is always an object (in JSON terms). 1.1. A GeoJSON feature collection: 1.2. JavaScript Object Notation (JSON), and the terms object, name, value, array, and number, are defined in IETF RFC 4627.The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in IETF RFC 2119. 2. GeoJSON always consists of a single object. 2.1 Geometry Objects 2.1.1. A position is the fundamental geometry construct. 2.1.2.

Related: