Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Relational model
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Logical interpretation == The relational model is a [[formal system]]. A relation's attributes define a set of [[logic]]al [[propositions]]. Each proposition can be expressed as a tuple. The body of a relation is a subset of these tuples, representing which propositions are true. Constraints represent additional propositions which must also be true. [[Relational algebra]] is a set of logical rules that can [[Validity (logic)|validly]] [[inference|infer]] conclusions from these propositions.<ref name="professionals"/>{{rp|95β101}} The definition of a ''tuple'' allows for a unique empty tuple with no values, corresponding to the [[empty set]] of attributes. If a relation has a degree of 0 (i.e. its heading contains no attributes), it may have either a cardinality of 0 (a body containing no tuples) or a cardinality of 1 (a body containing the single empty tuple). These relations represent [[Boolean domain|Boolean]] [[truth values]]. The relation with degree 0 and cardinality 0 is ''False'', while the relation with degree 0 and cardinality 1 is ''True''.<ref name="professionals"/>{{rp|221β223}} === Example === If a relation of Employees contains the attributes ''{Name, ID}'', then the tuple ''{Alice, 1}'' represents the proposition: "There exists an employee named ''Alice'' with ID ''1''". This proposition may be true or false. If this tuple exists in the relation's body, the proposition is true (there is such an employee). If this tuple is not in the relation's body, the proposition is false (there is no such employee).<ref name="professionals"/>{{rp|96β97}} Furthermore, if ''{ID}'' is a key, then a relation containing the tuples ''{Alice, 1}'' and ''{Bob, 1}'' would represent the following [[contradiction]]: # There exists an employee with the name ''Alice'' and the ID ''1''. # There exists an employee with the name ''Bob'' and the ID ''1''. # There do not exist multiple employees with the same ID. Under the [[principle of explosion]], this contradiction would allow the system to prove that any arbitrary proposition is true. The database must enforce the key constraint to prevent this.<ref name="professionals"/>{{rp|104}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)