Comparison with storing data using NoSQL(CouchDB) and a relational database.

284 views
220 views

Published on

This presentation is intended to show those familiar with relational databases how a NoSQL database can make their jobs easier with loosely structured data.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
284
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • Please adjust confidentiality notice accordingly
  • Comparison with storing data using NoSQL(CouchDB) and a relational database.

    1. 1. NoSQL IntroductionA demonstration in parallel with SQL data models.Eric RossDate: 06/03/2012
    2. 2. What is JSON?From: http://json.org
    3. 3. {"glossary": {"title": "example glossary","GlossDiv": {"title": "S","GlossList": {"GlossEntry": {"ID": "SGML","SortAs": "SGML","GlossTerm": "Standard Generalized Markup Language","Acronym": "SGML","Abbrev": "ISO 8879:1986","GlossDef": {"para": "A meta-markup language, used to create markup languages such as DocBook.","GlossSeeAlso": ["GML", "XML"]},"GlossSee": "markup"}}}}}From: http://json.org/example.html
    4. 4. Example Test Result Record{"_id": "e3bc8454-6910-4c2a-b69b-dbf52046d3a0", unique record key"customdata": { custom metadata"deviceIP": "localhost?usesocketlog=pudStart.log","stopTime": "May 05,2013 13:34:45","logName": "durationLog-2013-05-23-13-34-45-localhost?usesocketlog=pudStart.log.txt","startTime": "May 05,2013 13:34:45","firmwareRelease": "BWP1CN1314AR","runTime": 0.004220008850097656,"serialNumber": "CN2AM9J08V","MechMode": true,"printerModel": ”XN1254"},"recs": [ 1 or more records – format is custom.{"filesProcessed": 1,"fileName": "circle.ps","timePerFile": 7.2447731494903564,"pagesPrinted": 1,"totalPages": 1,"pagesPerMinute": 8.281832814077937,"result_id": "e3bc8454-6910-4c2a-b69b-dbf52046d3a0"},],"passfail": "PASS","name": "performance","timestamp": "1368052433", standard fields"app": "Duration","type": "result","appversion": "1.0"}
    5. 5. Test Result Record{"_id": "e3bc8454-6910-4c2a-b69b-dbf52046d3a0", unique record key"customdata": { custom metadata"deviceIP": "localhost?usesocketlog=pudStart.log","stopTime": "May 05,2013 13:34:45","logName": "durationLog-2013-05-23-13-34-45-localhost?usesocketlog=pudStart.log.txt","startTime": "May 05,2013 13:34:45","firmwareRelease": "BWP1CN1314AR","runTime": 0.004220008850097656,"serialNumber": "CN2AM9J08V","MechMode": true,"printerModel": ”XN1254"},"recs": [ 1 or more records – format is custom.{"filesProcessed": 1,"fileName": "circle.ps","timePerFile": 7.2447731494903564,"pagesPrinted": 1,"totalPages": 1,"pagesPerMinute": 8.281832814077937,"result_id": "e3bc8454-6910-4c2a-b69b-dbf52046d3a0"},],"passfail": "PASS","name": "performance","timestamp": "1368052433", standard fields"app": "Duration","type": "result","appversion": "1.0"}
    6. 6. Test Result Record{"_id": "e3bc8454-6910-4c2a-b69b-dbf52046d3a0", unique record key"customdata": { custom metadata"deviceIP": "localhost?usesocketlog=pudStart.log","stopTime": "May 05,2013 13:34:45","logName": "durationLog-2013-05-23-13-34-45-localhost?usesocketlog=pudStart.log.txt","startTime": "May 05,2013 13:34:45","firmwareRelease": "BWP1CN1314AR","runTime": 0.004220008850097656,"serialNumber": "CN2AM9J08V","MechMode": true,"printerModel": ”XN1254"},"recs": [ 1 or more records – format is custom.{"filesProcessed": 1,"fileName": "circle.ps","timePerFile": 7.2447731494903564,"pagesPrinted": 1,"totalPages": 1,"pagesPerMinute": 8.281832814077937,"result_id": "e3bc8454-6910-4c2a-b69b-dbf52046d3a0"},],"passfail": "PASS","name": "performance","timestamp": "1368052433", standard fields"app": "Duration","type": "result","appversion": "1.0"}
    7. 7. Relational (SQL) model.
    8. 8. NoSQL ModelWhat? Is that all?
    9. 9. NoSQL/CouchDB characteristics• Just a collection of JSON documents.• Views are defined using JavaScript (Python possible, not fully qualified).• A database can contain all types of documents.• How you decide to “type” your documents is totally up to you.• No data reformatting/schema changing required.• REST API. Available to any tool that can do http requests (including yourbrowser using Javascript/AJAX).• Libraries available for all major scripting languages.
    10. 10. Why couchDB?• Replication allows deployment where needed. Very simple and easy to deploy• REST/HTTP is accessible through all HP internal firewalls and can be exposedto external entities on a case by case basis.• REST/HTTP is accessible by ALL programming languages including commandline utils like cUrl.• Fully open source(Apache License).• Simpler features mean simpler admin tasks.• Binaries available for Mac and Windows for development purposes and localdata caching.• MAJOR FEATURE: You can attach ANY document to a couchdb JSONdocument. This allows the attachment of things such as serial logs and coredump files.
    11. 11. Popular NoSQL document stores• MongoDB: Very popular commercial database. Proprietary clients and API.Support for most programming languages. “Big Data” features.• CouchDB: Opensource (Apache). REST API. Client libraries available.Supports replication but no advanced features such as sharding.• Couchbase: Both opensource community edition and commercial edition. Usescustom API with supplied client libraries.• Redis: not really a document store. Key/value store for “Big Data”.http://nosql-database.org/
    12. 12. World Wide Deployment(idealized)regional acquisitionclustersremote analysisresults aggregationremote analysisremote analysisregional acquisitionclusters regional acquisitionclusters

    ×