added some DB constraints