Corrupt in SQL server database can happen due to several reasons like virus attack, power failure, hardware issue and many more. When a SQL server data file (.mdf) is corrupt then DBAs can try several methods to repair the mdf file and recover data from it.
1. Run DBCC CHECKDB: It finds & reports all the error message in errorlog. Try to analyze & understand the error message logged in the errorlog. Re-run the command with the recommended minimum repair option to repaired the errors.
2. Restore from backup: If above command fails to fix the error message the try to restore the database from clean backup.
3. 3rd party tool: Try 3rd party SQL server database recovery program to recover data from corrupt mdf file. http://www.mssqldatabaserecovery.com/