Save database structure