PlayDB is a straightforward NoSQL JSON document database, similar to MongoDB, created to help developers understand how databases work.
PlayDB Features
- PlayDB users can utilize in disk or in-memory database
- Import Json file into table
- Export table into Json file
- Runs on all operating Systems.
- Play Scripting language enables uses to execute play commands in one file
Installation Instructions
- Download PlayDB project
- Go into PlayDB/PlayDB folder
- Type the following command to run program "java -jar playDB.jar"
Play Commands
read(<condition>,<table>)- output data from table that matches condition in tabular format
Example: read(age>23 && name=="bob",table)
read(<condition>,<table>,[value1,value2,value2]) - output records that match condition in table and the values in the list of the record.
Example: read(age>23 && name=="bob",table,[age,name,occupation,department])
insert(<json>,table) - Inserts Json data into table
Example: insert({name:"Stacy",age:26,occupation:"accountant"},employee)
output <table>- outputs all records in table in json format
Example: output table
replace(<condition>,<json>,<table>) - replaces records in table with json statement that matches condition
Example:replace(occupation=="programmer" && name=="kevin",{name:"Kevin",age:23,occupation:"dreamer"},employee)
remove(<condition>,<table>) - removes records in table with json statement that matches condition
Example:remove(name=="Bom" && occupation=="sales",employee)
list <tables> || <databases> - list can commands lists tables or database disks
Example: list tables | list databases
connect to <database> - connects to database disk
Example: connect to disk1.db
create database <database> - creates disk database
Example: create database disk.db
Import note always put *.db at the end of the database name!!!!!!!!
<json file> > table - imports json file to table
Example: data.json > table
<table> > <json file> - exports table to json
Example table > data.json
<table> > <json file> - exports table to json
Example table > data.json
read(<condition>,<table>) > table - copies read statement to table
Example read(age>23,table) > copyTable
read(<condition>,<table>) > data.json - exports read statment to json file
Example read(age>23,table) > data.json
Java 1.7 or higher
Code Design: