SlideShare a Scribd company logo
DR. MARIA KANWAL
ASSISTANT PROFESSOR, CS
NUTECH, ISLAMABAD
Database Systems
Lecture 01
What are Data?
What are Data?
Data are often viewed as the lowest level of abstraction from which
information and knowledge are derived.
Data can exist in a variety of forms -- as numbers or text on pieces of
paper, as bits and bytes stored in electronic memory, or as facts
stored in a person's mind.
Raw data refers to a collection of numbers, characters, images or
other outputs from devices that collect information to convert
physical quantities into symbols, that are unprocessed.
What is Database?
What is a Database?
A database is a shared collection of logically related data that is stored to meet the requirements
of different users of an organization
Or
A database consists of an organized collection of data for one or more multiple uses.
Or
An organized body of related information.
Computer databases typically contain aggregations of data records or files.
What is a Database?
Databases play a critical role in almost all areas
◦ Banking: all transactions
◦ Airline: reservation, schedules
◦ Universities: registration, grades
◦ Sales: customers, products, purchases
◦ Manufacturing: production, inventory, orders, supply chain
◦ Human resources: employee records, salaries, tax deductions
What is a Database?
A database can be of any size and of varying complexity.
A software system that facilitates the creation and maintenance and
use of an electronic database
◦ For example, the list of names and addresses of friends
◦ The book catalog of a large library may contain half a million records
◦ A database of much greater size and complexity is maintained by the
government to keep track of the tax information filed by taxpayers.
What is a Database?
A schema is the definition of a database. It defines the meaning of data.
An instance of a database is the collection of data in the database at a particular point of time.
For example, in the above snap-shot, the schema is “Student Name, ID, Age, Gender, Entrance
Year, Grade”. The remaining rows in the table make up an instance of the database.
Student Name ID Age Gender Entrance Year Grade
Sadaf Jamal A34455 20 F 1998 A
Ali Imtiaz C23444 19 M 1999 B
Wasif Ali C73334 19 M 2000 C
Definitions
Database:
◦ organized collection of logically related data
◦ Database stores data
Data:
◦ referred to facts concerning objects and events that could be
◦ recorded and stored on computer media
◦ Types of data
◦ Structured: numbers, text, dates
◦ Example
◦ Students regd No, name, contact No
◦ Unstructured: images, video, documents
Information:
◦ data that have been processed to increase knowledge of the person who uses the data.
◦ Example
–Consider the following facts 9
10
•Metadata:
–data that describes the properties or characteristics of end user
data and context of that data
–Data about data
•Example
• By adding a few additional data items and providing some
structure,
• we recognize a class roster for a particular course.
11
Descriptions of the properties or characteristics of the
data, including data types, field sizes, allowable
values, and data context
What is Database Management System
(DBMS)?
A DBMS is a collection of software programs to enable users to
create, maintain and utilize a database.
In database management systems, data files are the files that store
the database information, whereas other files, such as index files
and data dictionaries, store administrative information, known as
metadata.
Functions of DBMS
◦ Insert records
◦ Delete records
◦ Update records
◦ Query records
What is a DBMSs?
Commercial DBMSs
Company Product
Oracle Oracle 8i, 9i, 10g
IBM DB2, Universal Server (from System
R, System R*, Starburst) & Informix
Microsoft Access, SQL Server
Sybase Adaptive Server
Informix Dynamic Server
NCR Teradata
UC Brekeley’s INGRES,M PostgreSQL
Database Users
End users
◦ Use the database system to achieve some goal
Application developers
◦ Write software to allow end users to interface with the database system
Database Administrator (DBA)
◦ Designs & manages the database system
Database systems programmer
◦ Writes the database software itself
Why do we need a DBMS?
To reduce application development time
Suppose we are given a collection of raw files which occupy 500GB
What are the constraints and
drawbacks? In case if we are using
file systems rather than DBMS
What is File System?
A file system (often also written as filesystem) is a method of
storing and organizing computer files and their data.
Essentially, it organizes these files into a database for the storage,
organization, manipulation, and retrieval by the computer's
operating system.
File systems are used on data storage devices such as a hard disks
or CD-ROMs to maintain the physical location of the files.
System Architecture
Applications
Operating System (e.g. Windows, Linux)
Device Driver
Storage Media
(Hard Disk, Flash Memory)
File System (e.g. DOS, FAT)
File Processing System
•file processing system refers to the first computer-based approach of
handling the commercial or business applications.
•This approach met the data processing needs of individual
department’s needs rather than overall information needs of the
organization.
•it is also called a replacement of the manual file system.
18
File Processing System
•In this system data is stored in permanent system files.
•Different application programs are written to extract data
from these files and to add record to these files.
•No overall map, plan or model guided application growth
19
File-Based Systems
A decentralized approach was taken, where each department, with the assistance of Data
Processing (DP) staff, stored and controlled its own data.
Each department access their own files through application programs written specially for them.
Each set of departmental application programs handles data entry, file maintenance, and the
generation of a fixed set of specific reports.
The physical structure and storage of the data files and records are defined in the application
code.
File-based Processing
Disadvantages of File Processing
1. Data redundancy: In File Processing Systems, the same data is often stored in multiple files, which can lead to data
redundancy. Data redundancy means that the same data is stored in more than one place, leading to the wastage of
storage space and making data maintenance more difficult.
2. Data inconsistency: Due to data redundancy, inconsistencies can occur in the data. If changes are made to one file, these
changes must be manually made to all other files containing the same data. If this is not done properly, data
inconsistencies can arise.
3. Limited data sharing: File Processing Systems are not designed to share data between applications or users. Each
application has its own set of files, and sharing data between applications is difficult and often requires custom coding.
4. Security: File Processing Systems do not have built-in security features to protect data from unauthorized access. Access
to files is typically controlled through file permissions, which can be difficult to manage and can lead to security breaches.
5. Lack of flexibility: File Processing Systems are not flexible and cannot easily adapt to changes in the data structure or new
requirements. Adding new fields or modifying existing fields requires significant effort and can disrupt existing applications
that rely on the data.
6. Limited scalability: File Processing Systems are not scalable and can handle only a limited amount of data. As the amount
of data grows, File Processing Systems can become slow and unreliable.
7. Difficult to maintain: File Processing Systems require significant effort to maintain. As the number of files and applications
grows, it can become difficult to keep track of which files are being used by which applications and to ensure data
consistency.
Database Approach
Arose because:
◦ Definition of data was embedded in application programs, rather than being stored
separately and independently.
◦ No control over access and manipulation of data beyond that imposed by application
programs.
Result:
◦ the database and Database Management System (DBMS).
Database
Shared collection of logically related data (and a
description of this data), designed to meet the information
needs of an organization.
System catalog (metadata) provides description of data to
enable program–data independence.
Logically related data comprises entities, attributes, and
relationships of an organization’s information.
Database Processing
OS File System Storage Based Approach
Files of records –used for data storage
◦ Data redundancy –wastage of space
◦ Maintaining consistency becomes difficult
Record structures –hard coded into the programs
◦ Structure modifications –hard to perform
Each different data access request (a query)
◦ Performed by a separate program
◦ difficult to anticipate all such requests
Creating the system-requires a lot of effort
Managing concurrent access and failure recovery are difficult
DBMS Approach
DBMS
◦ Separation of data and metadata
◦ Flexibility of changing metadata
◦ Program-data independence
Data access language
◦ standardized –SQL
◦ ad-hoc query formulation –easy
DBMS Approach
System development
◦ less effort required
◦ concentration on logical level design is enough
◦ components to organize data storage process queries, manage concurrent access, recovery from
failures, manage access control are all available
The DATABASE Approach
Data models:
◦ capture the nature of and relationships among data
◦ and are used at different levels of abstraction as a database is conceptualized and designed.
The effectiveness and efficiency of a database is directly associated with the structure of the
database.
Various graphical systems exist that convey this structure and are used to produce data models.
29
•A data model is made up of entities and relationships.
i. Entities
• Entity: a “thing” or “object” in the enterprise that is distinguishable from other objects
– Described by a set of attributes
• Example
» CUSTOMER, ORDER
» Attribute: Customer Name, Address, Order ID
30
ii. Relationships
relationship between entities that exists in organizational data.
Different types of relationships exist.
One to many(1:M)
Many to many (M:N)
31
The DATABASE Approach
Relational model
◦ Entity-Relationship data model (mainly for database design)
Object-based data models (Object-oriented and Object-relational)
Semi structured data model (XML)
Other older models:
◦ Network model
◦ Hierarchical model
32
Relational Model
Example of tabular data in the relational model
Columns
Rows
34
What happened to dept_name of instructor and student?
Represented diagrammatically by an entity-
relationship diagram:
Relational Model
Database Management System
35
DBMS manages data resources like an operating system manages hardware resources
A software system that is used to create, maintain, and provide
controlled access to user databases
User interface
36
User Interface
37
Database Application Program
38
DBMS
39
ER Model of DBMS
40
Advantages of the Database approach
1. Program Data Independence
◦ Metadata is stored separately from the application program.
◦ Data descriptions are stored in repository.
◦ This allows database to change and evolve without changing application program.
41
Advantages of the Database approach
contd..
2. Planned Data Redundancy
◦ Database design attempts to integrate redundant files into a single logical structure.
◦ Each primary fact is recorded in only one place in database.
◦ At times it may be desirable to include some limited redundancy to improve database performance.
42
43
Relationships established in special columns that provide links between tables
Advantages of the Database approach
contd..
3. Improved data consistency
◦ By eliminating or controlling redundancy, reduces inconsistencies.
44
Advantages of the Database approach
contd..
4. Improved data sharing
◦ Database is designed as a shared corporate resource.
◦ External/internal users are granted permission to use database.(user views)
◦ A user view is a logical description of some portion of the database that is required by a user to perform
some task.
45
Advantages of the Database approach
contd..
5. Increased productivity of application development
◦ Database reduces the cost and time for developing new business applications.
◦ There are three reasons for it:
◦ Assume database is already implemented, the application developer can concentrate on the specific functions required, without
worrying about low level details.
◦ DBMs provides productivity tools such as forms and report generators.
◦ Use of Web services, based on the use of standard Internet Protocols.
46
Advantages of the Database approach
contd..
6. Enforcement of standards
◦ Database administration should be granted single point authority and responsibility for enforcing
standards.
◦ The standards include naming conventions, data quality standards, and uniform procedures for
accessing, updating and protecting data.(Repository)
47
Advantages of the Database approach
contd..
7. Improved data quality
◦ is a perception or an assessment of data's fitness to serve its purpose in a given context.
◦ According to report of Data Warehousing Institute (DWI) Data quality problem costs $600 billion to U.S
business annually.
◦ The database approach provides a number of tools and processes to improve data quality.
◦ Integrity constraints: rule that cannot be violated by database users
48
Advantages of the Database approach
contd..
◦ Data warehouse : a large store of data accumulated from a wide range of sources within a company and used to guide
management decisions.
◦ Data warehouse cleans up operational data before they are placed in data warehouse.
49
Advantages of the Database approach
contd..
8. Improved data accessibility
◦ Structured Query Language is used to retrieve and process databases.
◦ It is an easy language and end user can easily use this language to interpret databases.
50
Advantages of the Database approach
contd..
9. Reduced program maintenance
◦ Stored data changes due to many reasons
◦ Changes such as adding new data items, changing data formats, and so on..
◦ Data are more independent on application program, so it can accommodate changes easily.
51
Advantages of the Database approach
contd..
10. Improved decision support
◦ Purpose of databases is to serve for decision support applications.
◦ For example
◦ Databases to support customer relationship management,
◦ Financial analysis
◦ Supply chain management.
52
Components of database environment
Components of database environment
contd..
1. Data modeling and design tools
o Data modeling and design tools are automated tools used to design databases and application programs. These tools help with
creation of data models and in some cases can also help automatically generate the “code” needed to create the database.
2. Repository
◦ A centralized knowledge base for all data definitions, data relationships, screen, and report formats, and other system components.
3. DBMS
◦ Software that is used to create, maintain, and provide controlled access to user databases.
OR
◦ A software that handles all access to the database
4. Database
◦ Organized collection of logically related data, usually designed to meet the information needs of multiple users.
5. Application programs
◦ Used to create and maintain the database and provide information to users.
54
Components of database environment
contd..
6. User interface
◦ Includes languages, menus and other facilities by which users interact with various components of
database.
7. Data and database administrators
◦ Data administrators are persons who are responsible for overall management of data resources in an
organization
◦ Database administrators are responsible for physical database design and for managing technical issues
in database environment.
8. System developers
◦ Persons such as systems analyst and programmers who design new application programs.
9. End Users
◦ Persons throughout the organization who add, delete, and modify data
55
Ad

More Related Content

Similar to DBS Theory Week 1 including relationships and relational database (20)

Ch01
Ch01Ch01
Ch01
Mahavir Devmane
 
DBMS-1.pptx
DBMS-1.pptxDBMS-1.pptx
DBMS-1.pptx
kingVox
 
Chapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdfChapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdf
TamiratDejene1
 
Chapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdfChapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdf
TamiratDejene1
 
Comprehensive Guide to Effective Introduction to Database Systems Principles
Comprehensive Guide to Effective  Introduction to Database Systems PrinciplesComprehensive Guide to Effective  Introduction to Database Systems Principles
Comprehensive Guide to Effective Introduction to Database Systems Principles
EliasZerabruk
 
Database, Lecture-1.ppt
Database, Lecture-1.pptDatabase, Lecture-1.ppt
Database, Lecture-1.ppt
MatshushimaSumaya
 
Introduction to Database (Lecture 1).ppt
Introduction to Database (Lecture 1).pptIntroduction to Database (Lecture 1).ppt
Introduction to Database (Lecture 1).ppt
RuelDogma1
 
DBMS and its Models
DBMS and its ModelsDBMS and its Models
DBMS and its Models
AhmadShah Sultani
 
MS-CIT Unit 9.pptx
MS-CIT Unit 9.pptxMS-CIT Unit 9.pptx
MS-CIT Unit 9.pptx
SHRIBALAJIINFOTECH
 
Lecture-1.ppt
Lecture-1.pptLecture-1.ppt
Lecture-1.ppt
ChSheraz3
 
Db lecture 1
Db lecture 1Db lecture 1
Db lecture 1
https://www.isp.edu.pk/
 
Advanced Database Management System_Introduction Slide.ppt
Advanced Database Management System_Introduction Slide.pptAdvanced Database Management System_Introduction Slide.ppt
Advanced Database Management System_Introduction Slide.ppt
BikalAdhikari4
 
database ppt(2)
database ppt(2)database ppt(2)
database ppt(2)
EshetuGeletu2
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbms
RituBhargava7
 
1. Chapter One.pdf
1. Chapter One.pdf1. Chapter One.pdf
1. Chapter One.pdf
fikadumola
 
Unit1 DBMS Introduction
Unit1 DBMS IntroductionUnit1 DBMS Introduction
Unit1 DBMS Introduction
MUHAMMED MASHAHIL PUKKUNNUMMAL
 
Information Management
Information ManagementInformation Management
Information Management
EllenGracePorras
 
Dbms Useful PPT
Dbms Useful PPTDbms Useful PPT
Dbms Useful PPT
Krishna Bashyal
 
INTRODUCTION TO DATABASE-SYSTEMS PRESENTATION.pptx
INTRODUCTION TO DATABASE-SYSTEMS PRESENTATION.pptxINTRODUCTION TO DATABASE-SYSTEMS PRESENTATION.pptx
INTRODUCTION TO DATABASE-SYSTEMS PRESENTATION.pptx
renadmajid789
 
unit 1 introduction to dbms [1-1.2].pptx
unit 1 introduction to dbms [1-1.2].pptxunit 1 introduction to dbms [1-1.2].pptx
unit 1 introduction to dbms [1-1.2].pptx
puneroshni
 
DBMS-1.pptx
DBMS-1.pptxDBMS-1.pptx
DBMS-1.pptx
kingVox
 
Chapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdfChapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdf
TamiratDejene1
 
Chapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdfChapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdf
TamiratDejene1
 
Comprehensive Guide to Effective Introduction to Database Systems Principles
Comprehensive Guide to Effective  Introduction to Database Systems PrinciplesComprehensive Guide to Effective  Introduction to Database Systems Principles
Comprehensive Guide to Effective Introduction to Database Systems Principles
EliasZerabruk
 
Introduction to Database (Lecture 1).ppt
Introduction to Database (Lecture 1).pptIntroduction to Database (Lecture 1).ppt
Introduction to Database (Lecture 1).ppt
RuelDogma1
 
Lecture-1.ppt
Lecture-1.pptLecture-1.ppt
Lecture-1.ppt
ChSheraz3
 
Advanced Database Management System_Introduction Slide.ppt
Advanced Database Management System_Introduction Slide.pptAdvanced Database Management System_Introduction Slide.ppt
Advanced Database Management System_Introduction Slide.ppt
BikalAdhikari4
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbms
RituBhargava7
 
1. Chapter One.pdf
1. Chapter One.pdf1. Chapter One.pdf
1. Chapter One.pdf
fikadumola
 
INTRODUCTION TO DATABASE-SYSTEMS PRESENTATION.pptx
INTRODUCTION TO DATABASE-SYSTEMS PRESENTATION.pptxINTRODUCTION TO DATABASE-SYSTEMS PRESENTATION.pptx
INTRODUCTION TO DATABASE-SYSTEMS PRESENTATION.pptx
renadmajid789
 
unit 1 introduction to dbms [1-1.2].pptx
unit 1 introduction to dbms [1-1.2].pptxunit 1 introduction to dbms [1-1.2].pptx
unit 1 introduction to dbms [1-1.2].pptx
puneroshni
 

Recently uploaded (20)

Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Operations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdfOperations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdf
Arab Academy for Science, Technology and Maritime Transport
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
Ad

DBS Theory Week 1 including relationships and relational database

  • 1. DR. MARIA KANWAL ASSISTANT PROFESSOR, CS NUTECH, ISLAMABAD Database Systems Lecture 01
  • 3. What are Data? Data are often viewed as the lowest level of abstraction from which information and knowledge are derived. Data can exist in a variety of forms -- as numbers or text on pieces of paper, as bits and bytes stored in electronic memory, or as facts stored in a person's mind. Raw data refers to a collection of numbers, characters, images or other outputs from devices that collect information to convert physical quantities into symbols, that are unprocessed.
  • 5. What is a Database? A database is a shared collection of logically related data that is stored to meet the requirements of different users of an organization Or A database consists of an organized collection of data for one or more multiple uses. Or An organized body of related information. Computer databases typically contain aggregations of data records or files.
  • 6. What is a Database? Databases play a critical role in almost all areas ◦ Banking: all transactions ◦ Airline: reservation, schedules ◦ Universities: registration, grades ◦ Sales: customers, products, purchases ◦ Manufacturing: production, inventory, orders, supply chain ◦ Human resources: employee records, salaries, tax deductions
  • 7. What is a Database? A database can be of any size and of varying complexity. A software system that facilitates the creation and maintenance and use of an electronic database ◦ For example, the list of names and addresses of friends ◦ The book catalog of a large library may contain half a million records ◦ A database of much greater size and complexity is maintained by the government to keep track of the tax information filed by taxpayers.
  • 8. What is a Database? A schema is the definition of a database. It defines the meaning of data. An instance of a database is the collection of data in the database at a particular point of time. For example, in the above snap-shot, the schema is “Student Name, ID, Age, Gender, Entrance Year, Grade”. The remaining rows in the table make up an instance of the database. Student Name ID Age Gender Entrance Year Grade Sadaf Jamal A34455 20 F 1998 A Ali Imtiaz C23444 19 M 1999 B Wasif Ali C73334 19 M 2000 C
  • 9. Definitions Database: ◦ organized collection of logically related data ◦ Database stores data Data: ◦ referred to facts concerning objects and events that could be ◦ recorded and stored on computer media ◦ Types of data ◦ Structured: numbers, text, dates ◦ Example ◦ Students regd No, name, contact No ◦ Unstructured: images, video, documents Information: ◦ data that have been processed to increase knowledge of the person who uses the data. ◦ Example –Consider the following facts 9
  • 10. 10 •Metadata: –data that describes the properties or characteristics of end user data and context of that data –Data about data •Example • By adding a few additional data items and providing some structure, • we recognize a class roster for a particular course.
  • 11. 11 Descriptions of the properties or characteristics of the data, including data types, field sizes, allowable values, and data context
  • 12. What is Database Management System (DBMS)? A DBMS is a collection of software programs to enable users to create, maintain and utilize a database. In database management systems, data files are the files that store the database information, whereas other files, such as index files and data dictionaries, store administrative information, known as metadata. Functions of DBMS ◦ Insert records ◦ Delete records ◦ Update records ◦ Query records
  • 13. What is a DBMSs? Commercial DBMSs Company Product Oracle Oracle 8i, 9i, 10g IBM DB2, Universal Server (from System R, System R*, Starburst) & Informix Microsoft Access, SQL Server Sybase Adaptive Server Informix Dynamic Server NCR Teradata UC Brekeley’s INGRES,M PostgreSQL
  • 14. Database Users End users ◦ Use the database system to achieve some goal Application developers ◦ Write software to allow end users to interface with the database system Database Administrator (DBA) ◦ Designs & manages the database system Database systems programmer ◦ Writes the database software itself
  • 15. Why do we need a DBMS? To reduce application development time Suppose we are given a collection of raw files which occupy 500GB What are the constraints and drawbacks? In case if we are using file systems rather than DBMS
  • 16. What is File System? A file system (often also written as filesystem) is a method of storing and organizing computer files and their data. Essentially, it organizes these files into a database for the storage, organization, manipulation, and retrieval by the computer's operating system. File systems are used on data storage devices such as a hard disks or CD-ROMs to maintain the physical location of the files.
  • 17. System Architecture Applications Operating System (e.g. Windows, Linux) Device Driver Storage Media (Hard Disk, Flash Memory) File System (e.g. DOS, FAT)
  • 18. File Processing System •file processing system refers to the first computer-based approach of handling the commercial or business applications. •This approach met the data processing needs of individual department’s needs rather than overall information needs of the organization. •it is also called a replacement of the manual file system. 18
  • 19. File Processing System •In this system data is stored in permanent system files. •Different application programs are written to extract data from these files and to add record to these files. •No overall map, plan or model guided application growth 19
  • 20. File-Based Systems A decentralized approach was taken, where each department, with the assistance of Data Processing (DP) staff, stored and controlled its own data. Each department access their own files through application programs written specially for them. Each set of departmental application programs handles data entry, file maintenance, and the generation of a fixed set of specific reports. The physical structure and storage of the data files and records are defined in the application code.
  • 22. Disadvantages of File Processing 1. Data redundancy: In File Processing Systems, the same data is often stored in multiple files, which can lead to data redundancy. Data redundancy means that the same data is stored in more than one place, leading to the wastage of storage space and making data maintenance more difficult. 2. Data inconsistency: Due to data redundancy, inconsistencies can occur in the data. If changes are made to one file, these changes must be manually made to all other files containing the same data. If this is not done properly, data inconsistencies can arise. 3. Limited data sharing: File Processing Systems are not designed to share data between applications or users. Each application has its own set of files, and sharing data between applications is difficult and often requires custom coding. 4. Security: File Processing Systems do not have built-in security features to protect data from unauthorized access. Access to files is typically controlled through file permissions, which can be difficult to manage and can lead to security breaches. 5. Lack of flexibility: File Processing Systems are not flexible and cannot easily adapt to changes in the data structure or new requirements. Adding new fields or modifying existing fields requires significant effort and can disrupt existing applications that rely on the data. 6. Limited scalability: File Processing Systems are not scalable and can handle only a limited amount of data. As the amount of data grows, File Processing Systems can become slow and unreliable. 7. Difficult to maintain: File Processing Systems require significant effort to maintain. As the number of files and applications grows, it can become difficult to keep track of which files are being used by which applications and to ensure data consistency.
  • 23. Database Approach Arose because: ◦ Definition of data was embedded in application programs, rather than being stored separately and independently. ◦ No control over access and manipulation of data beyond that imposed by application programs. Result: ◦ the database and Database Management System (DBMS).
  • 24. Database Shared collection of logically related data (and a description of this data), designed to meet the information needs of an organization. System catalog (metadata) provides description of data to enable program–data independence. Logically related data comprises entities, attributes, and relationships of an organization’s information.
  • 26. OS File System Storage Based Approach Files of records –used for data storage ◦ Data redundancy –wastage of space ◦ Maintaining consistency becomes difficult Record structures –hard coded into the programs ◦ Structure modifications –hard to perform Each different data access request (a query) ◦ Performed by a separate program ◦ difficult to anticipate all such requests Creating the system-requires a lot of effort Managing concurrent access and failure recovery are difficult
  • 27. DBMS Approach DBMS ◦ Separation of data and metadata ◦ Flexibility of changing metadata ◦ Program-data independence Data access language ◦ standardized –SQL ◦ ad-hoc query formulation –easy
  • 28. DBMS Approach System development ◦ less effort required ◦ concentration on logical level design is enough ◦ components to organize data storage process queries, manage concurrent access, recovery from failures, manage access control are all available
  • 29. The DATABASE Approach Data models: ◦ capture the nature of and relationships among data ◦ and are used at different levels of abstraction as a database is conceptualized and designed. The effectiveness and efficiency of a database is directly associated with the structure of the database. Various graphical systems exist that convey this structure and are used to produce data models. 29
  • 30. •A data model is made up of entities and relationships. i. Entities • Entity: a “thing” or “object” in the enterprise that is distinguishable from other objects – Described by a set of attributes • Example » CUSTOMER, ORDER » Attribute: Customer Name, Address, Order ID 30
  • 31. ii. Relationships relationship between entities that exists in organizational data. Different types of relationships exist. One to many(1:M) Many to many (M:N) 31
  • 32. The DATABASE Approach Relational model ◦ Entity-Relationship data model (mainly for database design) Object-based data models (Object-oriented and Object-relational) Semi structured data model (XML) Other older models: ◦ Network model ◦ Hierarchical model 32
  • 33. Relational Model Example of tabular data in the relational model Columns Rows
  • 34. 34 What happened to dept_name of instructor and student? Represented diagrammatically by an entity- relationship diagram: Relational Model
  • 35. Database Management System 35 DBMS manages data resources like an operating system manages hardware resources A software system that is used to create, maintain, and provide controlled access to user databases
  • 40. ER Model of DBMS 40
  • 41. Advantages of the Database approach 1. Program Data Independence ◦ Metadata is stored separately from the application program. ◦ Data descriptions are stored in repository. ◦ This allows database to change and evolve without changing application program. 41
  • 42. Advantages of the Database approach contd.. 2. Planned Data Redundancy ◦ Database design attempts to integrate redundant files into a single logical structure. ◦ Each primary fact is recorded in only one place in database. ◦ At times it may be desirable to include some limited redundancy to improve database performance. 42
  • 43. 43 Relationships established in special columns that provide links between tables
  • 44. Advantages of the Database approach contd.. 3. Improved data consistency ◦ By eliminating or controlling redundancy, reduces inconsistencies. 44
  • 45. Advantages of the Database approach contd.. 4. Improved data sharing ◦ Database is designed as a shared corporate resource. ◦ External/internal users are granted permission to use database.(user views) ◦ A user view is a logical description of some portion of the database that is required by a user to perform some task. 45
  • 46. Advantages of the Database approach contd.. 5. Increased productivity of application development ◦ Database reduces the cost and time for developing new business applications. ◦ There are three reasons for it: ◦ Assume database is already implemented, the application developer can concentrate on the specific functions required, without worrying about low level details. ◦ DBMs provides productivity tools such as forms and report generators. ◦ Use of Web services, based on the use of standard Internet Protocols. 46
  • 47. Advantages of the Database approach contd.. 6. Enforcement of standards ◦ Database administration should be granted single point authority and responsibility for enforcing standards. ◦ The standards include naming conventions, data quality standards, and uniform procedures for accessing, updating and protecting data.(Repository) 47
  • 48. Advantages of the Database approach contd.. 7. Improved data quality ◦ is a perception or an assessment of data's fitness to serve its purpose in a given context. ◦ According to report of Data Warehousing Institute (DWI) Data quality problem costs $600 billion to U.S business annually. ◦ The database approach provides a number of tools and processes to improve data quality. ◦ Integrity constraints: rule that cannot be violated by database users 48
  • 49. Advantages of the Database approach contd.. ◦ Data warehouse : a large store of data accumulated from a wide range of sources within a company and used to guide management decisions. ◦ Data warehouse cleans up operational data before they are placed in data warehouse. 49
  • 50. Advantages of the Database approach contd.. 8. Improved data accessibility ◦ Structured Query Language is used to retrieve and process databases. ◦ It is an easy language and end user can easily use this language to interpret databases. 50
  • 51. Advantages of the Database approach contd.. 9. Reduced program maintenance ◦ Stored data changes due to many reasons ◦ Changes such as adding new data items, changing data formats, and so on.. ◦ Data are more independent on application program, so it can accommodate changes easily. 51
  • 52. Advantages of the Database approach contd.. 10. Improved decision support ◦ Purpose of databases is to serve for decision support applications. ◦ For example ◦ Databases to support customer relationship management, ◦ Financial analysis ◦ Supply chain management. 52
  • 53. Components of database environment
  • 54. Components of database environment contd.. 1. Data modeling and design tools o Data modeling and design tools are automated tools used to design databases and application programs. These tools help with creation of data models and in some cases can also help automatically generate the “code” needed to create the database. 2. Repository ◦ A centralized knowledge base for all data definitions, data relationships, screen, and report formats, and other system components. 3. DBMS ◦ Software that is used to create, maintain, and provide controlled access to user databases. OR ◦ A software that handles all access to the database 4. Database ◦ Organized collection of logically related data, usually designed to meet the information needs of multiple users. 5. Application programs ◦ Used to create and maintain the database and provide information to users. 54
  • 55. Components of database environment contd.. 6. User interface ◦ Includes languages, menus and other facilities by which users interact with various components of database. 7. Data and database administrators ◦ Data administrators are persons who are responsible for overall management of data resources in an organization ◦ Database administrators are responsible for physical database design and for managing technical issues in database environment. 8. System developers ◦ Persons such as systems analyst and programmers who design new application programs. 9. End Users ◦ Persons throughout the organization who add, delete, and modify data 55