background preloader

SQL to MongoDB Mapping Chart

SQL to MongoDB 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

mattkrick/meatier MongoDB Gotchas & How To Avoid Them n.b. this post has been updated as of July 29th, 2014 A lot of people hate on MongoDB. In my opinion they’re misguided - the main reason so many people think like this is a lack of understanding. Everyone should be able to benefit from MongoDB’s power and simplicity, and so as a follow up to David’s article I have outlined some common and not-so-common things that hackers should know about MongoDB. First though, why should you listen to me? 32-bit vs 64-bit Most modern servers are either running 32-bit or 64-bit operating systems. MongoDB ships with two versions - 32-bit and 64-bit. tl;dr - Just use 64-bit, or understand the limitations of 32-bit Document size limits Unlike a Relational Database Management System (RDBMS) which stores data in columns and rows, MongoDB stores data in documents. Like most other databases, there are limits to what you can store in a document. Generally, I would suggest avoiding storing large, irregularly updated objects in a database of any kind. Write failure

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 #!

for the PHP Mind, Part 3 This is part 3 in a series, which will focus on the data modeling aspect of working with document databases. The previous parts are also available for reading: Part 1: Getting Started, and Part 2: Queries and Indexes. The Usual Suspects Although there are plenty of existing articles, presentations and webcasts about modeling your data to take advantage of a document database, this post is taking a slightly PHP-centric position as a part of this series. We’re going to use two different scenarios to look at data modeling in the document world, chosen as common examples to illustrate differences in implementation between relational and document databases: Blog. Scenario 1: Getting All Bloggy I’m kicking off with the tried-but-true blog example as it is a common frame of reference. Your typical blog will have the following elements to consider: A typical third normal form relational model will produce around six tables. Check to see if this comment is responding to another commentInsert comment

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.

for the PHP Mind, Part 2 This is part 2 of a series, with part 1 covering the bare essentials to get you going. In this post we are going to take a closer look at queries and how indexes work in MongoDB. Introduction I’d like to kick off this post with a thanks to the folks behind the PHP extension for MongoDB, who have done a fantastic job of matching the functionality of the Mongo shell client. This is important when you start to see how similarly the two function, and you might find that you can tweak your logic using the shell and quickly implement the same logic from within PHP. The PHP extension supports something that is rather new to a lot of folks in the PHP world, a feature called method chaining: The ability to run several methods at the same time on one object. $result = $songs->find()->limit(2); Of course this works in the Mongo shell too. result = db.songs.find().limit(2); For more reading on method chaining, there’s an excellent blog post about method chaining in PHP 5. MongoDB Data Types

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. But how useful is that? Isn't it more useful to know how big the actual browser window is? 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: For css-tricks.com, that is.

for the PHP Mind, Part 1 This is part one of a three part blog series by Mitch Pirtle. We have covered a lot on the blog about MongoDB features, as well as many ways to utilize MongoDB from different languages. This is the first in a series of posts from the perspective of a PHP developer; and covers the gamut from getting started to advanced concepts. I’m not going to waste the first blog post getting you up and running with MongoDB and the PHP extension, as that whole process is documented quite beautifully: While we’re at it, you should also take advantage of the online documentation for MongoDB, as well as the reference for the MongoDB extension for PHP. Getting Started "So now what?" With MongoDB this is greatly simplified, as all MongoDB databases are UTF-8. We need to secure the database but that is relatively straightforward. You can dynamically create your database from PHP when you save your first document. Documents? Let’s get some quick terminology down so things make more sense. Conclusion

Related: