db structure

- added db structure
- the foreign key constraints are set to default i.e. RISTRICT (which
can be annoying but SAFE)

and the committing begins...

BADMAN!