0% found this document useful (0 votes)
8 views2 pages

Lecture 2 Notes

Uploaded by

varanjit14
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Lecture 2 Notes

Uploaded by

varanjit14
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Lecture 2 Notes – Introduction to data organization in databases

Big lecture today, covering a wide range of topics.

Objectives if this lesson slide.

Tables are the building blocks of relational databases. Showed table creation using Graphical and SQL
means.

Records/ tuple creation can be graphical, from a form to SQL and then into the database.

Fields, Columns, and attributes are key words.

An entity is a row.

Now we will move onto data integrity. It has three types.

The first is entity integrity. Use the primary key to make sure each row is uniquely identifiable. Guarantee
that no duplicate or null values exist in the primary key columns to maintain data uniqueness.

The second is referential integrity. Establishing relationships between tables is done by using a foreign
key. Making sure the foreign key actually exists in the original table is referential integrity.

Then we do the understanding relationships slides. One to one, one to many or many to many
relationships can exist. Having a junction table for many to many relationships.

The third is domain integrity. Enforcing valid data entry. Uses constraints like check constraints to enforce
data range, format, or allowed values. This is column level stuff (domains are columns).

Now we will look at datatypes that we can use in databases and different DBMS have some custom data
types like money and small money.

Ensuring Data Consistency. ACID properties with transaction. Atomicity, Consistency, Isolation and
Durability.

Data redundancy and consistency.

Moving onto Normalization. It’s purpose is to reduce redundancy and we are going to investigate three
stages of it. 1NF is First Normal Form, 2NF is Second Normal Form, 3NF is Third Normal Form and so on.

Rules of 1NF. Each data item cannot be broken down any further. There are no columns with repeated or
similar data. Each row is unique (primary key). Each field has a unique name.

Rules of 2NF. Remove the partial dependencies. Only concerned with tables that have a composite
primary key. See example in slides.

Rules of 3NF. Remove transitive dependencies and remove any calculated values. See slide example.
Indexing for efficiency. Optimization technique for faster retrieval. Types and benefits.

Explaining the concept of a heap and searching works.

Key tip: Also index a foreign key and joins.

Stored Procedures and Functions will be done later.

Tomorrow’s lab is going to be a big quiz he will put together.

You might also like