Computer Science Era

Advertisement
Showing posts with label primary and foreign key relationship. Show all posts
Showing posts with label primary and foreign key relationship. Show all posts

Thursday, 27 February 2014

1st step: Make new Database Diagram

new-database-diagram

2nd step: Add required tables in diagram

add-tables

3rd step: Click on the Primary key Icon

click-primary-key

4th step: The relationship Icon is visible now


5th step: Press the Left Key of Mouse/Touch pad on the relationship Icon and drag towards the other table drop at the field which you want to use as foreign key

drag-from-relationship-icon-drop-at-key-which-is-used-as-foreign-key

6th step: Tables and Columns Relationship window is visible, now click OK button

press-ok

7th step: Click on the Insert and Update Specification

insert-and-update

8th step: Change the Delete Rule to Cascade from No Action if and only if you want to delete foreign key record if primary key record is deleted

cascade-of-delete-rule

9th step: Change the Update Rule to Cascade from No Action if and only if you want to update foreign key row if primary key row is updated

cascade-of-update-rule

10th step: Press OK button

press-OK


11th step: A connection is visible between two tables and save the diagram to effects on the tables by pressing CTRL+S

save-relationship