Added a name field and sql constraints.