+ All Categories

Content

Date post: 11-Jan-2016
Category:
Upload: vea
View: 28 times
Download: 0 times
Share this document with a friend
Description:
NoSQL Databases Oracle - Berkeley DB Rasanjalee DM Smriti J CSC 8711 Instructor: Dr. Raj Sunderraman. Content. A brief intro to NoSQL About Berkeley Db About our application. ???. 3. What is NoSQL?. Stands for N ot O nly SQL Class of non-relational data storage systems - PowerPoint PPT Presentation
Popular Tags:
40
Oracle - Berkeley DB Rasanjalee DM Smriti J CSC 8711 Instructor: Dr. Raj Sunderraman
Transcript
Page 1: Content

NoSQL Databases

Oracle - Berkeley DB

Rasanjalee DMSmriti J

CSC 8711Instructor: Dr. Raj Sunderraman

Page 2: Content

Content

A brief intro to NoSQL

About Berkeley Db

About our application

Page 3: Content

3

???

Page 4: Content

What is NoSQL?

• Stands for Not Only SQL

• Class of non-relational data storage systems

• Usually do not require a fixed table schema nor do they use the concept of joins, group by, order by and so on.

• All NoSQL offerings relax one or more of the ACID properties.

Page 5: Content

What is NoSQL ?

• Next generation databases

• Characteristic:

– Large Data Volumes

– Non-relational

– Distributed

– Open-source

– Scalable replication and distribution

Page 6: Content

CAP Theorem

Page 7: Content

8

History of NoSQL

• The term NoSQL was introduced by Carl Strozzi in 1998 to name his file based database.

• It was again re-introduced by Eric Evans when an event was organized to discuss open source distributed databases.

Page 8: Content

Why NoSQL Databases ?

• Bigness

• Massive write performance

• Fast key-value access

• Flexible schema and Flexible data types

• No single point of failure

• Programming ease of use

Page 9: Content
Page 10: Content
Page 11: Content

12

Scaling to size vs complexity.

Page 12: Content
Page 13: Content
Page 14: Content

Berkeley DB - Introduction

• An open-source, embedded transactional data management system.

• A key/value store.

• Runs on everything from cell phone to large servers.

• Distributed as a library that can be linked directly into an application.

• Berkeley DB has high reliability and high performance.

Page 15: Content

Berkeley DB Product Family Architecture

Page 16: Content

Berkeley DB: The Design Philosophy

• Provide mechanisms without specifying policies.

• For example, Berkeley DB is abstracted as a store of <key, value> pairs.

– Both keys and values are opaque byte-strings.

– Berkeley DB has no schema.

– Application that embeds Berkeley DB is responsible for imposing its own schema on the data.

Page 17: Content

Data Access Services

• Indexing methods

– B-Tree

– Hash

– Queue

– A record-number-based index

Page 18: Content

Advantages of <key, value> pairs

• An application is free to store data in whatever form is most natural to it.

– Objects (like structures in C language)

– Rows in Oracle, SQL Server

– Columns in C-store

• Different data formats can be stored in the same databases.

Page 19: Content

Data Management Services

Concurrency

Transactions

Recovery

Page 20: Content

Berkeley DB Applications

• Local Directory Access Protocol

• Mail Servers

• Manage access control lists

• Store user keys in a public-infrastructure

• Record machine-to-network address mappings in address servers

Page 21: Content
Page 22: Content
Page 23: Content
Page 24: Content

Berkeley DB for Computationally Intensive

Algorithms• Algorithms that repeatedly execute a

computationally intensive operation– E.g. Factorial

• Useful to create a cache containing the already computed results– Cache = Set of <key,value> pairs containing <n,

factorial(n)>

• Advantages:– avoid to re-compute results for the same input (even

over different executions) – In a process crash, we can still start again the process

and quickly go back to the point where it stopped

Page 25: Content

• In memory map• Simple• Very efficient (b/s in completely memory)• Need considerable amount of memory• No fault tolerance (We need to manually save data to a file)• Relation Databases• ACID properties may not be necessary• Cannot handle Big data • Slow• NoSQL databases (Berkeley DB)• Fast key-value access• Flexible schema and Flexible data types• Ease of use• Fault tolerance

Page 26: Content

Berkeleydb.java

Page 27: Content

• Open Environment:• EnvironmentConfig class specify environment configuration parameters

• Open Class Catalog: • Class catalog : specialized database store that contain

java class descriptions of all serialized objects stored in the database

• Create Database and StoredClassCatalog object

Page 28: Content
Page 29: Content

• Open Database:

• Close Environment, Class Catalog and Databases:

Page 30: Content

DBViews.java

Page 31: Content

Factorial.java

Page 32: Content
Page 33: Content
Page 34: Content
Page 35: Content
Page 36: Content

Factorial (Berkeley DB ) – Memory Usage

Page 37: Content

Factorial (MySQL) – Memory Usage

Page 38: Content

Factorial (HashMap) – Memory Usage

Page 39: Content

41

References

• http://www.slideshare.net/thobe/nosql-for-dummies

• http://www.slideshare.net/gregburd/oracle-berkeley-db-java-edition-simple-java-object-persistence

• Berkeley DB, Michael A. Olson, Keith Bostic, and Margo Seltzer, USENIX Technical Conference

• http://highscalability.com/blog/2010/12/6/what-the-heck-are-you-actually-using-nosql-for.html

Page 40: Content

Recommended