summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assignments/1/README.md2
-rw-r--r--assignments/1/associative-entity.pngbin13321 -> 10257 bytes
-rw-r--r--assignments/1/course-administration.pngbin120730 -> 88229 bytes
-rw-r--r--assignments/1/question-5-before.pngbin0 -> 5153 bytes
-rw-r--r--assignments/1/question-5-before.uml23
-rw-r--r--assignments/1/unary-relationship.pngbin7334 -> 5601 bytes
-rw-r--r--assignments/1/weak-entity.pngbin9353 -> 7060 bytes
-rw-r--r--doc/01-introduction.md8
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.
+ ![one-relation](./associative-entity.png)
+
### Question 6 (15 marks)
Consider the following relations:
diff --git a/assignments/1/associative-entity.png b/assignments/1/associative-entity.png
index d3e37e0..aff6ce7 100644
--- a/assignments/1/associative-entity.png
+++ b/assignments/1/associative-entity.png
Binary files differ
diff --git a/assignments/1/course-administration.png b/assignments/1/course-administration.png
index dab776e..cf01ed9 100644
--- a/assignments/1/course-administration.png
+++ b/assignments/1/course-administration.png
Binary files differ
diff --git a/assignments/1/question-5-before.png b/assignments/1/question-5-before.png
new file mode 100644
index 0000000..52ec36b
--- /dev/null
+++ b/assignments/1/question-5-before.png
Binary files differ
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
index 2c711a9..378b903 100644
--- a/assignments/1/unary-relationship.png
+++ b/assignments/1/unary-relationship.png
Binary files differ
diff --git a/assignments/1/weak-entity.png b/assignments/1/weak-entity.png
index c03f6b6..39d4c7c 100644
--- a/assignments/1/weak-entity.png
+++ b/assignments/1/weak-entity.png
Binary files differ
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.