Completed MySQL implementation of Surfer model