Adding database

Adding a database and the check for a code.