Tuesday, May 25, 2010

Friday, May 21, 2010

Sinatra 8

a. What is MongoDB? How does it relate to MongoHQ?
:

MongoDB is an open source which is highly performance, scalable, schema-free and document-oriemted databse which is written in C++ programming language. It is been design for problem without heavy transactional requirements which is not easily solved by traditional RDBMS, which includes problems which require databases to span many servers. In MongoDB shines the exact records, arrays and other object which can be stored inside of the record. We can avoid expensive joins and other complex issues by using deeply nesting data inside of a record (Github, 2010). In the relation of MongoHQ and MongoDB, the MongoHQ is hosting platform for MongoDB and uses the MongoDB as the backend of the services. MongoHQ is the cloudbase hosting solution for theMongoDB database provided by the common thread (Github, 2010).


MongoDB features are included below;

1. Document-oriented storage

2. Full index support

3. Replication and high availability

4. Auto sharing

5. Querying

6. Fast in-place update

7. Map or Reduce

8. GridFS

9. Commercial support

Reference

Github.(2010).Mongomapper. Retrieved May 19, 2010 from http://wiki.github.com/jnunemaker/mongomapper/


b. What is Mongomapper?
:

MongoMapper is a ruby wrapper library which helps to makes MongoDB much easier and friendly. According to Github, the main function of mongomapper is to stick closely with the familier syntax of ActiveRecord (2010). With MongoMapper we can retrieve a record with the embedded document attached to it, the embedded document information is retrieved along with it which is mongomapper shines. There are two key concepts while working with Mongomapper. Where Document is known as records with the fields and the Embedded Document is similar to Document, but it is injected into a document and still retains all of the information contains (Github, 2010).


Reference

Github.(2010).Mongomapper. Retrieved May 19, 2010 from http://wiki.github.com/jnunemaker/mongomapper/

c. What is the relation between MongoDB and Mysql?
:

The relation between MongoDB and MySQL are mention below in tabular form:

Table 1(MongoDB, 2010). MongDB and MySQL relationship


MongoDB

MySQL

Data Model

Document-Oriented (BSON)

Relational

Data Types

String, int, double, Boolean, date, bytearray, object, array, others

Link

Large Object

Yes (GridFS)

Blobs

Replication

Master-Slave

Master-Slave

Object(row) Storage

Collection Based

Table Based

Query Method

Dynamic; Object-Based Query Language

Dynamic: SQL

Secondary Indexes

YES

YES

Atomicity

Single Document

Yes- Advanced

Interface

Native Drivers

Native Drivers

Server-Side batch data manipulation

Map.Reduce, server-side javascript

Yes (SQL)

Written in

C++

C

Concurrency Control

Update in Place

----

Reference

MongoDB.(2010). MongoDB,CouchDb,MySQL Compare Grid. Retrieved from http://www.mongodb.org/display/DOCS/MongoDB,+CouchDB,+MySQL+Compare+Grid