When I say "database" it"s a standard database without noone option.
IDK why you want to edit the favorites.ini file, just press the favorite button using mGalaxy and the game will be add directly in the fovorite list.
But if you want complicated thing, you can use specials applications to make special database.
Are you sure the favorite option is the thing you need ? Do you want to display all the roms you have or not, if you don't want to display some roms, do you want to use them, if not, simply delete them or move them in another folder.