public void Check()
        {
            int count = source.insertCount;

            if (count > 0)
            {
                int[] inserts = source.insertList;
                for (int i = 0; i < count; i++)
                {
                    if (!target.contains_1_2(inserts[i]))
                    {
                        throw ForeignKeyViolation(inserts[i]);
                    }
                }
            }
            target.CheckDeletes(this);
        }
        public void Check()
        {
            // Checking that every new entry satisfies the foreign key
            int count = source.insertCount;

            if (count > 0)
            {
                int[] inserts = source.insertList;
                for (int i = 0; i < count; i++)
                {
                    if (!target.Contains12(inserts[2 * i], inserts[2 * i + 1]))
                    {
                        throw ForeignKeyViolation(inserts[2 * i], inserts[2 * i + 1]);
                    }
                }
            }

            // Checking that no entries were invalidated by a deletion on the target table
            target.CheckDeletes(this);
        }