* moved FlatDatabase to its own module
+ added file read and write to FlatDatabase