Both of these airplanes evolved from the original DC-9 dating back to 1965. Douglas first released the DC-9-10, then followed on over the years with the subsequent series 20, 30, 40, and 50. Then came the DC-9-80 series, better known as the MD-80 family. There are five models there too, the MD-81, 82, 83, 87, and 88. The MD-80s were stretched DC-9s with updated avionics. The MD-90 was a further update of the MD-80 family (and the first without P&W JT8D powerplants); Doug is the resident expert on 80/90 differences since he's flown both!
The B717 was originally developed by McDonnell-Douglas as the MD-95, and was basically the DC-9-30 airframe with a serious upgrade. The flight deck is glass and similar in layout to the MD-11, several systems were updated, and new powerplants (BMW-Rolls Royce BR715s) were added. When Boeing bought out MD, they decided to keep the MD-95 program and renamed it the Boeing 717.
As to aloft's comment about pay, airline pay rates are typically based on the number of seats on an aircraft (more seats means more money generally) and since the MD-90 seats 20-30 more people than the B717 it would have an attendant higher pay rate, assuming there was an airline that operated both aircraft. (I know of no such company.)