Browse Source

for reference

git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@10547 ddd99763-3ecb-0310-9145-efcb8ce7c51f
tags/bxinterval-last
Jim Paris 12 years ago
parent
commit
d0435cbf91
1 changed files with 28 additions and 0 deletions
  1. +28
    -0
      database.md

+ 28
- 0
database.md View File

@@ -0,0 +1,28 @@
- Metadata database shouldn't be pytables, because that limits us by threading issues.

- For now, keep things single threaded, but let's not tie to pytables.

- Use sqlite3 for database. SQLAlchemy ORM seems reasonable.

- Database tables:

streams:
id (primary key num)
description (str)
path (str)
layout (str) -- match nilmdb.layout names
Other info -- like
- Database is the canonical location for looking stuff up. For
example, don't use WalkNodes in pytables for anything.

- Need to store data somewhere -- pytables seems fine for now.
- Each row identified with a timestamp
- Pytables row number acts as a pointer
- In the future, switch to a binary format and use file offsets as the data pointer.
- Not a hard transition.
- Store database in pytables too? But it would be nice to avoid pytables to get threading.

Loading…
Cancel
Save