Tuesday, July 20, 2010

Introduction to NoSQL | Mongo DB



Introduction to NoSQL


A Brief History of NoSQL


I came across this brief history from a blog

NoSQL was in fact first used by Carlo Strozzi in 1998 as the name of the file-based database he was developing. Ironically it’s a relational database just one without a SQL interface. The term re-surfaced in 2009 when Eric Evans used it to name the current surge in non-relational databases. 

## the 1960s

MultiValue (aka PICK) databases are developed at TRW in 1965.
According to a comment from Scott Jones M[umps] is developed at Mass General Hospital in 1966. It is a programming language that incorporates a hierarchical database with B+ tree storage.
IBM IMS, a hierarchical database, is developed with Rockwell and Caterpillar for the Apollo space program in 1966.

## the 1970s

  • InterSystems develops the ISM product family succeeded by the Open M product, all M[umps] implementations. See comment from Scott Jones below.
  • M[umps] is approved as an ANSI standard language in 1977.
  • in 1979 Ken Thompson creates DBM which is released by AT&T. At its core, it is a file-based hash.

## the 1980’s

Several successors to DBM spring into life.
  • TDBM supporting atomic transactions
  • NDBM was the Berkeley version of DBM supporting having multiple databases open at the same time.
  • SDBM - another clone of DBM mainly for licensing reasons.
  • GT.M is the first version of a key-value store with a focus on high-performance transaction processing. It is open-sourced in 2000.
  • BerkeleyDB is created at Berkeley in the transition from 4.3BSD to 4.4BSD. Sleepycat software is started as a company in 1996 when Netscape needed new features for BerkeleyDB. Later acquired by Oracle which still sells and maintains BerkeleyDB.
  • Lotus Notes or rather the server part, Lotus Domino, which really is a document database has it’s initial release in 1989, now sold by IBM. It has evolved a lot from the early versions and is now a full office and collaboration suite.

## the 1990’s

  • GDBM is the Gnu project clone of DBM
  • Mnesia is developed by Ericsson as a soft real-time database to be used in telecom. It is relational in nature but does not use SQL as query language but rather Erlang itself.
  • InterSystems Caché launched in 1997 and is a hybrid so-called post-relational database. It has object interfaces, SQL, PICK/MultiValue, and direct manipulation of data structures. It is an M[umps] implementation. See Scott Jones comment below for more on the history of InterSystems
  • Metakit is started in 1997 and is probably the first document-oriented database. Supports smaller datasets than the ones in vogue nowadays.

##2000-2005

  • This is where the NoSQL train really picks up some momentum and a lot is starting to happen.
  • Graph database Neo4j is started in 2000.
  • db4o an object database for Java and .net is started in 2000
  • QDBM is a re-implementation of DBM with better performance by Mikio Hirabayashi.
  • Memcached is started in 2003 by Danga to power Livejournal. Memcached isn’t really a database since it’s memory-only but there is soon a version with file storage called memcachedb.
  • Infogrid graph database is started as closed source in 2005, open-sourced in 2008
  • CouchDB is started in 2005 and provides a document database inspired by Lotus Notes. The project moves to the Apache Foundation in 2008.
  • Google BigTable is started in 2004 and the research paper is released in 2006.

##2006-2010

  • JackRabbit is started in 2006 as an implementation of JSR 170 and 283.
  • Tokyo Cabinet is a successor to QDBM by (Mikio Hirabayashi) started in 2006
  • The research paper on Amazon Dynamo is released in 2007.
  • The document database MongoDB is started in 2007 as a part of an open-source cloud computing stack and first standalone release in 2009.
  • Facebooks open sources the Cassandra project in 2008
  • Project Voldemort is a replicated database with no single-point-of-failure. Started in 2008.
  • Dynomite is a Dynamo clone written in Erlang.
  • Terrastore is a scalable elastic document store started in 2009
  • Redis is a persistent key-value store that started in 2009
  • Riak Another dynamo-inspired database started in 2009.
  • HBase is a BigTable clone for the Hadoop project while Hypertable is another BigTable type database also from 2009.
  • Vertexdb another graph database is started in 2009
  • Eric Evans of Rackspace, a committer on the Cassandra project, introduces the term “NoSQL” often used in the sense of “Not Only SQL” to describe the surge of new projects and products.

-
Kinshuk Dutta
London

Mongo DB

Install Mongo DB on Mac

Prerequisites

Ensure your system meets each of the following prerequisites. You only need to perform each prerequisite step once on your system. If you have already performed the prerequisite steps as part of an earlier MongoDB installation using Homebrew, you can skip to the installation procedure.

Install Xcode Command-Line Tools

Homebrew requires the Xcode command-line tools from Apple’s Xcode.

  • Install the Xcode command-line tools by running the following command in your macOS Terminal:


    Xcode-select --install


    kinshukdutta@kinshuks-macbook-pro users % Xcode-select --install

    Xcode-select: error: command line tools are already installed, use "Software Update" to install updates

    kinshukdutta@kinshuks-macbook-pro use "Software Update" to install updates

Install Homebrew

macOS does not include the Homebrew brew package by default.

Tap the MongoDB Homebrew Tap

  • Run the following command in your macOS Terminal:


    brew tap mongodb/brew


    ==> Tapping mongodb/brew

    Cloning into '/usr/local/Homebrew/Library/Taps/mongodb/homebrew-brew'...

    remote: Enumerating objects: 130, done.

    remote: Counting objects: 100% (130/130), done.

    remote: Compressing objects: 100% (107/107), done.

    remote: Total 495 (delta 53), reused 57 (delta 23), pack-reused 365

    Receiving objects: 100% (495/495), 108.38 KiB | 0 bytes/s, done.

    Resolving deltas: 100% (222/222), done.

    Tapped 11 formulae (37 files, 175.6KB).


Installing MongoDB 4.4 Community Edition

Follow these steps to install MongoDB Community Edition using Homebrew’s brew package manager.

  1. Verify that your system meets all the installation prerequisites by running the following command in your macOS Terminal:


    brew tap | grep mongodb


    kinshukdutta@kinshuks-macbook-pro users % brew tap | grep mongodb

    mongodb/brew



    You should see the MongoDB brew tap listed. If you do not, or you receive an error, return to the Prerequisites section.



  2. To install MongoDB, run the following command in your macOS Terminal application:


    brew install mongodb-community@4.4


    Alternatively, you can specify a previous version of MongoDB if desired. You can also maintain multiple versions of MongoDB side by side in this manner.

Error:

Error

  homebrew-core is a shallow clone.

  homebrew-cask is a shallow clone.

To `brew update`, first run:

  git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow

  git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow

This restriction has been made on GitHub's request because updating shallow

clones is an extremely expensive operation due to the tree layout and traffic of

Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you

automatically to avoid repeatedly performing an expensive unshallow operation in

CI systems (which should instead be fixed to not use shallow clones). Sorry for

the inconvenience!

==> Installing mongodb-community from mongodb/brew

==> Downloading https://fastdl.mongodb.org/tools/db/mongodb-database-tools-macos-x86_64-100.2.1.zip

######################################################################## 100.0%

==> Downloading https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-4.4.1.tgz

######################################################################## 100.0%

==> Installing dependencies for mongodb/brew/mongodb-community: mongodb-database-tools

==> Installing mongodb/brew/mongodb-community dependency: mongodb-database-tools

Error: Your CLT does not support macOS 11.

It is either outdated or was modified.

Please update your CLT or delete it if no updates are available.

Update them from Software Update in System Preferences or run:

  softwareupdate --all --install --force


If that doesn't show you an update run:

  sudo rm -rf /Library/Developer/CommandLineTools

  sudo xcode-select --install


Alternatively, manually download them from:

  https://developer.apple.com/download/more/.


Error: An exception occurred within a child process:

  SystemExit: exit


kinshukdutta@kinshuks-macbook-pro ~ % git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow

remote: Enumerating objects: 272231, done.

remote: Counting objects: 100% (272214/272214), done.

remote: Compressing objects: 100% (123993/123993), done.

remote: Total 265436 (delta 142473), reused 261590 (delta 138654), pack-reused 0

Receiving objects: 100% (265436/265436), 62.89 MiB | 8.93 MiB/s, done.

Resolving deltas: 100% (142473/142473), completed with 3221 local objects.



-
Kinshuk Dutta
New York

Neo4J



No comments:

Post a Comment

Scala & Spark for Managing & Analyzing Big Data (Using Machine Learning)

Managing & Analyzing Big Data using Apache Scala & Apache Spark In this blog we will see how to use Scala and Spark to analyze Big D...