How to use SQLite with C# to deal with cardinality?
Edouard Durand
1
Reputation point
Hello,
I have a Teacher table and a Pupils table.
A teacher can have 5 to 30 students and a student can have only one teacher. With SQLite, how can I check this cardinality with an SQL query?
For example, how do you prevent a user from adding more than 30 students to the Teacher table or from assigning multiple teachers to a student?
Thank you for your help.
Sign in to answer