Skip to main content

Posts

Three Database Revolutions

Recent posts

How MongoDB survives From SQL or Query Injection

As We know SQL injection  is one of the most famous way people try to hack the SQL based applications.I came to know about interesting thing how  MongoDB  survives from this SQL injection while reading the mongodb docs. For SQL based applications most of the drivers support accessing SQL data using query as String which makes the access vulnerable. For Example in Java we use to get the data from SQL as follows, String query = "SELECT ZipCode,State FROM zipcodes WHERE City = '+city+' AND State = '+state+'"; connection = DriverManager.getConnection(jdbcurl, username, password); Statement stmt = connection.createStatement(); ResultSet rs = stmt.executeQuery(query); In case of MongoDB there is no vulnerability because all the drivers creates a BSON object for the given Query instead of calling the DB as a string itself. For MongoDb in Java QueryBuilder is used to build Queries for accesing MongoDb Data, DBObject query = QueryBu

Comparison of Popular NoSql databases (MongoDb,CouchDb,Hbase,Neo4j,Cassandra)

There are many SQL databases so far.But i personally feel the 15 years history of SQL coming to an end as everyone is moving to an era of BigData . As experts say SQL databases are not a best fit for Big Data No Sql databases came into picture as a best fit for this which provides more flexibility in storing data. I just want to compare few popular NoSql databases that are available at this point of time.Few well known NoSql databases are MongoDb Cassandra Hbase CouchDb Neo4j NoSql databases differ each other more than the way Sql databases differ from each other.I think its one's responsibility to choose the appropriate NoSql database for their application based on their use case.Lets do a quick comparison of these databases. MongoDb Written in  :  c++ Main point : Retains some friendly  properties of SQL (Query, Index) Licence : AGPL(Drivers : Apache) Protocol : BSON (Binary JSON) Replication : Master/Slave Replication  and automatic failover via Replica Se

GraphDatabase - The future for Facebook Recommendations

On what Basis are you getting Recommendations from Facebook??How your data is stored Internally in Social Network Sites ?? Have you ever thought how your information is stored by facebook in database?? Do you think its SQL that facebook is using for storing your data ?? If you think so ,then you are wrong.Its NoSQL GraphDatabase called 'Cassandra' what facebook uses to store your data.I know after reading this you will get lot of questions in your mind. 'What is Graph database??  How it looks like?? How it can be useful for Facebook Recommendations?? Where else it can be used??'.Let me explain each one in detail. What is Graph database?? I think Wikipedia gives the best answer for this question.So i think i can just add a link to wikipedia for the introduction of graphDatabase. Here you go..!! How it looks like?? I thing you got a basic idea about graph database after seeing Wikipedia page.Here i am showing sample example of a small Social Network of

Why Nooooo SQL .........???

                       Relational databases have been around for many decades and are the database technology of choice for most traditional data-intensive storage and retrieval applications. Retrievals are usually accomplished using SQL, a declarative query language. Relational database systems are generally efficient unless the data contains many relationships requiring joins of large tables. Recently there has been much interest in data stores that do not use SQL exclusively, the so called NoSQL movement. Examples are Google’s BigTable and Facebook’s Cassandra . Lets have a look at NoSQL  vs  MySQL (common relational database system).   When to go for  NOSQL ?? In recent years, software developers have been investigating storage alternatives to relational databases. NoSQL is a blanket term for some of those new systems. Cassandra,BigTable, CouchDB, Project Voldemort, and Dynamo are all NoSQL projects, as they are all high-volume data stores that actively reject the relatio