An empty store, and something to put in it

LevelDataStudio » Use cases » Create a LevelDB database

Download LevelDataStudio Free Trial »     Buy LevelDataStudio Now »

The situation

There is no database yet. A library is being tested against LevelDB, an application needs a populated store before it will start, or a development environment should look like production without containing production data.

Creating the store usually means writing a small program that opens a path with the LevelDB API and writes a few keys - which is a fine thing to do once and an annoying thing to do on every machine that needs it.

What you do

  1. Choose create and point the tool at a folder. If the folder is not a database yet, an empty LevelDB is created there.
  2. Add the entries the store needs - a key at a time from the editor, or many at once by importing a JSON, CSV or XML file.
  3. Check the result in the tree view, then close the tool so the application can take the lock and open the store.

Opening or creating a LevelDB database in Level Data Studio

For a team, the useful artefact is the file rather than the store: keep the seed data as CSV or JSON in the repository, and each machine creates its own LevelDB from it in one import. That also keeps the seed data reviewable, which a binary store never is.

What it will not do

Related

The mode itself: open / create LevelDB. Filling it in bulk: load keys from files, or a key at a time: edit a key. Reading it back: look inside the database, export the keys.