Duplicate db code from chapter 5.
Export functions.
Import functions.
Data generation.