Database core scripts