Professional Documents
Culture Documents
Name: Rodjean A. Simballa Course & Section: Bsit 3D
Name: Rodjean A. Simballa Course & Section: Bsit 3D
Name: Rodjean A. Simballa Course & Section: Bsit 3D
ASSESSMENT: 1
Normalization is important for many reasons, but chiefly because it allows databases to take up as
little disk space as possible, resulting in increased performance.
2. Identify the problems that you may encountered without normalization in designing
your database and discuss briefly each modification anomaly.
ANSWER:
Update anomaly
The same information can be expressed on multiple rows; therefore, updates to the relation may
result in logical inconsistencies. For example, each record in an
"Employees' Skills" relation might contain an Employee ID, Employee Address, and Skill;
thus, achange of address for a particular employee may need to be applied to multiple
records (one for each skill). If the update is only partially successful – the employee's
address is updated on some records but not others – then the relation is left in an
inconsistentstate. Specifically, the relation provides conflicting answers to the
question of what this particular employee's address is.
Insertion anomaly
There are situations in which certain facts cannot be recorded at all. For
example, each record in a "Faculty and Their Courses" relation might contain a Faculty
ID, Faculty Name, Faculty Hire Date, and Course Code. Therefore, we can record the
details of any faculty member who teaches at least one course, but we cannot record a
newly hired faculty member who has not yet been assigned to teach any courses,
except by setting the Course Code to null. This phenomenon is known as an insertion
anomaly. Until the new faculty member, is assigned to teach at least
one course, his details cannot be recorded.
Deletion anomaly
Table Product
ANSWER:
101 red 25
101 blue 25
102 blue 57
103 red 34
103 green 34
104 Yellow 48
104 blue 48
105 red 50
Optimization Engines
A classic query engine handles all the non-SQL queries, but a SQL query engine won't
handle logical files.
ANSWER:
Entity Integrity: There are no duplicate rows in a table. For example, the orders table primary
key is order_num. The order_num column holds a unique system-generated order number for
each row in the table.
Domain Integrity: Enforces valid entries for a given column by restricting the type, the format,
or the range of values.
Referential integrity: Rows cannot be deleted, which are used by other records. It means the
reference from a row in one table to another table must be valid.
User-Defined Integrity: Enforces some specific business rules that do not fall into entity,
domain or referential integrity. For example: if I set up a rule that an ID needs to consist of 5
integers ONLY then when I insert a row with ID which is made up of integers and some chars
then it won't accept it and return an error.
7. Perform the following exercises using your laptop or personal computer. Make
sure to have screenshots for every task and send to instructor’semail account.
ANSWER:
A.
CREATING DATABASE
CREATING TABLE
ADDING ADDRESS, CONTACT NO., GENDER
STUDENT TABLE COMPLETE
BOOK TABLE
programs TABLE
RENAMING THE TABLE my_friends TO my_friends
CREATE VIEW
SORTING ASCENDING BY THEIR AGE
TWO TABLES JOIN