PERSON(ID: INTEGER, AGE: AGE_INTEGER, NAME: STRING)
R1 |
|
R2 |
|
||||||||||||||||
R1 ∪ R2 |
|
R1 − R2 |
|
R1 |
|
R2 |
|
||||||||||||||
R1 ∩ R2 |
|
R1 |
|
R2 |
|
||||||||||||||
R1[Color] | R1[Color, Style] | ||||||||||||||||
|
|
R1 |
|
R2 |
|
||||||||||||||
R1[(Color = white) ∨ (Color = cyan)] | (R1[Color = yellow])[Style] | ||||||||||||||||
|
|
R1 |
|
R2 |
|
|||||||||||||||||||||||||
ϴ Join – R1[Color1 = Color2]R2 | ||||||||||||||||||||||||||||
|
person-meeting
).CONTACTS(ID_CONTACT, ID_PERSON, ID_CONTACT_TYPE, CONTACT)
FOREIGN KEY (id_contact_type) REFERENCES contact_type(id_contact_type)
FOREIGN KEY (id_person) REFERENCES person(id_person)
person
and contact_type
."
).a-z
, 0-9
, _
),id_person
),item
represent?product
be better?id
).
prsn_fn
mean?person_name
in the table persons
;id_person
)..
convention:
schema.table.column
,my_project.persons.id_person
[ ]
– an optional part.{ }
– a set of elements.|
– an exclusive selection.[ LEFT | RIGHT ] JOIN
represents:
LEFT JOIN
RIGHT JOIN
JOIN
a { = | < | > } b
represents:
a = b
a < b
a > b
CREATE {SCHEMA | TABLE | COLUMN | INDEX }
ALTER {SCHEMA | TABLE | COLUMN | INDEX }
DROP {SCHEMA | TABLE | COLUMN | INDEX }
INSERT
, SELECT
, UPDATE
, DELETE
SELECT
command returns results in a table,SELECT
querySELECT
query.SELECT
query) does not have to be a relation!.
used for in SQL?