Relationships and Cardinality

In real world, entities have relationships with other entities.  Relationships define how two entities are associated with each other. The data modeling captures the nature of relationship between two entities. For example, the entity 'Customer' buys the 'Product' and the entity 'Vendor' sells the 'Product'. It captures the rules between these two entities. If two entities are Person and Telephone Number, the relationship may capture the rule "Each Person may have many Telephone Numbers" and "Each Telephone Number must belongs to one Person." 
Data rules are instructions on how data relate to one another.  There are two types of data rules, Cardinality Rules and Referential Integerity (RI) data rules.

Cardinality rules define the quantity of each entity instances that can participate in a relationship. For example: 
  • Each Person can have one or many Phone Numbers.
  • Each User ID must belongs to one User.
  • Each Bus can contain many Seats.
Referential Integrity (RI) rules focus on ensuring valid values. For example:
  • A Customer cannot exist without a valid Email Address.
  • An Order cannot exist without a valid Product.
  • A Shipment cannot exist without a valid Postal Address
Action Rules are instructions on what to do when data fields contain certain values. For example:
  • New Users can download at most 5 Articles a year for free.
In data models, we can represents the data and enforce data rules (Quantity and Valid relationships), but we cannot enforce action rules on a data model. A online magazine data model can capture User Status such as New User or Existing User, as well as the number of Articles each User reading downloading each year, but cannot enforce that a New User download no more than 5 Articles.


Relationship Cardinality


As we already discussed cardinality defines the quantity of each entity instances that can participate in a relationship. Cardinality represented by symbols that appears on both end of the relationship line. Cardinality used to specify data rules and to enforce it. The domain values to choose from to represent cardinality on relationship is limited to three values: zero, one or many. In data modeling, the small line means "one". The circle means "zero" or "optional". The triangle with a line through the middle means "Many", this symbol also known as a crow's foot. Relationship lines are labeled to clarify the relationship and express the rule that the relationship represents.



Recursion:


A recursive relationship is a rule that exist between instance Relationships and Cardinalities of the same entity. A one-to-many recursive relationship describes a hierarchy, whereas a many-to-many relationship describes a network.



Sub-typing:


Sub-typing groups the common data fields and relationships of entities, while retaining what is unique within each entity. The sub-typing relationships implies that all of properties from the super-type are inherited by the subtype.




This post gives you an idea about relationships and cardinalities in data modeling. Next post let us discuss about the keys in data modeling.

9 comments:


  1. My name is Kimberly Nicholas from Sydney,I never believed in love spells or magic until i met this spell caster once when i went to Africa in February this year on a business summit. I meant a man who’s name is (Great Matatan powerful Spell ), he is really powerful and could help cast spells to bring back one’s gone, lost, misbehaving lover and magic money spell or spell for a good job or luck spell .I’m now happy & a living testimony cos the man i had wanted to marry left me 3 weeks before our wedding and my life was upside down cos our relationship has been on for 4 years. I really loved him, but his mother was against us and he had no good paying job. So when i met this spell caster, i told him what happened and explained the situation of things to him. At first i was undecided, skeptical and doubtful, but i just gave it a try. And in 7 days when i returned to Sydney, my boyfriend (now husband) called me by himself and came to me apologizing that everything had been settled with his mom and family and he got a new job interview so we should get married. I didn’t believe it cos the spell caster only asked for my name and my boyfriends name and all i wanted him to do. Well we are happily married now and we are expecting our little kid, and my husband also got the new job and our lives became much better. His email is:(  matatanspell@yahoo.com .  )  

    ReplyDelete
    Replies
    1. LOVE SPELL CASTER (DR. GBOJIE) THAT HELPED ME RESTORE MY RELATIONSHIP 
       I was absolutely desperate to get my husband back. Life without my husband was a real mess for me and my children. i wanted a dramatic change and I thought love spell could be the solution. After discussing the resolution with Him, he gave me hope that he will restore my marriage. I felt confident that he will actually make my husband to return home and he did! It’s fantastic what this great spell caster has done for me, his help is priceless! I don’t know what I would have done without his help, He does his job so well he is organized and highly functional, i believe he is the best service to use i can count on when it comes to restoring relationship, I was floored that his worked was perfect, if you need help, ️ ️ ️ ️ ️ ️ ️ ️ gbojiespiritualtemple@gmail.com or whatsapp :  +2349066410185 check out his website :http://gbojiespiritualtemple.website2.me    

      Delete
    2. THE PERFECT LOVE SPELL CASTER TO CONTACT FOR YOUR BROKEN MARRIAGE/LOTTERY SPELL AND GET IT SOLVE FAST EMAIL DOCTOR0LOVESPELL@GMAIL.COM  
      I have something to share with you!!! There is a great joy in my heart which I want to share with everyone. My name is victoria joe. I had a misunderstanding with my lover a few years ago; which led to us to break up and he never wanted to hear my voice again. He saw a beautiful love more prettier than myself, but as time went on I met Doctor Love0. He is a great spell caster (medicine man ). I contacted him through his email: (doctor0lovespell@gmail. com) and explained everything to him. He said that I shouldn't worry, that my lover will come back to me on his knees begging for forgiveness. I bought  some items that he told me to buy for the preparation of the spell. After everything was prepared he told me that my lover will come to me after 24hours begging. My greatest joy now is that he actually came back to me and fell on his knees begging for forgiveness, and today we are happy. Do you have any problem with your loved one? Do not know what to do? Well worry no more because Doctor Love0 can provide you with a spell to get him or her back. With the help of a spell just as he helped me. Contact Doctor Love0 today via  FB page: https://www.facebook.com/Lovespellthatworkfastusa  or visit his website:  https://doctor0lovespell.wixsite.com/lovespell  also check his blogs: https://doctorlovespell0.blogspot.com/

      Delete
  2. Very interesting blog. A lot of blogs I see these days don't really provide anything that I'm interested in, but I'm most definitely interested in this one. Just thought that I would post and let you know how to make him miss you and commit

    ReplyDelete
  3. Hello, this weekend is good for me, since this time i am reading this enormous informative article here at my home. Relationships

    ReplyDelete
  4. LOVE SPELL CASTER (DR. GBOJIE) THAT HELPED ME RESTORE MY RELATIONSHIP 
     I was absolutely desperate to get my husband back. Life without my husband was a real mess for me and my children. i wanted a dramatic change and I thought love spell could be the solution. After discussing the resolution with Him, he gave me hope that he will restore my marriage. I felt confident that he will actually make my husband to return home and he did! It’s fantastic what this great spell caster has done for me, his help is priceless! I don’t know what I would have done without his help, He does his job so well he is organized and highly functional, i believe he is the best service to use i can count on when it comes to restoring relationship, I was floored that his worked was perfect, if you need help, ️ ️ ️ ️ ️ ️ ️ ️ gbojiespiritualtemple@gmail.com or whatsapp :  +2349066410185 check out his website :http://gbojiespiritualtemple.website2.me    

    ReplyDelete
  5. After being in relationship with my wife for years, she broke up with me. I did everything within my reach to bring her back but all was in vain, I wanted her back so badly because of the love I had for her, I begged her with everything, I made promises but she refused. I explained my problem to my friend and he suggested that I should rather contact a spell caster that could help me cast a spell to bring her back , I had no choice than to try it. I messaged the spell caster, and he assured me there was no problem and that everything will be okay before three days. He cast the spell and surprisingly on the second day, my wife called me. I was so surprised, I answered the call and all she said was that she was so sorry for everything that had happened she wanted me to return to her. She also said she loved me so much. I was so happy and went to her that was how we started living together happily again. The spell casters email is :dr.okisinsolutiontemple@gmail.com , or whatsapp/call_ +2348109374702 You can email him if you need his assistance in your relationship or any Other Case.1) Love Spells......2 Divorce Spells.....3 Marriage Spells......4 Binding Spell....5 Breakup Spell......6 Death spell.......7 win a court case spellContact this great man if you are having any problem for a lasting solutionthrough his whatsapp number +2348109374702 

    ReplyDelete
  6. hello every one . i`m calux~verin  I recently saw a testimony about a spell caster of some sort in a blog I visit for relationship and dating counseling problems because i had been having serious issues with my boyfeind and we had been dating for six months,he just suddenly he changed,he was not returning my calls,he started cheating,he was hurting me in so many ways. i never thought coming back was  possible. and I just thought I should try it maybe out of desperation of some sort ..and I contact him  and  I heard read and heard lots of stories of spell casters and i never really believed in magic..I played along with a little hope and faith and I was sent some few stuffs after everything and it worked like a miracle,everything went to a while new direction,I guess it was all good faith that made me read That particular post that faithful day..I hope they could help other people too like they did a little and I got everything I wanted. and if wished for my husband,my family and my life back their address on his email STIPHENSPELLCASTER@GMAIL.COM  Call him or add him on whatsapp via: +2348146900171. thanks again stiphen i hope u see this post im greatful . 

    ReplyDelete
  7. THE PERFECT LOVE SPELL CASTER TO CONTACT FOR YOUR BROKEN MARRIAGE/LOTTERY SPELL AND GET IT SOLVE FAST EMAIL DOCTOR0LOVESPELL@GMAIL.COM  
    I have something to share with you!!! There is a great joy in my heart which I want to share with everyone. My name is victoria joe. I had a misunderstanding with my lover a few years ago; which led to us to break up and he never wanted to hear my voice again. He saw a beautiful love more prettier than myself, but as time went on I met Doctor Love0. He is a great spell caster (medicine man ). I contacted him through his email: (doctor0lovespell@gmail. com) and explained everything to him. He said that I shouldn't worry, that my lover will come back to me on his knees begging for forgiveness. I bought  some items that he told me to buy for the preparation of the spell. After everything was prepared he told me that my lover will come to me after 24hours begging. My greatest joy now is that he actually came back to me and fell on his knees begging for forgiveness, and today we are happy. Do you have any problem with your loved one? Do not know what to do? Well worry no more because Doctor Love0 can provide you with a spell to get him or her back. With the help of a spell just as he helped me. Contact Doctor Love0 today via  FB page: https://www.facebook.com/Lovespellthatworkfastusa  or visit his website:  https://doctor0lovespell.wixsite.com/lovespell  also check his blogs: https://doctorlovespell0.blogspot.com/

    ReplyDelete