Completed database definition and stored procedures