Good luck to all of you 🙂. Also I made these notes over night so there might be some issues…
Part I: Structured Data
Entities and Relationships
ER model - only a description. Graphical notation only.
We start with a rectangle. Attributes go to circle.
Superkey = A set of attributes is a superkey for an entity if those attributes, taken together, always uniquely identify every entity instance. Might have attributes that are not needed for identification.
Key = A set of attributes is a key if it is a minimal set of identifying attributes — removing any one attribute would make it no longer uniquely identifying.
Super key = for any instance always unique
Key = minimal set of identifying each entity
Candidate Key = we might have more options which keys to use - candidate represents this choice
Primary key = a candidate key we actually choose.
Key is a set of attributes. Key made of more than one attribute is called composite key.
We underline all the keys used to compose the primary key