Dice the onion and the pancetta and put them in a casserole or fry pan together with the olive oil. Sauté them for a minute then add the tomatoes and the salt. Cook for about 30 minutes over a low flame. Add the marjoram or oregano. Serve this sauce over the spaghetti, which should be cooked 'al dente' in the meantime. Garnish with the Pecorino cheese.