The disclosure relates to the forming mineralized coatings on metal surfaces and to methods of forming such coatings. Further, a light-emitting device or lighting device with a high manufacturing yield is provided. At least one constraint on the data warehousing scheme is input into the optimization engine.