What is SQL, and how is it used in database management?