Pages

One to One relationship - Relationship one to one - One to One relationship in Access

One to One relationship - Relationship one to one - One to One relationship in Access

 Relationship:-

Is a kind of “attribute” which connect two or more than two tables is called “Relationship”.
We have three kind of Relationship which are given below.
1) One to One
2) One to Many
3) Many to Many

One to One relationship:-

Number First we will work on One to One relationship that how we can make “Relationship” between One to One table and we will work on “Employee database” by the example of “One to One table”. With the help of one to one relationship we can divide a long table by two tables. To make a “relationship” between two tables follow these steps which are given below.
1) Start Microsoft Access 2007
2) Click on "Blank database" then give a name "Employee" and lastly click on "Create" button as given below.

 
 3) Click on "Create" Menu and then click on "Table Design" command. As you will click on "Table Design" command after that fills your information after that take "Primary key" of ID. To take the "Primary key" of ID right Click on "ID" and then choose "Primary key" you can also get "primary key" from "Design" Menu which is given below.

     
Notes: What is different between Text and Memo in data type column?
Text: - Text is a field of “data type” which contains up to 255 characters in a cell or the length set by “field size” property and “Memo” is also a field of “data type” which contains up 63,999 character. Its mean that whenever a sentence or paragraph which can write more than 255 character than we use “Memo” like information.
4) Click on “View” command and then choose “Datasheet view” from “Design” or “Home” as given below.



5) Then click “yes” and type a name for example “Employee” and lastly click “OK”.
6) Close the table from “close” button or click “Ctrl+W” from keyboard
7) Again click on “Create” menu and then click on “table design”. Now fill the information in another table which is given below.

    

8) Again click on “View” command and choose “Datasheet View” from “Design” or from “Home” menu. After click on “Datasheet view” click “yes” and “type a name” for example “Employee 2” then click “OK” and lastly choose no primary key.
9) Also close it from “close” button or click “Ctrl+W” from keyboard.
10) Now go to “Database Tools” menu and click on “Relationships” command as given below.



11) As you will click on “Relationships” command choose both of table by the help of “Ctrl” button and then click “Add” as given below.


12) After click on “Add” button then click “Close”.
13) Now drag the first “ID” which has “Primary key” to another “ID” as given below.


14) After dragging of “ID” the three options will appear. Checkup the first one and then click on “Create” button as given below.


15) Now press “Ctrl+S” from keyboard to save it and then close the display of Relationship with the help of “Close” button or click “Ctrl+W” from keyboard.
16) Now Open the first table “Employee” with double clicks or right clicks on it and then chooses “open”. As you will open your “Employee” table fills it by your own information as given below.


17) Now as you will fill your information a “plus sign” will appear at the 1st cell of ID as given below.



18) Click on “plus” sign and then fill your information.
            How to insert CV file?
            Right click on the first cell of CV and then click on “Insert object” as given below.

   
19) As you will click on “Insert object” a menu will display click on “Create from file” option and then click on “Browse” button now select your CV file then click OK and lastly also click OK.
Now like this also insert your Picture in picture column and fill your other information as given below.

        
This was our tutorial about One to One relationship in database and I hope you like this tutorial    

0 comments:

Post a Comment