Adding db_connect code for use or reference.