Skip to main content

what is binary relationship? explain with example - Computer science fundamentals tutorial


Cardinality/Binary relationship

Cardinality/Binary relationship defines the numerical attributes of the relationship between two entities or entity sets.
Types of Cardinality/ Binary relationship
Cardinality/ Binary relationship are four types. now discuss all types of Binary relation ship.
One to one relationship : -
When a single instance of an entity is associated with a single instance of another entity then it is called one to one relationship.
For example : - a person has only one passport and a passport is given to one person.






One to many relationship : -
When a single instance of an entity is associated with more than one instance of another entity then it is called one to many relationship.
For example: -
One customer can placed many orders but an order can’t be placed by many customers.



Many to One relationship: -
When more than one instance of an entity is associated with single instance of another entity then it is called many to one relationship.
For example: -
Many students can study in a single college but a student in many colleges at same time.





Many to many relationship: -
When more than one instance is associated with more than instance of another entity then it is called many to many relationship.
For example: -
More than one employee assigned to many project and many project can be assigned to many employee.






Comments

Popular posts from this blog

Solve-write C program to find biggest number from three number by using nested if statement

          C program to find biggest number from three number                                                by using                                                                 nested if statement Problem Description This program takes the 3 numbers and finds the biggest among all. Problem Solution 1. Take the three numbers as input. 2. Check the first number if it greater than other two. 3. Repeat the step 2 for other two numbers. 4. Print the number which is greater among all and exit. Program codes:- here the program of finding biggest of three number run this in your Linux, DEV C++,turbo c++ #include<stdio.h> main() { int num1,num2,num3,big;   ...

Minterm and maxterm in Digital logic design - Computer Science fundamentals tutorial

Minterm and Maxterm First thing to know before we proceed   towards   what is ‘minterm’ and ‘maxterm’ we have to know the sum of product and product of sum. Sum of product: - The logical sum of two or more logical product term is called sum of products expression. It is basically an OR operation of AND operated variables such as Y = AB+BC+ABC Product of Sum: - The logical product of two or more logical sum term is called product of sums expressions. It is basically an AND operation of OR operated variables such as Y = (A+B).(B+C).(A+B+C) Minterm: - Product term containing all the k variables of the functions is either complimented or uncomplimented form is Minterm. Canonical form of sum of product: - It is defined as the logical sum of all the minterms derived from the rows of a truth table for which value of the function is 1. It is called a minterm canonical form. The canonical sum of product expression can be given in a compact form by lis...

Important MCQ of RDBMS( Relational database management system)-FCST

Important MCQ of RDBMS  1. A RDBMS consists a collection of ? a. Tables b. Fields c. Records d. Keys  ANS/- a. table 2. The term attribute refers to a ___________ of a table a. Record b. Tuple c. Column d. Key   ans/- c. Column 3. In relational model, the row of table is known to be ?  a. Relation b. Entity field c. Tuple d. Attribute  ans/- C. Tuple 4. . Address field of a person should not be part of primary key, since it is likely to ? a. Dependent b. Too long c. Changed d. Not changed  ans/- c. Changed 5. The relational model is concerned with ? a. Data structure and Data integrity b. Data Manipulation c. Both a and b d. None of these  ans/- c. Both a and b 6. Which is the false statement from the following ? a. A veiw is a named derived table b. A name relation is variable c. A veiw is a named reation and is virtual d. None of these  ans/- d. None of these 7. The union of primary key...