Rebuild database classes