I have a situation where i have a chatbot which can support multiple languages . To store this relationship in sql I have created Bot and language mapping table which if bot have 3 languages will create 3 rows in mapping table in mysql. I also have another column called is_primary
in this mapping table which tells whether this is the bot's primary language. Here i want to ensure that the bot always have atleast and atmost one primary langauge. Is there a way to put constraint in combination of rows to ensure this.
Thanks