Re: Need a referential constraint to a non-unique record

2019-06-27 Thread Adrian Klaver
On 6/26/19 7:28 AM, David Gauthier wrote: Ccing list. Actually, I'm not storing 4 records in the 'grades' table for each record in the 'students' table.  For example, if student Joe gets straight A's, he points to grades.grade_id = 1.  If student Sue also gets straight A's, she points to grade

Re: Need a referential constraint to a non-unique record

2019-06-25 Thread Adrian Klaver
On 6/25/19 2:58 PM, David Gauthier wrote: I need to create a constraint on a column of a table such that it's value is found in another table but may not be unique in that other table.  Example... Let's say the DB is about students and the grades they got for 4 subjects... Math, English, Scie

Re: Need a referential constraint to a non-unique record

2019-06-25 Thread David G. Johnston
On Tue, Jun 25, 2019 at 2:58 PM David Gauthier wrote: > I need to create a constraint on a column of a table such that it's value > is found in another table but may not be unique in that other table. > Example... > This requires a trigger > > Let's say the DB is about students and the grades t

Need a referential constraint to a non-unique record

2019-06-25 Thread David Gauthier
I need to create a constraint on a column of a table such that it's value is found in another table but may not be unique in that other table. Example... Let's say the DB is about students and the grades they got for 4 subjects... Math, English, Science, History. But instead of creating 4 records