background preloader


Facebook Twitter

Learn MongoDB With Me - Part 2. Introduction This is the second article of the series "Learn MongoDB with me", if you haven't read my previous post on this topic, I strongly recommend you to find it here. This is the continuation of exploring the Mongo shells, we will be performing some commands on the Mongo shells. For easy reference I will try to add screenshots for each steps I am following. I hope it will help you come along with me. Background Like I said, it is going to be the second part of the series. Mongo shells, the perfect CLI We can do anything in the Mongo shell, to make the statement clear. As a first step, let us see some documentation. Hide Copy Code C:\Program Files\MongoDB\Server\3.4\bin>mongoimport --help The above command will give you all the options available to get started.

Insert data to MondoDB using Mongo shell Now let's say I have a following JSON data, and we are going to insert the same to our db collection. To do so, we need to use the following command. Updating a document in MongoDB Conclusion. A basic SPA application using AngularJS,WebAPI and Entity Framework. Download Introduction SPA which stands for Single Page Application is the latest trend in web application development.It is a web application that load a single HTML page initially and is dynamically updated as the user interacts with the application.

In this article we will see the requirement for SPAs and explore the technologies we can use to create a Single Page Application.We will also see how to create a basic application using AngularJS ,WebAPI and Entity Framework. Background The goal of a SPA is to provide the experience to the user which is like a desktop application. In a Single Page Application or SPA the page never reloads though parts of the page may refresh. If we consider any web application there are two main components involved web server and web browser or the client. Traditional web application In a conventional Web application, every time the client calls the server, the server returns a new HTML page.

Client View. A MongoDB Tutorial using C# and ASP.NET MVC | Joe Stevens' Blog. In this post I’m going to create a simple ASP.NET MVC website for a simple blog that uses MongoDB and the offical 10gen C# driver. MongoDB is no NOSQL database that stores information as Binary JSON (BSON) in documents. I have been working with it now for around 6 months on an enterprise application and so far am loving it. Our application is currently in alpha phase but should be public early next year! If you are used to working with an RDBMS, it takes a little bit of getting used to as generally you work with a denormalized schema.

This means thinking about things quite differently to how you would previously; you’re going to have repeating data which is a no-no in a relational database, but it’s going to give you awesome performance, sure you may need an offline process that runs nightly and goes and cleans up your data, but for the real time performance gains it’s worth it. Download source Our reasons for choosing MongoDB were performance and scalability. Now back to MVC. A MongoDB Tutorial using C# and ASP.NET MVC | Joe Stevens' Blog. A MongoDB Tutorial using C# and ASP.NET MVC | Joe Stevens' Blog. A Roundup of MongoDB Management Tools. I’ve been working with MongoDB for a long time now. Back in the early days, there really were no management tools analogous to RDBMS tools (e.g.

SQL Server Management Studio). Since then, things have changed significantly. It’s time to look around and see what management / monitoring tooling is around these days for MongoDB. The news is good. 1. Robomongo — is a shell-centric cross-platform open source MongoDB management tool (i.e. Key features: Full power of MongoDB shell with the ease of a GUIMultiple shellsMultiple resultsAutocompletionView your MongoDB database as a hierarchical tree consisting of databases, collections, indexes and usersUser management My take: Robomongo is definitely my current favorite management tool for MongoDB. The shell, price: $0 / open-source, platforms: Windows, OS X, LinuxNo url, comes with MongoDB itself.

The mongo shell is an interactive JavaScript shell for MongoDB, and is part of all MongoDB distributions. Key features: Conclusion: Cheers,@mkennedy. Aggregations in MongoDB | The Meteor Chef. What we're going to learn In this snippet, we'll learn about using MongoDB's aggregate method for filtering and grouping data. We'll learn how aggregations work in Mongo and take a look at a practical example of how to use them in Meteor. A non-trivial task when it comes to MongoDB is filtering and grouping data. Using simple queries, our power is limited beyond a certain level of complexity. In this snippet, we’re going to learn how to get access to aggregations in Meteor and look at a practical example of how to put them to use.

Installation In order to get access to Mongo’s aggregate feature, we’ll need to begin by installing the meteorhacks:aggregate package. Terminal meteor add meteorhacks:aggregate That’s it! What is an aggregation? In MongoDB, an aggregation is a means for filtering down a collection of data and then performing some sort of operation on it. Consider the following scenario. The good news is that we can save ourselves some trouble using a MongoDB aggregation.

Phew! Blog Premiers pas avec MongoDB » Cellenza Blog. MongoDB est une base de données orientée document. On y retrouve la possibilité de stocker des collections d’objets dans des tables sans avoir de schéma prédéterminé. Pour tous ceux qui ont de l’expérience avec les bases de données SQL, cette nouvelle approche peut être un peu déroutante au début. Je vais donc essayer de donner les premières pistes qui permettront à quiconque de débuter avec les bases de données NoSQL. Installation de MongoDB Avant toute chose, il faut installer le moteur de base en lui-même. Pour cela je propose une solution simple : Chocolatey. Lorsque Chocolatey est installé, on peut installer Mongo DB et MongoVue avec les commandes suivantes dans un command prompt : Contexte et exemples Afin d’illustrer cet article j’ai créé un projet dont seront tirés les exemples à suivre. L’application qui découle de ce projet est relativement simple et se décompose en trois parties.

Ajout de la référence NuGet et création de la connexion Insertion de données Recherche Suppression. CSharp Driver Tutorial. Introduction This tutorial introduces the officially supported C# Driver for MongoDB. The C# Driver consists of two libraries: the BSON Library and the C# Driver. The BSON Library can be used independently of the C# Driver if desired. The C# Driver requires the BSON Library. You may also be interested in the C# Driver Serialization Tutorial. Downloading The C# Driver is available in source and binary form. The simplest way to get started is by using the nuget package. The source may be downloaded from We use msysgit as our Windows git client. To clone the repository run the following commands from a git bash shell: cd <parentdirectory> git config --global core.autocrlf true git clone cd mongo-csharp-driver git config core.autocrlf true You must set the global setting for core.autocrlf to true before cloning the repository.

Git config --global core.autocrlf false Building Running Unit Tests BsonUnitTestsDriverUnitTestsDriverUnitTestsVB. GitHub - meteor-utilities/smart-publications: Smart Publications. How to set up a database if you’re a front-end developer. Someone recently asked me what’s the easiest way for a front-end developer to save users’ data. So I am going to explain how to do just that. Setting up the database The first thing we will need is an actual database. You can head to mlab for a free one. Once you’ve signed up, click create new in the MongoDB Deployments tab. The sandbox database is free of charge, so that’s the one we are going to use. Once we’ve created the database, we need to create an account so that we can authenticate ourselves.

On top of the database’s page, you should see a MongoDB URI. Mine, for example, is: Setting up the server We are going to use Node in our back end. Have a look at the starting server.js file I provided: We start by importing express — it’s the library we will use to handle requests to our server. We need use(require(cors)) to allow cross-domain requests.

Routing Some examples: Install MongoDB on Windows — MongoDB Manual 2.4.8. Installation et bases de MongoDB - Syrinxoon Tuts. MongoDB est l'une des bases de données composant le mouvement NoSQL au même titre que qu'Apache CouchDB pour ne citer qu'elle. L'intérêt de ce genre de bases de données se ressent dans la manipulation de très grosses bases de données où le temps de réponse compte plus que l'intégrité des données. En effet, les bases NoSQL sont des SGBD et laissent ainsi tomber le R de relationnel au profit d'une plus grande simplicité, performance et montée en charge. Pour en apprendre plus au sujet des bases de données NoSQL et de leurs différences, je ne saurais que trop vous conseiller le livre Seven Databases in Seven Weeks: A Guide to Modern Databases and the NoSQL Movement (lien sponsorisé) à paraître mi-Avril.

Le livre est anglais mais si ça ne vous dérange pas alors foncez, vous ne serez pas déçu. Ce tutoriel à pour but de vous faire découvrir MongoDB via la ligne de commande et via deux langages de programmation que sont PHP et Ruby. Allons y ! Installation sur Linux Si vous êtes en 32 bits : Meteor Meets GraphQL — KADIRA VOICE. Meteor Meets GraphQL We have been using GraphQL at Kadira for about four months. Everyone at Kadira loves it. We introduced Learn GraphQL online course in October, which allows you to master the basics of GraphQL in under 2 hours. Now, this is our attempt to bring GraphQL to Meteor.

This was supposed to be Kadira’s Christmas gift to Meteor developers. Anyway, we couldn’t deliver this on time. So, this as our New Year’s gift for 2016. Why GraphQL for Meteor? In my post on Why Meteor needs a new data layer, I pointed out why we need to think about Meteor’s data stack again. That’s where GraphQL is going to help us. Additionally in the client, we can define data requirement for our UIs declaratively. If you are new to GraphQL, look at the first six lessons of our Learn GraphQL course. Demo App Before we look at the GraphQL Meteor integration, check out this demo app. Querying in clientClient-side cachingMutationsOptimistic updatesAuthorization Here’s the source code of the app. Server Side Schema.

Mongodb/mongo-csharp-driver. Ozlerhakan/mongolastic. RESTful WEB API for CRUD operations in MongoDB. Download source (on GitHub) Introduction In my previous article we did CRUD operations using MongoDB shell commands. As promised, here I am with this article sharing how to create RESTful Web API for CRUD operations in MongoDB using .NET drivers. As you already know, MongoDB is the future of modern web applications amd it is very important for .NET developers to get their hands on MongoDB drivers, so this article is my little effort in this direction. I hope you would like it and appreciate my work. In this article we are to going to create Web APIs for manipulating and performing CRUD operations on student resource of our project. Application Architecture Application we are going to build is very simple we are going to use MongoDB as our database and will create .NET Web APIs for data operation on MongoDB and there will be a test client to use our Web APIs. Database Setup Creating database is a piece of cake in MongoDB.

Hide Copy Code Creating Web API Steps: 1. 2. 3. 4. Creating Data Model Steps. Scripting With MongoDB. An often overlooked, but extremely powerful feature of MongoDB is the ability to execute Javascript directly within your database instance. Recently, I was tasked with gathering some quick statistics on an ongoing A/B test. The system was splitting new users into two separate groups and presenting each group with slightly different experiences. The goal was to find the number of users per group, and find out the average number of “interactions” per user, per group. I fired up Robomongo and went to work. The first thing I needed to do was define the two (or more) groups that I wanted to gather statistics on.

To keep things simple for this example, let’s assume that users in Group A have a group field on their user document with a value of "A", and users in Group B have "B": Next, I wanted to loop through each of these groups, and find out how many users existed in each. The first step to counting the number of interactions per group was to build a list of userIds per group. The NoSQL Movement, LINQ, and MongoDB - Oh My! - DevelopMentor. Maybe you’ve heard people talking about ditching their SQL Servers and other RDBMS entirely. There is a movement out in the software development world called and it’s taking the web application world by storm. “Insanity!” You may cry, “for where will people put their data if not in a database? Flat files? Tell me we aren’t going back to flat files.” No, but in the relational model, something does has to give.

The outcry about flat files above is meant to highlight an assumption developers often have about building data-driven applications: Data goes in the database (SQL Server, Oracle, or MySql). The NoSQL movement asks the question: “Is the relational database (RDBMS) always the right tool for data storage and data access?” Starting from an RDBMS is virtually an axiom of software development. The converse is, of course, also true. This move towards NoSQL is driven by pressure from two angles in the web application world: Choosing NoSQL for Ease-of-Use and Deployment It’s true, there are. Using GraphQL with MongoDB. GraphQL is an alternative to REST endpoints for handling queries and database updates and in this Write Stuff article Igor Ribeiro Lima shows how you can use it with MongoDB and web applications.

GraphQL itself is a way to define a contract of what is provided by the server to a web application. GraphQL tries to improve how clients communicate with remote systems. It comes from a simple idea – instead of defining the structure of responses on the server, the client is given the flexibility to define what it wants in response to its queries. In this article we'll show you everything you need to get going with GraphQL. Quick introduction As we know, a REST API typically delivers all the data a client UI might need about a resource and leaves it up to the client to extract the bits of data it actually wants to show. Instead, with GraphQL, the UI gets the data it needs in a form that is useful for the UI. Let's have a closer look at GraphQL itself... What is GraphQL You don't need to use cURL. Using LINQPad to query your Mongo Database - Derik Whittaker.

Recently I started playing around w/ Mongo for a side project and so far it has been a cake walk. While learning how to use Mongo I quickly realized that the ‘out of the box’ tool to query the database was the command line. Now this works great, but is limited. I am not able to easily save and reuse any scripts. While doing some simple research about different Admin Consoles for Mongo I noticed that I could use LINQPad to do accomplish my needs. In order to use LINQPad there are a few steps which need to be performed, the first of which is to download and install LINQPad. How to reference the Mongo C# Library: When ever I need to reference any assemblies I want to use NuGet when at all possible, fortunately I am in luck because LINQPad has native support for this. Now that we have Mongo Client referenced we can create the code needed to make our connection and do something useful Connecting to Mongo in LinqPad To do this you can add code as seen below.

Till next time, Which is the best MongoDB GUI?