Updating child records ado

For example, an online retailer might need to let each user store her shipping and billing addresses, payment information, delivery preferences, and contact phone number.

Furthermore, each order in the system is associated with a particular user account. So how do we track the user information needed by the application and have it integrate with the Membership framework?

(Alternatively, you can launch this dialog box by going to the Table Designer menu and choosing Relationships.) Click the Add button in the lower left corner of the Foreign Key Relationships dialog box.

This will add a new foreign key constraint, although we still need to define the tables that participate in the relationship.

The presence of this constraint ensures relational integrity between the two tables by guaranteeing that there will never be a guestbook entry referring to a non-existent user account.

By default, a foreign key constraint will disallow a parent record to be deleted if there are corresponding child records.

In other words, we can setup this foreign key constraint so that a user's guestbook entries are automatically deleted when her user account is deleted.

To accomplish this, expand the "INSERT And UPDATE Specification" section and set the "Delete Rule" property to Cascade.

Each user account in the Membership framework contains only the properties needed for validating credentials and performing essential user account-related tasks.If provided, the user's home town, homepage, and signature will appear on each message he has left in the guestbook.In order to capture the guestbook comments, we need to create a database table named .There are number of different ways to accomplish this: table for each user account.This type of relationship is referred to as one-to-one.

Leave a Reply