Lec 7
Lec 7
Lesson 6
Objective Domain Matrix
• Insert Anomaly
– You cannot insert new data because of unrelated dependency
• Delete Anomaly
– Deleting one piece of data causes unintended loss of other data
• Update Anomaly
– Updating a single data value requires multiple rows to be updated
Data Normalization
• The process of data normalization ensures
that a database design is free of any
problems that could lead to loss of data
integrity.
• This lesson discusses three normal forms
– First Normal Form
– Second Normal Form
– Third Normal Form
First Normal Form (1NF)
• In order for a table to be in the first normal form
(1NF), none of the columns in the table should
have multiple values in the same row of data.
• The following table is not in 1NF because the
PhoneNumber column is storing multiple values
Id FirstName LastName PhoneNumber
UPDATE Customers
SET ContactName = 'Maria Anderson'
WHERE CustomerId = 'ALFKI'
Inserting Data
• The INSERT statement is used to add one or more
rows to a database table.
• The following statement inserts a new record to the
Order Details table: