moved database design to appendix