Hour 4

for RuBoard

Quiz Answers


If a relationship is created between two tables, what values are permitted in the foreign key column?


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.


What happens if I attempt to delete a record from a parent table with dependent rows in a child table?


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 2000 supports "cascading deletes." When active, SQL Server will automatically delete the child rows for you.

for RuBoard

Sams Teach Yourself ADO. NET in 24 Hours
Sams Teach Yourself ADO.NET in 24 Hours
ISBN: 0672323834
EAN: 2147483647
Year: 2002
Pages: 237

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net