MongoDB Part 01: Press Room
> Inspiration <
> Overview <
> Advantages <
Inspiration
4 years ago(2013), I worked for my Swedish ex-CTO, Mats Engstorm, he talked about MariaDB and MongoDB. Currently, I have a good chance to learn about it and I have made a decision to learn MongoDB. Any advice is welcome if any since it's the first time for me.
Overview
MongoDB is C++ based open-source document database. It's cross-platform database and its syntax is pretty much like JSON from my experience. Prerequisite is about fundamental of RDBMS. Once you completed the course you would step up to mediocre level.
The MongoDB server is like general database. Let's say the server may consist of many databases.
For example,
a database is gonna insert a document(record or row equivalent) to a collection named 'users' or (table equivalent)
This database has one collection and 3 documents |
Example of document:
{
_id: ObjectId(59488f161edbf45b66e5b8f3)
title: 'MongoDB Overview',
description: 'MongoDB is no sql database',
by: 'tutorials point',
url: 'http://www.tutorialspoint.com',
tags: ['mongodb', 'database', 'NoSQL'],
likes: 100,
comments: [
{
user:'user1',
message: 'My first comment',
dateCreated: new Date(2011,1,20,2,15),
like: 0
},
{
user:'user2',
message: 'My second comments',
dateCreated: new Date(2011,1,25,7,45),
like: 5
}
]
}
_id: this key is like id in MySQL since it may be automagically generated by the database or manually assign this value.
ObjectId(59488f161edbf45b66e5b8f3) : tmpi :4-3-2-3
59488f16 = timestamp
1edbf4 = machine id
5b66 = process id
e5b8f3 = incremental VALUE
MongoDB is better than RDBMS with these issues:
- Schema less
- MongoDB is a document database in which one collection holds different documents. Number of fields, content and size of the document can differ from one document to another.
- Structure of a single object is clear.
- No complex joins.
- Deep query-ability. MongoDB supports dynamic queries on documents using a document-based query language that's nearly as powerful as SQL.
- Tuning.
- Ease of scale-out − MongoDB is easy to scale.
- Conversion/mapping of application objects to database objects not needed.
- Uses internal memory for storing the (windowed) working set, enabling faster access of data.
Why Use MongoDB?
- Document Oriented Storage − Data is stored in the form of JSON style documents.
- Index on any attribute
- Replication and high availability
- Auto-sharding
- Rich queries
- Fast in-place updates
- Professional support by MongoDB
Where to Use MongoDB?
- Big Data
- Content Management and Delivery
- Mobile and Social Infrastructure
- User Data Management
- Data Hub
Reference
You may leave comment to improve it.
Thank you from THAILAND.
No comments:
Post a Comment