6.10
Consider a many-to-one relationship \(R\) between entity sets \(A\) and \(B\). Suppose the relation created from \(R\) is combined with the relation created from \(A\). In SQL, attributes participating in a foreign key constraint can be null. Explain how a constraint on total participation of \(A\) in \(R\) can be enforced using NOT NULL constriant in SQL.
The foreign-key attribute in \(R\) corresponding to the primary key of \(B\) should be made NOT NULL. This ensures that no tuple of \(A\) which is not related to any entry in \(B\) under \(R\) can come in \(R\). For example, say a is a tuple in \(A\) which has no corresponding entry in \(R\). This means when \(R\) is combined with \(A\), it would have a foreign-key attribute corresponding to \(B\) as NULL, which is not allowed.