Hour 4

Quiz Answers

1: If a relationship is created between two tables, what values are permitted in the foreign key column?
A1: The foreign key column may only contain values from the primary key column of the parent table. In other words, if the CustomerID column of a customer table and order table are the primary and foreign key respectively, the CustomerID column of the order table may only contain values from the CustomerID column of the customer table.
2: What happens if I attempt to delete a record from a parent table with dependent rows in a child table?
A2: This depends entirely on your data source. In most cases, you will get an error message telling you not to delete a parent object without first deleting its children. Microsoft SQL Server ...

Get Sams Teach Yourself ADO.NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.