Heat olive oil in a large saucepan over medium heat; add onion and cook, stirring, for 3 to 4 minutes or until softened. Add the garlic, mustard seeds and chilli flakes; cook, stirring for 1 minute or until fragrant.
Bring a large saucepan of water to the boil. Cut a shallow cross in the base of each tomato. Blanch tomatoes in boiling water for 1 minute, then transfer tomatoes to a large bowl of iced water for 1 minute; drain. Peel tomatoes, remove core and chop coarsely; stir chopped tomatoes into the pan and stir to mix.
Stir in sugar and vinegar and mix well until sugar dissolves. Bring mixture to the boil, then reduce heat to low and simmer, uncovered, stirring occasionally, for 15 to 20 minutes or until relish is thickened. Spoon hot relish into sterilised jars and seal. Set jars aside for 2 hours to cool; store in the refrigerator.