script for database table