complete chap4 database part