SIZ Approved Course||IT-Tech Course||Lecture 4||How to create Relationships in Microsoft Access||20%payout to @siz-official

in Steem Infinity Zone3 years ago (edited)

Hello my dear Siz Steemians Family

How are all of you.I hope You all are happy and well with the Grace of ALLAH Almighty . I'm very glade to be a part of such an amazing SIZ platform where we will show our skills and learn more with productive manner.You all people are so nice and very skilled.
Today I'm teach you about How to create Relationships in Microsoft Access.

Slide1.JPG

JvFFVmatwWHRfvmtd53nmEJ94xpKydwmbSC5H5svBACH7yn3hQvH3tWtRnETjjmgQt8nEwZ4nXDWLQjMqVMSwTqH6zPpX3tKBFp4heNDKyfVqegDtGoD4MsVsWFwzsQcMSXEk95E6r.jpg

Definition of Relationship in Microsoft Access

Relationship in Microsoft Access helps to combine data from Two different types of tables.Every relationship has fields in two tables with their related data.As you have studentID field in Students detail table and Students record table.Each record in the students detail table has a corresponding to the record in the students record table. Before you are start working on relationship you should to understand complete concept behind it.
  • A relationship consist of parent and child 🚸 tables.
  • The child table indentify the parent table by having a field like filed in the parent table.
  • The child table is also referred as foreign key 🗝️ .
  • The parents table is included the primary key

JvFFVmatwWHRfvmtd53nmEJ94xpKydwmbSC5H5svBACH7yn3hQvH3tWtRnETjjmgQt8nEwZ4nXDWLQjMqVMSwTqH6zPpX3tKBFp4heNDKyfVqegDtGoD4MsVsWFwzsQcMSXEk95E6r.jpg

Types of Relationship


Relationship is use in database to linking 🔗 data in one table with data in other table.
We can relate tables are one of three different ways.

  • One-to-One
  • One-to-Many
  • Many -to-Many
  • One to One relationship

    In One to One relationship each record in one table has one Record related to another table .

    One to Many relationship

    A one to Many relationship is also called as Master detail or refered as parent child 🚸 relationship.In a One to Many relationship a record in a table X can have many records in table y but a record in table Y has only one related record in table X.

    Many to many relationship

    In Many to many relationship a record in table X may have more than one record in table Y and a record in table Y may have more than one record in table X. Define Relationship In Microsoft Access We can define relationship by adding the table we can associate with relationship of tables,then dragging the key 🗝️ field of one table and dropping it to the key 🗝️ in another table

    JvFFVmatwWHRfvmtd53nmEJ94xpKydwmbSC5H5svBACH7yn3hQvH3tWtRnETjjmgQt8nEwZ4nXDWLQjMqVMSwTqH6zPpX3tKBFp4heNDKyfVqegDtGoD4MsVsWFwzsQcMSXEk95E6r.jpg

    Step_1


    create Two table as Parent and Child Table

    First of all we are creating Two tables name as Students Detail:table and Students Marksheet:table For creating relationship in table we are adding one common field Studentidin both tables we should use a descriptive Name of our fields so that the field will be uniquely identify in our table according to data that we want to store in database.

    Parent table

    A relationship consist of parent and child 🚸 tables.we are created table Students Detail:table as parent table that have a primary key field Studentid.The parents table is included the primary key 🗝️.

    1.PNG

    Child Table

    The child table Students Marksheet:table indentify the parent table by having a field Studentid like field in the parent table.the child table is also referred as foreign key 🗝️ .

    2.PNG
    Any data that you want to ener into foreign key field must be match a value from the parents primary key 🗝️ field

    JvFFVmatwWHRfvmtd53nmEJ94xpKydwmbSC5H5svBACH7yn3hQvH3tWtRnETjjmgQt8nEwZ4nXDWLQjMqVMSwTqH6zPpX3tKBFp4heNDKyfVqegDtGoD4MsVsWFwzsQcMSXEk95E6r.jpg

    step_2


    Create Query

  • Then we creating a query for adding Total field .
  • 3.PNG

    • we will include all the fields in which we want to apply operation.
    • Then we select the subjects fields and + Operator to calculate Total Marks values.

    quesry.PNG

  • Then we save the query and Run the query simply clicking on query name.
  • Run.PNG

    JvFFVmatwWHRfvmtd53nmEJ94xpKydwmbSC5H5svBACH7yn3hQvH3tWtRnETjjmgQt8nEwZ4nXDWLQjMqVMSwTqH6zPpX3tKBFp4heNDKyfVqegDtGoD4MsVsWFwzsQcMSXEk95E6r.jpg

    Step_3

      Creating Relationship between Parent and Child Tables

    • For creating Relationship click on DataBase Tool , in the Relationships group, click on Relationships button.
    • In the Build tab, in the Relationship group, click Insert Tables .

    re1.PNG

  • Select one or more tables or questions and click Add. After you have finished adding the tables and queries to the relationship document tab, click Close.
  • c.PNG

    • The drag the field from one table to the child table field (foreign key) in another table. For drag multiple fields, press the CTRL key, click each field, and then drag them.
    • The Edit Relationship dialog box appears.

    sas.PNG

    • Make sure the field names shown are normal relationship fields. If the field name is incorrect, click the field name and select the appropriate field from the list.
    • select the Enforce Referential Integrity check box
    • Then Click on Create

    ctre.PNG

  • The relationship is created between both tables
  • rr.PNG

    JvFFVmatwWHRfvmtd53nmEJ94xpKydwmbSC5H5svBACH7yn3hQvH3tWtRnETjjmgQt8nEwZ4nXDWLQjMqVMSwTqH6zPpX3tKBFp4heNDKyfVqegDtGoD4MsVsWFwzsQcMSXEk95E6r.jpg

    I would like to Special thanks to

    Sir @cryptokraze

    @siz-official

    and other staff of Steemit infinity zone who provide us such an amazing and interesting platform where we show our skills and our experience .

    sa.png

    Regards @salmashraf

    Sort:  
     3 years ago 

    Interesting tutorial, thank you so much for sharing this with us

     3 years ago 

    Thanks u so much dear Shama

     3 years ago 

    Very nice tutorial full of information and easy way

     3 years ago 

    Thanks u dear

    Perfect Tutorial dear keep it up

     3 years ago 

    Thank you very much for sharing your quality content in detail on the SIZ Community. -We gave 40% support to this post from the siz official account. Congratulations ! Keep producing content in the SIZ Community . :)

    You can delegate your SP to @siz-official and take benefit of our Delegation Rewards Offer of receiving up to 200% Curation Rewards

    You can check our Steem Investment Plan and Receive 5% Profit Monthly

     3 years ago (edited)

    Very informative tutorial and a very explanatory presentation. You lecture style is very simple and good. Keep posting such a ful content. Waiting for you new tutorials that will be like a computer class for us.
    @vvarishay
    #sizcomments
    https://steemit.com/hive-181430/@siz-official/siz-commenting-contest-round-3-let-s-encourage-others-by-apreciating-their-work

    your post is very attractive and very informative.thanks u for sharing such a nice information with us .

    thanks u so much for sharing such an amazing and nice information with us

    Coin Marketplace

    STEEM 0.18
    TRX 0.16
    JST 0.030
    BTC 68363.69
    ETH 2642.16
    USDT 1.00
    SBD 2.69