script_with_database.sh for No.3 and No.4. Without Testing