creating database structure