r/databases • • Feb 16 '16

Schema vs. table

Can you please explain the difference between the two? Example of each would be greatly helpful as well. Thanks!

2 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/renavarr Feb 19 '16

Actually the relational model is based on the discrete mathematics definition of relation. A relation between two sets is a collection of ordered pairs containing one object from each set. If the object x is from the first set and the object y is from the second set, then the objects are said to be related if the ordered pair (x,y) is in the relation. That's a binary relation. A n-ary relation is the subset of the Cartesian producto on n domains or sets.