DC/DM is an IAS Officer, either a Regular Recruit from UPSC/LBSNAA Training or Promoted from State Administrative Services.
SP is an IPS Officer, either a Regular Recruit from UPSC/LBSNAA & SVNPA Training or Promoted from State Police Services.
SP is usually the highest police officer of a City/District (Exceptions for Larger cities and Metros, where you have a Senior SP SSP or CP). DM is the Most important government official of a District.
DM is perhaps the main person looking after the District, which includes subjects like Law and Order, Railways Administration, Public Administration, Economy & Industries, Finance and everything else.The SP leads the District Police team and assists the DM in maintaining Law and Order in District.