revised db models