No Sql Db Introduction

mybwu_com發表於2014-03-28

Summary :



1.Developers are working with new data types :
structured, semi-structured, unstructured and polymorphic data and massive volumes of it.


2.Now small teams work in agile sprints, iterating quickly and pushing code every week or two, even every day.


3.easy to apply agility interating , that is , code and test,before db design ,we have to start coding for key scenarios and do interating.


4.better scalable and performance
5.auto share ,work well in distribute deploy scenarios .


Go in details



Data Storage .



RMDB store row & column


For No Sql DB


document model : a structure like JSON .

Example :


{
FirstName: "Jonathan",
Address: "15 Wanamassa Point Road",
Children: [
{Name: "Michael", Age: 10},
{Name: "Jennifer", Age: 8},
{Name: "Samantha", Age: 5},
{Name: "Elena", Age: 2}
]
}



product: MongoDB and CouchDB


graph model : store data in a graph structure.



Graph databases are useful in cases where relationships are core to the application, like social networks.


note(properties)->relation(do)->note(properties)


relation is just like FK in RMDB , that used to find another record , but defferent is in Graph model , no cross join happen , get better performance , can directly find the node .


Product: Neo4j and HyperGraphDB.


Key-value model :



Every item in the database is stored as an attribute name, or key,
together with its value. The value, however, is entirely opaque to the system; data can only be queried by the key. This model can be useful for representing polymorphic and unstructured data, as the database does not enforce a set schema across key-value pairs.


Product: Riak and Redis (Key-Value)


Query Model .



Document Model db :

it is important to have the ability to query based on several different values in each record. For instance, an application that stores data
about customers may need to look up not only specific customers, but also specific companies, or customers by a certain deal size, or aggregations of customer types by zipcode or state.


In MongoDB, provide a rich set of indexing options to optimize a wide variety of queries, including compound indexes, sparse indexes, time to live (TTL) indexes,unique indexes, text indexes, geospatial indexes and
others.

Graph db :


These systems tend to provide rich query models where simple and complex relationships can be interrogated to make direct and indirect inferences about the data in the system. Relationship-type analysis
tends to be very efficient in these systems, whereas other types of analysis may be less optimal.


Key-Value db:


These systems provide the ability to retrieve and
update data based only on a primary key

data consistency .


NoSQL systems typically maintain multiple copies of the data for availability and scalability purposes. In these architectures, there different guarantees regarding the consistency of the data across copies.
NoSQL systems tend to be consistent or eventually consistent.

Resource


MongoDB Enterprise Download : mongodb.com/download

相關文章