ASP. NET WebForm & amp; MongoDB, asp. netwebform

Source: Internet
Author: User
Tags comparison table connect to microsoft sql server mongodb tutorial

ASP. NET WebForm & MongoDB, asp. netwebform
ASP. NET WebForm & MongoDB

 

I recently introduced AngularJS to my friends.
I bought a three-in-one book, Node. JS + MongoDB + AngularJS
Http://www.pearsoned.co.uk/bookshop/detail.asp? Item = 100000000577793

Of course, I see http://product.dangdang.com/1230824864.html in simplified Chinese

 

===================================================== =

MongoDB (I am thinking, does this mean Mongolia? Else l ?)
For more information, see Wikipedia. Https://zh.wikipedia.org/wiki/MongoDB

MongoDB is NoSQL, meaning Not Only SQL. In addition to the Windows version, the C # And. NET Driver are also provided to link us.
Is a file-oriented database. He does not have a Schema and the storage format is BSON.

BSON (Binary JSON) is actually a lightweight version of JSON. To be honest, I initially thought it was the same, but there were some differences.

BSON factory site (http://bsonspec.org/) Description:
BSON [bee · sahn], short for Binary JSON, is a binary-encoded serializationJSON-like documents. Like JSON, BSON supports the embedding of statements and arrays within other statements and arrays. BSON also contains extensions that allow representation of data types that are not part of the JSON spec. For example,BSON has a Date type and a BinData type.

BSON can be compared to binary interchange formats, like Protocol Buffers. BSON is more"Schemaless"Than Protocol Buffers, which can give it an advantage in flexibility but also a slight disadvantage in space efficiency (BSON has overhead for field names within the serialized data ).

 

See http://blog.csdn.net/amuseme_lu/article/details/6573912 (Simplified Chinese)

Let me tell you that the original MongoDB website is clearly written and clearer than the book.

For more information about JSON (if you want to know about JSON and BSON), see my previous articles.
Https://www.dotblogs.com.tw/mis2000lab/2013/10/24/json_jquery

 


======= Simple MongoDB installation ================================== =====

After downloading MongoDB, follow these steps.

If you do not want to download or install it on your local machine, refer to Appendix 1 below (free cloud resources are available)

For the following steps, refer to Appendix 2 below.


First, after the installation is complete, create a directory for MongoDB.C: \ data \ db \

Second, executeMongod command.


Third, create a test database. Enter the commandMongo \ localhost \ test

And add two records (Document in MongoDB)

 

====== MongoDB & ASP. NET ==========================================

MongoDB & C # Quick Start-http://mongodb.github.io/mongo-csharp-driver/2.0/getting_started/quick_tour/

In Visual Studio 「NuGetSearch for the keyword "MongoDB" and install related suites --MongoDB. Driver.
This is the most convenient way.

You can also download the C # Driver from the MongoDB factory website and then add it to the reference page"

A simple example is as follows:
UsingMongoDB. Driver;
UsingMongoDB. Bson;

Var Conn = new MongoClient ("mongodb: // host: 27017/test ");
Var db = Conn. GetDatabase ("test ");
Var collection = db. GetCollection <BsonDocument> ("test"); // data table

Var document = collection. Find (new BsonDocument (). FirstOrDefault ();
Response. Write (document. ToString (); // document is a record.


Related Articles:

Appendix 1MongoDB Tutorial (1) creation of the MongoDB environment in the cloud Era
Http://www.codedata.com.tw/database/mongodb-tutorial-1-setting-up-cloud-env/

In this article, I wrote a good comparison table between MongoDB and traditional databases!

Appendix 2Connecting MongoDB with ASP. NET
Http://www.codeproject.com/Articles/656093/Connecting-MongoDB-with-ASP-NET

This article is great, but subsequent ASP. NET programs cannot be applied due to version replacement.
It is recommended to directly refer to the original factory documents better http://mongodb.github.io/mongo-csharp-driver/2.0/getting_started/quick_tour/


Trend Micro imports MongoDB to track and manage 0.1 million mobile devices worldwide
Http://www.ithome.com.tw/tech/87418

 

Another interesting question:

Connect to SQL Database using Node. js on Windows
Https://azure.microsoft.com/zh-tw/documentation/articles/sql-database-develop-nodejs-simple-windows
/

Introducing the Microsoft Driver for Node. JS for SQL Server
Http://blogs.msdn.com/ B /sqlphp/archive/2012/06/08/introducing-the-microsoft-driver-for-node-js-for-sql-server.aspx

Youtube video --How to connect to Microsoft SQL Server database using NodeJs
Https://www.youtube.com/watch? V = MLcXfRH1YzE
 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.