'Open an existing database and load its content into memory'

def open(self):

    _in = open(self.name, 'rb')
    self.fields = pickle.load(_in)
    self.next_id = pickle.load(_in)
    self.records = pickle.load(_in)
    self.indices = pickle.load(_in)
    for f in self.indices.keys():
        setattr(self, ('_' + f), Index(self, f))
    _in.close()
    self.mode = 'open'
    return self
