0% found this document useful (0 votes)
436 views

Introduction To Database

This document provides an introduction to databases, including definitions of key terms and concepts. It discusses what data and information are, different types of data, what tables and relationships are, and definitions of databases and database management systems (DBMS). It also describes different types of databases, the role of a DBMS in creating and managing databases, and common database terminology like normalization.

Uploaded by

itzalizz24
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
436 views

Introduction To Database

This document provides an introduction to databases, including definitions of key terms and concepts. It discusses what data and information are, different types of data, what tables and relationships are, and definitions of databases and database management systems (DBMS). It also describes different types of databases, the role of a DBMS in creating and managing databases, and common database terminology like normalization.

Uploaded by

itzalizz24
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Introduction to Database DIT 2nd Semester

Introduction to Database
Course Contents
What is Data? ................................................................................................................................................ 2
Types of Data ................................................................................................................................................ 2
Information ................................................................................................................................................... 2
What is Table?............................................................................................................................................... 2
What is Relationship? ................................................................................................................................... 2
What is Database? ........................................................................................................................................ 4
Types of Database ......................................................................................................................................... 5
What is DBMS ............................................................................................................................................... 6
Role/Functions of (DBMS)............................................................................................................................. 6
Database Model ............................................................................................................................................ 8
Common terminologies of Database .......................................................................................................... 11
Data base anomalies ................................................................................................................................... 13
Normalization.............................................................................................................................................. 13

Prepared by LiaqatawanWhatsApp +92-314-9369941 Email [email protected]


Introduction to Database DIT 2nd Semester

What is Data?
Data is the plural form of the Latin word Datum.
The collection of fact and figure is called data or anything in Raw form is called
data. Data cannot be used for decision making or Action taking in other Words
Data is the collection facts and figures about any entity or object.
e.g. Name, Address, Phone Number, Roll No etc.
Types of Data
 There are different types of data.
1. Alphabetic data. It consists of Letter from A-Z capital letter of small letter.
E.g. hamid , peshawer, lahore, chair, etc.
2. Numeric data. It consists of digit form 0-9 e.g. 123 567 etc.
3. Alphanumeric data. It consists of alphabetic data as well as Numeric
data. e.g. A10 , B23 etc.
4. Graphic data. It consists of table, chart, graphic and Statements.
5. Audio data. It consists of only sound e.g. Radio news, audio songs, etc.
6. Video data. It consist of photos, image and moving picture , animations
etc.
7. Mixed data. It consists more than one type of data such as the
combination of audio and video,
e.g. movies . Tv shows etc.
Information
To organize the data in meaningful form upon which people can take necessary
decision is called information.
Examples are voucher, bills fee registration card or library cards. CNIC card etc.
What is Table?
Table is the collection of data, Table organize the data into rows and columns.
What is Relationship?
Relationship is an association or link between common fields of two or more
tables.
Types of relationship
 One to One
 One to Many
 Many to Many

Prepared by LiaqatawanWhatsApp +92-314-9369941 Email [email protected]


Introduction to Database DIT 2nd Semester

One to One relationship : one to one relationship exist when the each single
record of table no 1 is associated with each single record of table no 2 and the
single record of table 2 is related with single record of table no 1.
Students Table .

One to Many Relationships


One to many relationship exist when the single record of table 1 is related to
multiple records of table2 and multiple records of table2 are associated with only
single record of table 1.`

Many to Many Relationship b


Many to many relationship exist when the multiple records of table No 1 are
related with multiple records of table No 2.A

Prepared by LiaqatawanWhatsApp +92-314-9369941 Email [email protected]


Introduction to Database DIT 2nd Semester

What is Database?
A database is an integrated collection of data that is shared by all the
organizational users. It is large collection of data in computer system organized so
that it can be expanded, updated and retrieved rapidly for various users.

According to Martin (1981) “ A database is a shared collection of interrelated


data designed to meet the needs of multiple type of end users”.
There are two properties of database
1) It is integrated
2) It is shared
By integrated we mean that previously distinct data files have been logically
organized to eliminate redundancy and facilitate data access.
By shared we mean that all the qualified users in the organization have access to
the same data for use in a variety of activities.
Advantages of Database
 Improved data sharing
 Improved data security
 Better data integrity
 Minimized data inconsistency
 Improved data access
 Improved decision making
 Increase end user productivity
Disadvantage
 Increase cost

Prepared by LiaqatawanWhatsApp +92-314-9369941 Email [email protected]


Introduction to Database DIT 2nd Semester

 Management complexity
 Maintaining cost
 Designing & creating database is complex and time taking

Types of Database
Database has following types
1) Operational Database
2) Analytical Database
3) Data warehouse
4) Distributed Database
5) External Database
6) Text Database
7) Images & multimedia Database
Operational Database: - These database stored detailed information needed to
support the operation of entire organization. This database called SADB (subject
Area Database) for example production Database, Inventory Database etc.

Analytical Database: These database store data and information extracted from
operational database. These databases consist of summarized data most needed
by organization users and management. These are also called management data
base or information database. Example decision support system and executive
information system.

Data Warehouse: a data warehouse store data from previous or current and
previous year data extracted from the various operational databases of an
organization. It can be used by manager and other end users professional
throughout an organization.

Distributed Database: This database is dispersed through an organization. This is


a database of local workgroup and department at regional office, branch office
and other worksite. In this database data is stored physically across computers or
a site at different location is known as distributed database.

Prepared by LiaqatawanWhatsApp +92-314-9369941 Email [email protected]


Introduction to Database DIT 2nd Semester

External Database: Database provide by online services/information. Access to


external privately owned online database as available for a fee to end user and
organization from commercial information service.

Text Database: database of document using computer to create and store


electronically. This database stores bibliography information such as publication
enlarge text database. For example newspaper, magazine etc.

Images and multimedia Database: These database store data in a text, images ,
sound videos.

What is DBMS
A database management system (DBMS) is system software for creating and
managing databases. A DBMS makes it possible for end users to create, read,
update and delete data in a database. Oracle Is the most prevalent type of data
management platform, the DBMS essentially serves as an interface between
databases and end users or application programs, ensuring that data is
consistently organized and remains easily accessible.

Role/Functions of (DBMS)
DBMS performs several important functions which are.
 Data Dictionary Management,
 Data Storage Management,
 Data Transformation and Presentation,
 Security Management,
 Multi user Access Control,
 Backup and Recovery Management,
 Integrity Management

Data Dictionary Management


DBMS stores definitions of the data elements and their relationships (metadata)
in a data dictionary .So, all programs that access the data in the database work
through the DBMS. The DBMS uses the data dictionary to look up the required

Prepared by LiaqatawanWhatsApp +92-314-9369941 Email [email protected]


Introduction to Database DIT 2nd Semester

data component structures and relationships which relieves you from coding such
complex relationships in each program.
Data Storage Management
The DBMS creates and manages the complex structures required for data storage,
A modern DBMS system provides storage not only for the data, but also for
related data entry forms or screen definitions, report definitions, data validation
rules, procedural code, structures to handle video and picture formats, and so on.

Data transformation and presentation


The DBMS transforms entered data in to required data structures. The DBMS
relieves you of the choose of making a distinction between the logical data format
and the physical data format. That is, the DBMS formats the physically retrieved
data to make it conform to the user’s logical expectations.

Security Management
Security Management is another important function of DBMS. The DBMS creates
a security system that enforces user security and data privacy. Security rules
determine which users can access the database, which data items each user can
access, and which data operations (read, add, delete, or modify) the user can
perform. This is especially important in multiuser database systems.

Multi User Access Control


To provide data integrity and data consistency, the DBMS uses sophisticated
algorithms to ensure that multiple users can access the database concurrently
without compromising the integrity of the database.

Backup and Recovery Management


The DBMS provides backup and data recovery to ensure data safety and integrity.
Current DBMS systems provide special utilities that allow the DBA to perform
routine and special backup and restore procedures. Recovery management deals
with the recovery of the database after a failure, such as a bad sector in the disk
or a power failure. Such capability is critical to preserving the database’s integrity.

Prepared by LiaqatawanWhatsApp +92-314-9369941 Email [email protected]


Introduction to Database DIT 2nd Semester

Data Integrity Management


The DBMS promotes and enforces integrity rules, thus minimizing data
redundancy and maximizing data consistency. The data relationships stored in the
data dictionary are used to enforce data integrity. Ensuring data integrity is
especially important in transaction-oriented database systems.

Database Model
What is model? Model is a representation of real world object, event and their
association.
A database model is an abstract representation of the data ,about entities ,
events, activities and their association. A database model represent or describe
organization itself.
There are two purposes of database model. First to represent data and the
second to be understandable. Database model tell us how data is stored in
database of an organization. How entities and attribute are associated with each
other.
There are three types of database models which are commonly used
 Hierarchical Data Model
 Network Data Model
 Relational Data model
Hierarchical Database
It is popular database models. Here records are stored in the form of tree. Record
at the top position is called parent record and bottom record is called child
record. Record at the top most position is called root record. In hierarchical
database model parent record can have more than one child but child can have
only one parent record. It represents one to many relationship.

Prepared by LiaqatawanWhatsApp +92-314-9369941 Email [email protected]


Introduction to Database DIT 2nd Semester

Pakistan

Gilgit
KP Punjab Balochistan sind
Baltistan

Prepared by LiaqatawanWhatsApp +92-314-9369941 Email [email protected]


Introduction to Database DIT 2nd Semester

Network Database Model: The records are organized in the form of graph in a
Network data model. Here each parent node can have more than one child and a
children can have more parents. The records are link together by mean of pointer.
In network terminology, the child record is called member while parent record is
called owner. It is more flexible than hierarchical in the sense that different
relationships may be established between different branches. It support many to
many relationship.

Courses
English Math Phy Bio chemistry

Teachers
Aslam Amir Noman Qamar Javed

Students
Ali Baber Zaheer Faisal Usama

Relational Database model: it is more flexible than other two. It connects the
different files through the use of key field. Data elements are stored in different
tables made of rows and columns. Its advantage is that the user needs not to be
aware of any structure. Thus it can be used with a little training. Records can be
easily inserted, deleted and modified.
Students
Rollno Name Address Course Contact

Fee

Rollno Amount Date Remarks Balance

Prepared by LiaqatawanWhatsApp +92-314-9369941 Email [email protected]


Introduction to Database DIT 2nd Semester

Common terminologies of Database


Reality
It consist of organization itself, the components of the organization and
environment in which the organization is working.
Entity
An entity is an object or event about which organization wants (choose) to collect
and store information (data). An entity may be tangible object such as an
employee, product, computer, calculator etc. or it may be intangible such as Bank
Accounts etc.
Entity set/Entity Class
It is collection of entities that possess similar characteristic. Example of entity
class is customer, student and patient. These are also referred by entity sets or
entity types.

Prepared by LiaqatawanWhatsApp +92-314-9369941 Email [email protected]


Introduction to Database DIT 2nd Semester

Identifier
That attributes which identifies one entity from other in the same entity class. For
example Roll No is an identifier for a student.
Attribute
The characteristic of an entity is called attribute
Meta Data
Data about data or information about data is called meta data.
Data item
For each attribute of an entity there is a data item. A data item is smallest unit of
data in database.
Field
The group of related data item is called field.
Record
The collection of fields is called record
File
The Collection of related records is called file.
What is Key and Types of Key?
What is Key?
Key is a data item that identify the record. For example RollNo, Name etc
There are three Types of Key
1) Primary Key
2) Secondary Key
3) Foreign Key
Primary Key: Primary key is a data item that uniquely identifies the record. For
example Rollno would be the primary key in student database.
Secondary Key: Secondary key does not uniquely identify the record, but
identify the number of record on specific condition. For example Course would
be the secondary key in student data base.
Foreign Key: it is primary key field in one table and used as a foreign key in
another table. It is used to link two or more tables.

Prepared by LiaqatawanWhatsApp +92-314-9369941 Email [email protected]


Introduction to Database DIT 2nd Semester

Data base anomalies


Anomalies are problems that can occur in poorly planned un normalized
databases where all the data is stored in one table.

There are three types of anomalies


 Insertion
 Modification/updating anomalies
 Deletion
Insert Anomalies: insertion anomalies are issues that come about when we are
inserting information into the database for the first time.
Update Anomalies: Modification/update anomalies are data inconsistencies that
resulted from data redundancy or partial update.
Delete Anomalies: Deletion anomalies are obviously about issues with data being
deleted either when attempting to delete and being stopped by an error.

Normalization
Normalization is a database design technique which organizes tables in a manner
that reduces redundancy and dependency of data.
It divides larger tables to smaller tables and link them using relationships.
Steps in Normalization
1st Normal Form
 If Duplicate Columns exists then remove duplicate Columns
2nd Normal Form
 If Non Key Columns depends other Then Remove the column
3rd Normal Form
 If mutual depended Fields found then remove them

Prepared by LiaqatawanWhatsApp +92-314-9369941 Email [email protected]


Introduction to Database DIT 2nd Semester

What is ERD?
Entity Relationship Diagram, also known as ERD, ER Diagram or ER model, is a
type of structural diagram for use in database design. An ERD contains different
symbols and connectors that visualize two important information:
The major entities within the system scope, and the Inter-relationships among
these entities.

Prepared by LiaqatawanWhatsApp +92-314-9369941 Email [email protected]

You might also like