diff options
| author | mo khan <mo.khan@gmail.com> | 2020-01-14 18:34:37 -0700 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-01-14 18:34:37 -0700 |
| commit | e48cfe51f530cdfaad488924722ef0b2416d2d82 (patch) | |
| tree | c1da500d0149add2afead1550d4c393443759543 | |
| parent | 1aad694887bc43e5362c1f389a2b82c0c37a387e (diff) | |
describe shorthand syntax for relations
| -rw-r--r-- | assignments/1/README.md | 11 | ||||
| -rw-r--r-- | assignments/1/README.pdf | bin | 240126 -> 240304 bytes | |||
| -rw-r--r-- | doc/01-introduction.md | 7 |
3 files changed, 13 insertions, 5 deletions
diff --git a/assignments/1/README.md b/assignments/1/README.md index ffc14d9..5d9e7ba 100644 --- a/assignments/1/README.md +++ b/assignments/1/README.md @@ -49,6 +49,7 @@ a. Associative entity > An entity type that associates the instances of one or more entity types and contains attributes that are peculiar to the relationship between those entity instances. Project ||-<- Policy ->-|| SoftwareLicense +  b. Weak entity @@ -149,15 +150,15 @@ For each of the following relations, identify the Normal Form(s) each relation s ```text RELATION = STUDENT (StuID, StuName, Major), Primary Key = {StuID}. ``` - * Passes: 1st normal form - * Passes: 2nd normal form - * Passes: 3rd normal form + * Passes: 1st normal form (0 multi-valued attributes) + * Passes: 2nd normal form (0 functional dependencies) + * Passes: 3rd normal form (0 transitive dependencies) Alternative 3NF: ```text -Students(id, name, major_id), primary key = {id}, foreign key = {majors(major_id)} -Majors(id, name), primary key = {id} +STUDENTS(id, name, major_id), primary key = {id}, foreign key = {MAJORS(major_id)} +MAJORS(id, name), primary key = {id} ``` * Consider the relation EMPLOYEE, where an employee can have more than one specialization: diff --git a/assignments/1/README.pdf b/assignments/1/README.pdf Binary files differindex 3148e38..0e44f31 100644 --- a/assignments/1/README.pdf +++ b/assignments/1/README.pdf diff --git a/doc/01-introduction.md b/doc/01-introduction.md index 1e57ff7..61e6cee 100644 --- a/doc/01-introduction.md +++ b/doc/01-introduction.md @@ -40,8 +40,15 @@ line_items # Relation: two dimensional table of data. +## Shorthand syntax + Employee1(id, name) # shorthand notation for describing a relation. +* primary key is underlined. +* foreign key uses a dashed underline. + +Employees( *id*, name ) + ## Relational Keys * primary key: attribute or combination of attributes that uniquely identifies each row in a relation. |
