To Repair MDF database file of the SharePoint Server, I recommend using a professional tool. In this regard, I suggest using SharePoint Database Recovery Tool. Users can restore SharePoint Server data such as views, tables, programmability, rules, and functions. Also, It provides two recovery modes i.e. Standard and Advanced. These recovery modes are used as per the level of corruption. To know more about the software and its performance, download its trial version for free.