mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-27 14:54:05 -06:00
vault backup: 2022-10-24 22:30:59
This commit is contained in:
parent
1869f32362
commit
7d5f070ce4
@ -19,5 +19,12 @@ Attibute types:
|
||||
Relationship: when one entity refers to another
|
||||
Relationship type: a set of relationships with the same entity types
|
||||
- relationships can have attributes
|
||||
- relationships haveL
|
||||
- relationships have:
|
||||
- degree (bi/n-ary)
|
||||
- cardinality (1:1, 1:N N:M)
|
||||
- participation constraints (total (marked by double line) or partial)
|
||||
|
||||
Weak entities
|
||||
- no key attributes
|
||||
- requires total participation constraint on identifying relationship to its identifying entity type
|
||||
- partial key used in combination with identifying entity
|
||||
|
||||
@ -13,6 +13,23 @@ Database: integrated collection of data
|
||||
[ER Diagram](notes/ER-Diagram)
|
||||
[Schemas](notes/Schemas)
|
||||
|
||||
# Relational Model
|
||||
Two parts
|
||||
- Relation Schema
|
||||
- Domain
|
||||
|
||||
Constraints
|
||||
- Domain: each value must an atomic value in the domain e.g., integer, string, date, etc
|
||||
- Key and NULL:
|
||||
- Superkey: uniquely ids a tuple e.g., set of all attrs
|
||||
- Key: minimal superkey
|
||||
- Candidate key: a possible key
|
||||
- Primary key: the chosen candidate key: cannot have NULL values
|
||||
- Ref Integrity: Foreign key
|
||||
- Functional Dependencies
|
||||
- fd: when one value determines another e.g., sid -> sname, {sid, cid} -> grade
|
||||
- armstrong axioms:
|
||||
|
||||
# Normal Forms
|
||||
[Normal Forms](notes/Normal-Forms)
|
||||
# SQL
|
||||
|
||||
Loading…
Reference in New Issue
Block a user