diff options
| author | mo khan <mo.khan@gmail.com> | 2020-01-11 16:30:16 -0700 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-01-11 16:30:16 -0700 |
| commit | 45acf4505a49ca5f2ac9022b744903881ab0ee87 (patch) | |
| tree | 0bd301559506e69d29eb39667c171ba3fc1cddb7 | |
| parent | 41262df27166f65aec404b9d6c7021032ae3a3ec (diff) | |
Create UML for single table question
| -rw-r--r-- | assignments/1/README.md | 2 | ||||
| -rw-r--r-- | assignments/1/associative-entity.png | bin | 13321 -> 10257 bytes | |||
| -rw-r--r-- | assignments/1/course-administration.png | bin | 120730 -> 88229 bytes | |||
| -rw-r--r-- | assignments/1/question-5-before.png | bin | 0 -> 5153 bytes | |||
| -rw-r--r-- | assignments/1/question-5-before.uml | 23 | ||||
| -rw-r--r-- | assignments/1/unary-relationship.png | bin | 7334 -> 5601 bytes | |||
| -rw-r--r-- | assignments/1/weak-entity.png | bin | 9353 -> 7060 bytes | |||
| -rw-r--r-- | doc/01-introduction.md | 8 |
8 files changed, 33 insertions, 0 deletions
diff --git a/assignments/1/README.md b/assignments/1/README.md index 74e25ec..df7e3a1 100644 --- a/assignments/1/README.md +++ b/assignments/1/README.md @@ -177,6 +177,8 @@ The following functional dependencies also apply: Transform this relation into 3NF. Justify any decomposition. +  + ### Question 6 (15 marks) Consider the following relations: diff --git a/assignments/1/associative-entity.png b/assignments/1/associative-entity.png Binary files differindex d3e37e0..aff6ce7 100644 --- a/assignments/1/associative-entity.png +++ b/assignments/1/associative-entity.png diff --git a/assignments/1/course-administration.png b/assignments/1/course-administration.png Binary files differindex dab776e..cf01ed9 100644 --- a/assignments/1/course-administration.png +++ b/assignments/1/course-administration.png diff --git a/assignments/1/question-5-before.png b/assignments/1/question-5-before.png Binary files differnew file mode 100644 index 0000000..52ec36b --- /dev/null +++ b/assignments/1/question-5-before.png diff --git a/assignments/1/question-5-before.uml b/assignments/1/question-5-before.uml new file mode 100644 index 0000000..54c568f --- /dev/null +++ b/assignments/1/question-5-before.uml @@ -0,0 +1,23 @@ +@startuml +!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >> +!define primary_key(x) <b>x</b> +!define unique(x) <color:green>x</color> +!define not_null(x) <u>x</u> +hide methods +hide stereotypes + +Table(employees, "employees") { + primary_key(emp_no) integer + date datetime + job varchar[255] + phone_no varchar[255] + office_no varchar[255] + area varchar[255] + sal decimal + proj_no integer + p_budget decimal + dep_no integer + d_budget decimal + mgr_emp_no integer +} +@enduml diff --git a/assignments/1/unary-relationship.png b/assignments/1/unary-relationship.png Binary files differindex 2c711a9..378b903 100644 --- a/assignments/1/unary-relationship.png +++ b/assignments/1/unary-relationship.png diff --git a/assignments/1/weak-entity.png b/assignments/1/weak-entity.png Binary files differindex c03f6b6..39d4c7c 100644 --- a/assignments/1/weak-entity.png +++ b/assignments/1/weak-entity.png diff --git a/doc/01-introduction.md b/doc/01-introduction.md index ce9db0d..23184c1 100644 --- a/doc/01-introduction.md +++ b/doc/01-introduction.md @@ -47,6 +47,7 @@ Employee1(id, name) # shorthand notation for describing a relation. * primary key: attribute or combination of attributes that uniquely identifies each row in a relation. * composite key: primary key that consists of more than one attribute. * foreign key: attribute in a relation that serves as the primary key of another relation in the same db. +* enterprise key: A primary key whose value is unique across all relations. Not all tables are relations. @@ -150,3 +151,10 @@ A normal form is a state of a relation that requires that certain rules regardin * Boyce-Codd normal form: remaining anomalies from functional dependencies have been removed. * 4th normal form: multivalued dependencies have been removed. * 5th normal form: remaining anomalies have been removed. + +> functional dependency: a constraint between two attributes in which the value of one attribute is determined by the value of another attribute. + + +* Synonyms: Two (or more) attributes that have different names but the same meaning. +* Alias: An alternative name used for an attribute. +* Homonym: An attribute that may have more than one meaning. |
