perrymant / databasic

A simple database project, for learning purposes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DataBasic

Requirements for database project

  1. Data is stored using JSON objects.
  2. The database schema is of type: Document oriented database (flat-file hierarchy).
  3. The user should be able to insert a JSON object.
  4. When a JSON object is inserted, it should generate an auto-ID value.
  5. The datatypes to include in the database: strings, character, integers, float, complex, arrays, hashes, null, booleans.
  6. A CLI will be used as UI.
  7. The general syntax of instruction at the CLI will be: databasic insert <filepath (JSON file)>
  8. The command <> should return statistics on the whole database.
  9. A databasic query can be made using the auto-Id or a JsonPath.
  10. Return children of parent, or if value then value from a key.
  11. There is no need for returns to be sorted.
  12. Databasic should preserve datatype on return.

Objects in application:

  1. Main
    1. main(String[])
  2. Inserter
    1. Id insert(File)
  3. AutoIdGenerator
    1. Id generate()
  4. Querier
    1. String findString(Id, JsonPath)
    2. Character findCharacter(Id, JsonPath)
    3. Integer findInteger(Id, JsonPath)
    4. Float findFloat(Id, JsonPath)
    5. ComplexNumber findComplexNumber(Id, JsonPath)
    6. List<?> findList(Id, JsonPath)
    7. Map<String, ?> findMap(Id, JsonPath)
    8. Boolean findBoolean(Id, JsonPath)
  5. Stats
    1. void generateStats()
  6. CLI
    1. void stats()
    2. void query(Id, JsonPath)
    3. void insert(String)
  7. Formatter
    1. string formatQuery(Object)
    2. string formatInsert(Id)
  8. Id
  9. JsonPath

About

A simple database project, for learning purposes

License:MIT License


Languages

Language:Java 100.0%