The rest of these notes are going to look messed up. Yeah, sorry but if you want the full version, you can find the OneNote package here. The notes being posted here are just to help search through the notebook without having to download it first.


- A DB has
1) A Structure
§ We can use "the relational notation" to describe Entity / Relationship Sets
§ Syntax: name of E/R Set (list of attributes)
§ EX:
□ STUDENT (SIDNO, SNAME, MAJOR)
□ ENROLLMENT (SIDNO, CNO, SEMESTER, YEAR, GRADE)

2) DB Semantics include information about:
a) E Sets
b) R Sets
c) Degree of each R Set
d) Mapping constraints of each R Set
e) Attributes for each E and R set
f) Domain sets for every attribute
g) Candidate keys for each E/R set
h) Data dependencies in each E/R set

- Mathematically, an E set (also a R set) is a subset of the Cartesian product of N domain sets corresponding to the attributes of the E/R set
○ EX:
§ Student [SSN X PEOPLE_NAMES X MAJORS
{<100, Tom, CSA>, <100, Jill, CSA>, <200, Jill, MTH> … }
§ X = "product of"
§ < … > = "sets of constructs"

○ Sets:
§ Explicit representation:
□ {a,b,c } = {c,b,a}
□ {a, b, a} = {a,b}
□ Every element is distinct and order is not important

§ If order is important, use the theory of relations
- ordered pair
® a and b are coordinates
®

◊ <100, Tom, CSA> ≠
- ordered triple
- ordered quadruple
□ …

- ordered n-tuple

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google