script for database