db design, rest api