Created all sql methods.