background preloader

SQL to Mongo Mapping Chart

SQL to Mongo Mapping Chart
In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB. The following table presents the various SQL statements and the corresponding MongoDB statements. The examples in the table assume the following conditions: Create and Alter The following table presents the various SQL statements related to table-level actions and the corresponding MongoDB statements. For more information, see db.collection.insert(), db.createCollection(), db.collection.update(), $set, $unset, db.collection.ensureIndex(), indexes, db.collection.drop(), and Data Modeling Concepts. Insert The following table presents the various SQL statements related to inserting records into tables and the corresponding MongoDB statements. For more information, see db.collection.insert(). Select The following table presents the various SQL statements related to reading records from tables and the corresponding MongoDB statements. Related:  Développement WEB

Camel: CSV The CSV Data Format uses Apache Commons CSV to handle CSV payloads (Comma Separated Values) such as those exported/imported by Excel. Options Marshalling a Map to CSV The component allows you to marshal a Java Map (or any other message type that can be converted in a Map) into a CSV payload. An example: if you send a message with this map... ... through this route ... ... you will end up with a String containing this CSV message Sending the Map below through this route will result in a CSV message that looks like foo,bar Unmarshalling a CSV message into a Java List Unmarshalling will transform a CSV messsage into a Java List with CSV file lines (containing another List with all the field values). An example: we have a CSV file with names of persons, their IQ and their current activity. We can now use the CSV component to unmarshal this file: The resulting message will contain a List<List<String>> like... Marshalling a List<Map> to CSV Available as of Camel 2.1 File Poller of CSV, then unmarshaling

mattkrick/meatier A Visual Explanation of SQL Joins I love the concept, though, so let's see if we can make it work. Assume we have the following two tables. Table A is on the left, and Table B is on the right. We'll populate them with four records each. id name id name -- ---- -- ---- 1 Pirate 1 Rutabaga 2 Monkey 2 Pirate 3 Ninja 3 Darth Vader 4 Spaghetti 4 Ninja Let's join these tables by the name field in a few different ways and see if we can get a conceptual match to those nifty Venn diagrams. There's also a cartesian product or cross join, which as far as I can tell, can't be expressed as a Venn diagram: SELECT * FROM TableA CROSS JOIN TableB This joins "everything to everything", resulting in 4 x 4 = 16 rows, far more than we had in the original sets.

Learn Docker by building a Microservice If you are looking to get your hands dirty and learn all about Docker, then look no further! In this article I'm going to show you how Docker works, what all the fuss is about, and how Docker can help with a basic development task - building a microservice. We'll use a simple Node.js service with a MySQL backend as an example, going from code running locally to containers running a microservice and database. What is Docker? At its heart, Docker is software which lets you create an image (which is a lot like a template for a virtual machine) and then run instances of that image in a container. Docker maintain a vast repository of images, called the Docker Hub which you can use as starting points or as free storage for your own images. We're going to build images, create containers from images and more in this article. Install Docker To follow along and use this article, you'll need Docker. Check the installation guide for your platform, docs.docker.com/engine/installation. Try It Out The Brief #!

MongoDb Architecture NOSQL has become a very heated topic for large web-scale deployment where scalability and semi-structured data driven the DB requirement towards NOSQL. There has been many NOSQL products evolving in over last couple years. In my past blogs, I have been covering the underlying distributed system theory of NOSQL, as well as some specific products such as CouchDB and Cassandra/HBase. Last Friday I was very lucky to meet with Jared Rosoff from 10gen in a technical conference and have a discussion about the technical architecture of MongoDb. I found the information is very useful and want to share with more people. One thing I am very impressed by MongoDb is that it is extremely easy to use and the underlying architecture is also very easy to understand. Here are some simple admin steps to start/stop MongoDb server # Install MongoDB mkdir /data/lib # Start Mongod server ... Here are some basic example. To speed up the query, index can be used. Data modification happens in place.

Granular : utilisez la puissance de WPF dans votre navigateur avec cette r impl mentation compil e en JavaScript Granular : utilisez la puissance de WPF dans votre navigateuravec cette réimplémentation compilée en JavaScript Granular est une réimplémentation de WPF, Windows Presentation Foundation. Ce dernier fournit aux développeurs un modèle de programmation unifié pour la construction moderne d'applications bureautiques sur Windows. Granular est compilé en JavaScript, ce qui permet aux applications WPF de fonctionner dans le navigateur en utilisant le compilateur JavaScript Saltarelle C#). Mais pourquoi faire cela ? WPF peut être considéré comme une définition, pas uniquement comme une implémentation. Sur le site de présentation, l'auteur donne pour exemple un projet réalisé en WPF et le même projet réalisé avec Granular. Le rendu est donc le plus similaire possible. Le principal avantage de cette approche est que le développement et les tests sont effectués uniquement dans Visual Studio, loin de n'importe quel navigateur ou débogueur JavaScript. Voici quelques caractéristiques : Démonstration.

New Couch Potato: simple, testable, opinionated. – Upstream - Agile May 17, 2009 by alex After my talk about Ruby CouchDB frameworks at Scotland on Rails where I dismissed a few of of the libraries available (including my own Couhch Potato) as not fitting the CouchDB way of doing things, I have been hacking away the past few weeks working on a complete overhaul of Couch Potato. As a first result I have just released version 0.2 of the framework. Its new goals are simplicity, embracing the CouchDB semantics and testability. I disconnected models from the database - there are no more save/get/find methods in the models. I have dropped associations and thrown away all the ActiveRecord like view creation/querying, replacing it with a new, more CouchDB like system. The following paragraphs will show you how to work with the new Couch Potato. Saving / loading models As I said I have decoupled the models from the database, a model doesn’t have permanent access to the database anymore. New Views Overhauling of the views had two main goals: Testing

Google Analytics Can Show You Screen Resolution ≠ Browser Window It was five years ago when I wrote Screen Resolution ≠ Browser Window. The idea was that, at the time, there was a lot of talk about monitor size in relation to how we design websites. JavaScript is happy to tell the dimensions of a monitor: screen.width. The fact that we can and do practice responsive design means that we have all but stopped worrying about what an "average" size browser is. Back in 2011, to gather that original data, I wrote some JavaScript to measure both the screen size and the browser window size and save them both to a database as one record. That's still 39% of sessions where the browser window is smaller, though, which is interesting. The data is easier to get today Assuming you're using Google Analytics, anyway. Make a Custom Report with Browser Size Add a Secondary dimension: Screen Resolution Now you can look at both numbers together: I get 25,927 unique combinations of Browser Size and Screen Resolution For css-tricks.com, that is.

Related: