Blocks implementation in database