Changed database layout