Rewrote SQL queries to use prepared statements and clarified general style
Check if database dump exists before restoring it
Using default_platform again for NetBeans