1 / 11

JasDB NoSQL Database

JasDB NoSQL Database. CSC8711 Project – Spring 2013 Huy To Dinesh Agarwal Krisna Chaitanya Tatikonda. JasD B. Obera Software: - Founder: Renze De Vries , principal Java developer - www.oberasoftware.com JasDB : Just a simple database NoSQL document store: JSON

lorant
Download Presentation

JasDB NoSQL Database

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JasDBNoSQL Database CSC8711 Project – Spring 2013 Huy To Dinesh Agarwal KrisnaChaitanyaTatikonda

  2. JasDB • Obera Software: - Founder: Renze De Vries, principal Java developer - www.oberasoftware.com • JasDB: Just a simple database • NoSQL document store: JSON • Written in Java

  3. JasDB Concepts • Instance: collection of bags - schema/database • Bags: stored inside an instance - table • Simple Entity/Entity: data structure inside a bag - record

  4. JasDB installation • Download and Unpack zip file : http://www.oberasoftware.com/downloads/ • Configure: jasdb.xml <instance id="default" path="/home/jasdb/data”> • Start Jasdb - window: start.bat - linux/Mac: start.sh • http://localhost:7050/Bags • Stop Jasdb - window: stop.bat - linux/Mac: start.sh

  5. JasDB Usage – REST API • Remote: REST API - Create Bag: POST "http://localhost:7050/Bags" -d '{"instanceId":"default","name":”user"}’ - Create Entity: POST "http://localhost:7050/Bags(user)/Entities " -d ‘{“field1”:”data1”,”field2”:”data2”}’ - Retrieve Entity: And GET http://localhost:7050/Bags(user)/Entities(field1=data1,field2=data2) Or GET http://localhost:7050/Bags(user)/Entities(field1=data1|field2=data2)

  6. JasDB Usage – Java API • Initialize local database session DBSessionsession = newLocalDBSession(); session.createOrGetBag(”user"); • Initialize remote REST client session DBSessionsession = newRestDBSession("default", "localhost", 7050); session.createOrGetBag(”user"); • Retrieve bag: EntityBag bag = session.getBag(”user"); • Remove bag: session.removeBag(“user”); • Insert entity: EntityBagbag= session.getBag(“user”); SimpleEntity entity = newSimpleEntity(); entity.addProperty(”useid", ”kto2"); entity.addProperty(”pass", ”kto2"); bag.addEntity(entity);

  7. JasDBUsage – Java API (cont..) • Query entity: QueryExecutor executor = bag.find(QueryBuilder.createBuilder()); QueryResult result = executor.execute(); -id: bag.getEntity("056f8058-e1f7-4f8e-a2f8-332e62c15961"); - value:bag.find( QueryBuilder.createBuilder() .field(”userid").value(”kto2”)); - limitquery: executor.limit(5); - pagination: executor.page(5,10) //getfrom 5, next 10 - OR: bag.find(QueryBuilder.createBuilder().field(”name”).value(”name1”). or(QueryBuilder.createBuilder().field(”name”).value(”name2”))); - AND: bag.find(QueryBuilder.createBuilder().field(”name”).value(”name”). field(”userid”).value(”test”))); - Range: bag.find(QueryBuilder.createBuilder().field(”age”.greateThan(10). field(”age”).smallerThan(30).sortBy(”country”)); • Index: - bag.ensureIndex(newIndexField("keywords", newStringKeyType(50)), false);

  8. JasDBvs RDBMS • Simple, easy deployment and maintenance • No user management/authentication • Programmer friendly - no sql, application logic • Fits very well for volatile data – no schema • Lack of relationship between bags • Performance and scalability

  9. JasDBor RDBMS • Application and data relationship • Data: structure, relationship between entities, integrity, size • Statistic or report at data level • User management • Tools support • Cost

  10. Summary • JasDB is new, lack of tools and documentation • Need enhancements to be use in enterprise application. • Works great but doesn’t fit all • Hybrid solution: JasDB + RDBMS

  11. Demo – Q & A

More Related