What Is The Difference Between A Relation And A Function
Olivia Luz
The main difference between a relation and a function is that a relation is a table in a relational database while a function is a set of statements to perform a specific task in a program.
The difference between relation and function is relation shows relationship between input and output whereas function derives one output for each input. The user can design multiple tables or relations in a single database. Since relation 1 has only one y value for each x value this relation is a function. Just as with members of your own family some members of the family of pairing relationships are better behaved than other.
The difference between a relation and a function is that a relationship can have many outputs for a single input but a function has a single input for a single output. Relations are used so those model concepts are formed. Functions are a special type of relations. Function is based on relations with specific properties.
On the other hand relation 2 has two distinct y values a and c for the same x value of 5. Learn more differences with examples at byju s book free class. Relation is based on the cartesian product of two sets. As we just saw the difference between a relation that is a function and a relation that is not a function is that a relation that is a function has inputs relating to one and only one output.
RELATED ARTICLE :
- what does it mean when a grey dove visits you
- what does it mean when a cat rubs on you
- what does it mean when a guy calls you mama
This is the basic factor to differentiate between relation and function.
Source : pinterest.com