Null (SQL): Difference between revisions

Content deleted Content added
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.8.2) (BrownHairedGirl - 8935
mNo edit summary
Line 281:
|content={{nothing}}
{{(!}} class="wikitable" style="display: inline-table !important"
{{!}}+ ''Emp''
{{!-}}
! Name !! Age
Line 292:
{{!)}}
{{(!}} class="wikitable" style="display: inline-table !important"
{{!}}+ ''EmpH22''
{{!-}}
! Name !! Age
Line 303:
{{!)}}
{{(!}} class="wikitable" style="display: inline-table !important"
{{!}}+ ''EmpH37''
{{!-}}
! Name !! Age
Line 315:
}}
 
A construct (such as a Codd table) is said to be a ''strong representation'' system (of missing information) if any answer to a query made on the construct can be particularized to obtain an answer for ''any'' corresponding query on the relations it represents, which are seen as [[Structure (mathematical logic)|models]] of the construct. More precisely, if {{mvar|q}} is a query formula in the [[relational algebra]] (of "pure" relations) and if {{mvar|{{overline|q}}}} is its lifting to a construct intended to represent missing information, a strong representation has the property that for any query ''q'' and (table) construct ''T'', {{mvar|{{overline|q}}}} lifts ''all'' the answers to the construct, i.e.:
: <math>\mathop{\mathrm{Models}}(\bar{q}(T)) = \{ q(R)\,| R \in \mathop{\mathrm{Models}}(T) \}</math>
 
Line 324:
</syntaxhighlight>
 
should include the possibility that a relation like EmpH22 may exist. However, Codd tables cannot represent the disjunction "result with possibly 0 or 1 rows". A device, mostly of theoretical interest, called [[conditional table]] (or c-table) can however represent such an answer:
 
{| class="wikitable"
|+ ''Result''
|-
! Name !! Age !! condition