際際滷

際際滷Share a Scribd company logo
Introduction
to
Database Systems
CS341
C++ and Files
 Why do we need files in programming?
 Files are used to store data
 Data is stored PERMANENTLY
 Files can be used to store Text or binary data
 Data is written or read in the form of input / output operations by
transferring bytes of data
 Steps to use files in your C++ program:
 Determine the type of link required.
 Declare a stream for the desired type of link.
 Attach the desired file to the stream.
 Now process as required
 Close the file-link with stream.
2
What is a Database?
 A set of information held in a computer
 Oxford English Dictionary
 One or more large STRUCTURED sets of
PERSISTANT data, usually associated with software to
update and query the data
 Free On-Line Dictionary of Computing
 A collection of data arranged for ease and speed of
search and retrieval
 Dictionary.com
3
What is a Database (cont.)
 A database is a WELL-ORGANIZED collection of data
that are RELATED in a meaningful way
 A database contains a MODEL of something
 The database contains all the data needed by the
organization
 Several users can access the data in an organization
 Databases are essential to every business
 They are used to
 To maintain internal records
 To present data to customers and clients
 To support commercial processes
4
What is a Database (cont.)
 A database contains a model of something
 How will you model a STUDENT?
 Name ?
 Age ?
 Color of hair ?
 Height ?
 Telephone number ?
 Address ?
 Finger print ?
 Photo ?
5
Examples
 Online Television
 Online streaming service, such as Netflix
 Databases are used to generate a list of TV shows to watch.
 The database tracks an individuals show preferences, and
provide a list of recommended viewing.
 Social Gaming
 Gaming done across social networks is extremely data intensive.
 Gathering individual player information from around the globe
and serving it to players on demand requires a high availability
database software.
 Personal Cloud Storage
 Sync your devices with data on the cloud requires databases
that are able to call up your data at a moments notice
6
Examples (cont.)
 Sports
 Sports fans depend on huge databases full of player statistics.
 This includes game performances, injury reports, and more
 Finances
 Stock market to your local bank use databases
 Tracking the vast amount of information behind the worlds daily
transactions requires extremely powerful databases.
 Organizations
 All organizations need some sort of data in order to do their work
 This data is collected, stored and analyzed using powerful and
far-reaching database services.
7
Examples (cont.)
 Social Media
 Social media platform stores large amount of users information
 This data is used to recommend friends, businesses, products,
and topics to the end user.
 eCommerce
 Any online organization that sells its products uses databases.
 This data is stored in highly secure databases
 Healthcare
 Doctors offices and healthcare organizations store extensive
amounts of patient data for easy accessibility.
 Weather
 Weather predictions depend on many factors.
 These data are collected, stored and analyzed within databases.
8
Data and Information
 Data are RAW FACTS
 Building block of information.
 Data can be a representation of facts, concepts, or instructions
 INFORMATION is obtained by processing data
 Data has to be interpreted to obtain meaningful information
 Data and Information are usually used
interchangeably
 Data in database can be broadly classified into two types
 User Data collection of information stored and needed by the
organization
 Metadata which is the information about the data
9
Data Handling Approaches
 Organizations can use different approaches of Data
Handling
 Common data handling approaches are;
 Manual Approach
 Traditional File Based Approach
 Database Approach
10
Manual Approach
 Manual databases use cards and paper
 Files are used to store information
 Files are labelled and stored in folders and cabinets
 Security is achieved by using Cabinet Lockers
 Insertion and retrieval
 Done by searching for the right cabinet and then for the right file
and information.
 Limitations of the Manual approach
 Error prone
 Difficult to retrieve data and update
 Limited to small size information
 Difficult to related information
 Cross referencing is difficult
11
File-Based Systems
12
File-Based Processing
File-Based Systems (cont.)
 Application programs are responsible for program logic
and data maintenance
 Each program defines and manages its own data
 Data is stored in distinct files provided by OS
 Each file is created and accessed by a separate application
program
 End users can access data via dedicated application
programs only
 Example
 Your C++ program
13
Limitations of File-Based System
The major limitations of a file-based system are:
1. Duplication of Data
2. Data Dependence
3. Incompatible File Formats
4. Separation and Isolation of Data
1. Duplication of Data
 Also termed as Data Redundancy
 The same data being stored more than once by different
programs
 potentially different values and/or different formats for the same item
 Duplication of data leads to loss of data integrity
 Wastage of space
14
Limitations of File-Based System (cont.)
2. Data Dependence
 File structure is defined in the program code
 There is program-data dependence
 Data dependence means the application program depends on a
specific structure of the data
 Data independence is generally preferred as it is more flexible
 Any change in the data structure need to changes the program
as well
 The application program has to be rewritten
15
Limitations of File-Based System (cont.)
3. Incompatible File Formats
 The structure of the file depends on the application programming
language.
 Internal Data Structures are different for different Languages
 Example: The Data type INTEGER is not stored in the same manner by
every programming language
 For example, the structure of the file generated by C# program
may be different from the structure of a file generated by C++
program
 The incompatibility of such data files makes them difficult to be
accessed by different application programs at the same time
16
Limitations of File-Based System (cont.)
4. Separation and Isolation of Data
 Different data is stored in isolated (separate) files.
 It is difficult to manage related data.
 The application programmer must synchronize the processing of
two files to ensure that the correct data are extracted.
 Data distributed in various files may be in different formats hence
it is difficult to share data among different application
17
The Database Approach
18
The Database Approach (cont.)
 Problems of file approach arose because:
 Definition of data was embedded in application programs
 No control over access and manipulation of data beyond that
imposed by application programs
 The DBMS Approach
 A DBMS is a software system that enables users to create,
maintain, and control access to a database
 The same data is shared by different application programs
 Data redundancy is minimized
 Data is stored independent of a specific application programs
 Application can only access the database via the data
management system (DBMS)
19
Database and DBMS
 A Database is a collection of data designed to meet the
information needs of an organization
 Data incudes
 User Data
 A collection of logically related data
 structured data and relationships of an organizations information.
 Meta Data
 A description of the data itself
 The system catalogue provides description of data to enable programdata
independence.
 Database Management System (DBMS)
 A software system that enables users to define, create, maintain,
and control access to the database.
 Application programs interacts with database by issuing an
appropriate request (SQL statement) to the DBMS
20
The Database System Environment
21
Database System Environment (cont.)
 Hardware
 All the necessary input, output , storage and backup devices
 Can range from a PC to a network of computers.
 Software
 DBMS, operating system, network software (if necessary) and
also the application programs
 Data
 User Data: Data used by the organization and
 Metadata: a description of this data
 People
 Different Roles taken by people while designing and using a
Database systems
22
Database Users
 End users
 Use the database system to achieve some goal
 They are unaware of the DBMS
 Access the database based on their access level and demand
 Access is via application programs or pre-defined queries
 Example: Facebook users
 Application Developers / Programmers
 Write software to allow end users to interface with the database
 They study user requirement to design the data structure
(database) and access methods
 Use SQL to interact with the DBMS
 Example: Developers at Facebook
23
Database Users (cont.)
 Database Administrator (DBA)
 Top-level database expert for an organization
 Designs & manages the database system
 Involved in database planning, development, maintenance of
standards policies and procedures
 Database systems programmer
 Writes the database software (DBMS) itself
 Example: System developers at Oracle, Microsoft, IBM
24
The DBMS
 A DBMS (Database Management System)
 is software that is used to maintain and use a database.
 A DBMS is a software system designed to
 store,
 manage, and
 facilitate access to databases.
 A DBMS is general-purpose software
 Meet the needs of as many applications as possible.
 i.e., not application specific.
 The same DBMS (e.g., Oracle, SQLServer, etc.) can be used in
different systems
 A DBMS takes care of storing and accessing data
 Leaving application specific tasks to application programs
25
The DBMS (cont.)
 Features of the DBMS
 Create the database
 Define security rules
 Server-level
 Database-level
 Share data among several users
 Concurrency control
 Add / Remove data
 Edit the data
 Retrieve the data from the database
 Indexing
 Recovery
 Transaction management, etc.
26
Main Objectives of DBMS
 1 Data Availability
 Data are made available to wide variety of users
 Users should have access to the data in a simple manner
 2 Data Integrity
 refers to the correctness of the data in the database.
 3 Data Security
 Only authorized users should have access to the data
 Different levels of security
 4 Data Independence
 DBMS provides an abstract view of how the data is stored in
the database.
 The system hides certain details of how the data are stored and
maintained
27
Advantages of DBMSs
 Control of data redundancy
 Data consistency
 Sharing of data
 Improved data integrity
 Improved security
 Enforcement of standards
 Program-data independence
 Increased concurrency
 Improved backup and recovery
 Reduced application development time
 Simple data administration
28
Disadvantages of DBMSs
 Complexity
 Size
 Cost of DBMS
 Additional hardware costs
 Cost of conversion
 Performance
 Higher impact of a failure
29

More Related Content

Similar to Comprehensive Guide to Effective Introduction to Database Systems Principles (20)

1. Chapter One.pdf
1. Chapter One.pdf1. Chapter One.pdf
1. Chapter One.pdf
fikadumola
D I T211 Chapter 1 1
D I T211    Chapter 1 1D I T211    Chapter 1 1
D I T211 Chapter 1 1
askme
D I T211 Chapter 1
D I T211    Chapter 1D I T211    Chapter 1
D I T211 Chapter 1
askme
Role of Database susytem AICT (lec# 4).pptx
Role of Database susytem AICT (lec# 4).pptxRole of Database susytem AICT (lec# 4).pptx
Role of Database susytem AICT (lec# 4).pptx
hinasattar5
Database Systems
Database SystemsDatabase Systems
Database Systems
Usman Tariq
DBS Theory Week 1 including relationships and relational database
DBS Theory Week 1 including relationships and relational databaseDBS Theory Week 1 including relationships and relational database
DBS Theory Week 1 including relationships and relational database
walaahuluu
Database & dbms
Database & dbmsDatabase & dbms
Database & dbms
Diana Diana
Introduction to databases
Introduction to databasesIntroduction to databases
Introduction to databases
Aashima Wadhwa
DATABASE SYSTEMS VS ROUTINE FILE SYSTEMS
DATABASE SYSTEMS VS ROUTINE FILE SYSTEMSDATABASE SYSTEMS VS ROUTINE FILE SYSTEMS
DATABASE SYSTEMS VS ROUTINE FILE SYSTEMS
MunawarAhmad22
database chap 1 and 2.pptx
database chap 1 and 2.pptxdatabase chap 1 and 2.pptx
database chap 1 and 2.pptx
Eliasasefa
Database Systems
Database SystemsDatabase Systems
Database Systems
Usman Tariq
Mis chapter 7 database systems
Mis chapter 7 database systemsMis chapter 7 database systems
Mis chapter 7 database systems
Filmon Habtemichael Tesfai
Chap1-Introduction to database systems.ppt
Chap1-Introduction to database systems.pptChap1-Introduction to database systems.ppt
Chap1-Introduction to database systems.ppt
LisaMalar
1-introduction to DB.pdf
1-introduction to DB.pdf1-introduction to DB.pdf
1-introduction to DB.pdf
MuniraALmogren
Database
DatabaseDatabase
Database
Thamae Mohapi
Ch-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdfCh-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdf
MrjJoker1
Database Management System Introduction
Database Management System IntroductionDatabase Management System Introduction
Database Management System Introduction
Smriti Jain
Dbms
DbmsDbms
Dbms
Lakshmi Sarvani Videla
Database System Concepts
Database System ConceptsDatabase System Concepts
Database System Concepts
Ranilesh Raveendran
Dbms unit01
Dbms unit01Dbms unit01
Dbms unit01
Ila Chandana
1. Chapter One.pdf
1. Chapter One.pdf1. Chapter One.pdf
1. Chapter One.pdf
fikadumola
D I T211 Chapter 1 1
D I T211    Chapter 1 1D I T211    Chapter 1 1
D I T211 Chapter 1 1
askme
D I T211 Chapter 1
D I T211    Chapter 1D I T211    Chapter 1
D I T211 Chapter 1
askme
Role of Database susytem AICT (lec# 4).pptx
Role of Database susytem AICT (lec# 4).pptxRole of Database susytem AICT (lec# 4).pptx
Role of Database susytem AICT (lec# 4).pptx
hinasattar5
Database Systems
Database SystemsDatabase Systems
Database Systems
Usman Tariq
DBS Theory Week 1 including relationships and relational database
DBS Theory Week 1 including relationships and relational databaseDBS Theory Week 1 including relationships and relational database
DBS Theory Week 1 including relationships and relational database
walaahuluu
Database & dbms
Database & dbmsDatabase & dbms
Database & dbms
Diana Diana
Introduction to databases
Introduction to databasesIntroduction to databases
Introduction to databases
Aashima Wadhwa
DATABASE SYSTEMS VS ROUTINE FILE SYSTEMS
DATABASE SYSTEMS VS ROUTINE FILE SYSTEMSDATABASE SYSTEMS VS ROUTINE FILE SYSTEMS
DATABASE SYSTEMS VS ROUTINE FILE SYSTEMS
MunawarAhmad22
database chap 1 and 2.pptx
database chap 1 and 2.pptxdatabase chap 1 and 2.pptx
database chap 1 and 2.pptx
Eliasasefa
Database Systems
Database SystemsDatabase Systems
Database Systems
Usman Tariq
Chap1-Introduction to database systems.ppt
Chap1-Introduction to database systems.pptChap1-Introduction to database systems.ppt
Chap1-Introduction to database systems.ppt
LisaMalar
1-introduction to DB.pdf
1-introduction to DB.pdf1-introduction to DB.pdf
1-introduction to DB.pdf
MuniraALmogren
Ch-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdfCh-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdf
MrjJoker1
Database Management System Introduction
Database Management System IntroductionDatabase Management System Introduction
Database Management System Introduction
Smriti Jain

Recently uploaded (20)

EDL 290F Week 5 - Facing Headwinds and Hairpin Turns (2025).pdf
EDL 290F Week 5  - Facing Headwinds and Hairpin Turns (2025).pdfEDL 290F Week 5  - Facing Headwinds and Hairpin Turns (2025).pdf
EDL 290F Week 5 - Facing Headwinds and Hairpin Turns (2025).pdf
Liz Walsh-Trevino
Unit No 4- Chemotherapy of Malignancy.pptx
Unit No  4- Chemotherapy of Malignancy.pptxUnit No  4- Chemotherapy of Malignancy.pptx
Unit No 4- Chemotherapy of Malignancy.pptx
Ashish Umale
Quizzitch Cup_Sports Quiz 2025_Prelims.pptx
Quizzitch Cup_Sports Quiz 2025_Prelims.pptxQuizzitch Cup_Sports Quiz 2025_Prelims.pptx
Quizzitch Cup_Sports Quiz 2025_Prelims.pptx
Anand Kumar
Chapter 6. Business and Corporate Strategy Formulation.pdf
Chapter 6. Business and Corporate Strategy Formulation.pdfChapter 6. Business and Corporate Strategy Formulation.pdf
Chapter 6. Business and Corporate Strategy Formulation.pdf
Rommel Regala
General Quiz at ChakraView 2025 | Amlan Sarkar | Ashoka Univeristy | Prelims ...
General Quiz at ChakraView 2025 | Amlan Sarkar | Ashoka Univeristy | Prelims ...General Quiz at ChakraView 2025 | Amlan Sarkar | Ashoka Univeristy | Prelims ...
General Quiz at ChakraView 2025 | Amlan Sarkar | Ashoka Univeristy | Prelims ...
Amlan Sarkar
Pass SAP C_C4H47_2503 in 2025 | Latest Exam Questions & Study Material
Pass SAP C_C4H47_2503 in 2025 | Latest Exam Questions & Study MaterialPass SAP C_C4H47_2503 in 2025 | Latest Exam Questions & Study Material
Pass SAP C_C4H47_2503 in 2025 | Latest Exam Questions & Study Material
Jenny408767
MIPLM subject matter expert Nicos Raftis
MIPLM subject matter expert Nicos RaftisMIPLM subject matter expert Nicos Raftis
MIPLM subject matter expert Nicos Raftis
MIPLM
Gold Spot Dairy Store Jordan Minnesota 55352
Gold Spot Dairy Store Jordan Minnesota 55352Gold Spot Dairy Store Jordan Minnesota 55352
Gold Spot Dairy Store Jordan Minnesota 55352
Forklift Trucks in Minnesota
Week 6 - EDL 290F - No Drop Ride (2025).pdf
Week 6 - EDL 290F - No Drop Ride (2025).pdfWeek 6 - EDL 290F - No Drop Ride (2025).pdf
Week 6 - EDL 290F - No Drop Ride (2025).pdf
Liz Walsh-Trevino
MIPLM subject matter expert Sascha Kamhuber
MIPLM subject matter expert Sascha KamhuberMIPLM subject matter expert Sascha Kamhuber
MIPLM subject matter expert Sascha Kamhuber
MIPLM
The basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxThe basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptx
heathfieldcps1
EDL 290F Week 4 - Group Ride (2025).pdf
EDL 290F Week 4  - Group Ride (2025).pdfEDL 290F Week 4  - Group Ride (2025).pdf
EDL 290F Week 4 - Group Ride (2025).pdf
Liz Walsh-Trevino
Design approaches and ethical challenges in Artificial Intelligence tools for...
Design approaches and ethical challenges in Artificial Intelligence tools for...Design approaches and ethical challenges in Artificial Intelligence tools for...
Design approaches and ethical challenges in Artificial Intelligence tools for...
Yannis
How to Install Odoo 18 with Pycharm - Odoo 18 際際滷s
How to Install Odoo 18 with Pycharm - Odoo 18 際際滷sHow to Install Odoo 18 with Pycharm - Odoo 18 際際滷s
How to Install Odoo 18 with Pycharm - Odoo 18 際際滷s
Celine George
20250402 ACCA TeamScienceAIEra 20250402 v10.pptx
20250402 ACCA TeamScienceAIEra 20250402 v10.pptx20250402 ACCA TeamScienceAIEra 20250402 v10.pptx
20250402 ACCA TeamScienceAIEra 20250402 v10.pptx
home
3. AI Trust Layer, Governance Explainability, Security & Compliance.pdf
3. AI Trust Layer, Governance  Explainability, Security & Compliance.pdf3. AI Trust Layer, Governance  Explainability, Security & Compliance.pdf
3. AI Trust Layer, Governance Explainability, Security & Compliance.pdf
Mukesh Kala
Yale VMOC Special Report - Measles Outbreak Southwest US 3-30-2025 FINAL v2...
Yale VMOC Special Report - Measles Outbreak  Southwest US 3-30-2025  FINAL v2...Yale VMOC Special Report - Measles Outbreak  Southwest US 3-30-2025  FINAL v2...
Yale VMOC Special Report - Measles Outbreak Southwest US 3-30-2025 FINAL v2...
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
Marketing is Everything in the Beauty Business! 憓 Talent gets you in the ...
 Marketing is Everything in the Beauty Business! 憓 Talent gets you in the ... Marketing is Everything in the Beauty Business! 憓 Talent gets you in the ...
Marketing is Everything in the Beauty Business! 憓 Talent gets you in the ...
coreylewis960
Studying and Notetaking: Some Suggestions
Studying and Notetaking: Some SuggestionsStudying and Notetaking: Some Suggestions
Studying and Notetaking: Some Suggestions
Damian T. Gordon
A-Z GENERAL QUIZ | THE QUIZ CLUB OF PSGCAS | 14TH MARCH 2025.pptx
A-Z GENERAL QUIZ | THE QUIZ CLUB OF PSGCAS | 14TH MARCH 2025.pptxA-Z GENERAL QUIZ | THE QUIZ CLUB OF PSGCAS | 14TH MARCH 2025.pptx
A-Z GENERAL QUIZ | THE QUIZ CLUB OF PSGCAS | 14TH MARCH 2025.pptx
Quiz Club of PSG College of Arts & Science
EDL 290F Week 5 - Facing Headwinds and Hairpin Turns (2025).pdf
EDL 290F Week 5  - Facing Headwinds and Hairpin Turns (2025).pdfEDL 290F Week 5  - Facing Headwinds and Hairpin Turns (2025).pdf
EDL 290F Week 5 - Facing Headwinds and Hairpin Turns (2025).pdf
Liz Walsh-Trevino
Unit No 4- Chemotherapy of Malignancy.pptx
Unit No  4- Chemotherapy of Malignancy.pptxUnit No  4- Chemotherapy of Malignancy.pptx
Unit No 4- Chemotherapy of Malignancy.pptx
Ashish Umale
Quizzitch Cup_Sports Quiz 2025_Prelims.pptx
Quizzitch Cup_Sports Quiz 2025_Prelims.pptxQuizzitch Cup_Sports Quiz 2025_Prelims.pptx
Quizzitch Cup_Sports Quiz 2025_Prelims.pptx
Anand Kumar
Chapter 6. Business and Corporate Strategy Formulation.pdf
Chapter 6. Business and Corporate Strategy Formulation.pdfChapter 6. Business and Corporate Strategy Formulation.pdf
Chapter 6. Business and Corporate Strategy Formulation.pdf
Rommel Regala
General Quiz at ChakraView 2025 | Amlan Sarkar | Ashoka Univeristy | Prelims ...
General Quiz at ChakraView 2025 | Amlan Sarkar | Ashoka Univeristy | Prelims ...General Quiz at ChakraView 2025 | Amlan Sarkar | Ashoka Univeristy | Prelims ...
General Quiz at ChakraView 2025 | Amlan Sarkar | Ashoka Univeristy | Prelims ...
Amlan Sarkar
Pass SAP C_C4H47_2503 in 2025 | Latest Exam Questions & Study Material
Pass SAP C_C4H47_2503 in 2025 | Latest Exam Questions & Study MaterialPass SAP C_C4H47_2503 in 2025 | Latest Exam Questions & Study Material
Pass SAP C_C4H47_2503 in 2025 | Latest Exam Questions & Study Material
Jenny408767
MIPLM subject matter expert Nicos Raftis
MIPLM subject matter expert Nicos RaftisMIPLM subject matter expert Nicos Raftis
MIPLM subject matter expert Nicos Raftis
MIPLM
Week 6 - EDL 290F - No Drop Ride (2025).pdf
Week 6 - EDL 290F - No Drop Ride (2025).pdfWeek 6 - EDL 290F - No Drop Ride (2025).pdf
Week 6 - EDL 290F - No Drop Ride (2025).pdf
Liz Walsh-Trevino
MIPLM subject matter expert Sascha Kamhuber
MIPLM subject matter expert Sascha KamhuberMIPLM subject matter expert Sascha Kamhuber
MIPLM subject matter expert Sascha Kamhuber
MIPLM
The basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxThe basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptx
heathfieldcps1
EDL 290F Week 4 - Group Ride (2025).pdf
EDL 290F Week 4  - Group Ride (2025).pdfEDL 290F Week 4  - Group Ride (2025).pdf
EDL 290F Week 4 - Group Ride (2025).pdf
Liz Walsh-Trevino
Design approaches and ethical challenges in Artificial Intelligence tools for...
Design approaches and ethical challenges in Artificial Intelligence tools for...Design approaches and ethical challenges in Artificial Intelligence tools for...
Design approaches and ethical challenges in Artificial Intelligence tools for...
Yannis
How to Install Odoo 18 with Pycharm - Odoo 18 際際滷s
How to Install Odoo 18 with Pycharm - Odoo 18 際際滷sHow to Install Odoo 18 with Pycharm - Odoo 18 際際滷s
How to Install Odoo 18 with Pycharm - Odoo 18 際際滷s
Celine George
20250402 ACCA TeamScienceAIEra 20250402 v10.pptx
20250402 ACCA TeamScienceAIEra 20250402 v10.pptx20250402 ACCA TeamScienceAIEra 20250402 v10.pptx
20250402 ACCA TeamScienceAIEra 20250402 v10.pptx
home
3. AI Trust Layer, Governance Explainability, Security & Compliance.pdf
3. AI Trust Layer, Governance  Explainability, Security & Compliance.pdf3. AI Trust Layer, Governance  Explainability, Security & Compliance.pdf
3. AI Trust Layer, Governance Explainability, Security & Compliance.pdf
Mukesh Kala
Marketing is Everything in the Beauty Business! 憓 Talent gets you in the ...
 Marketing is Everything in the Beauty Business! 憓 Talent gets you in the ... Marketing is Everything in the Beauty Business! 憓 Talent gets you in the ...
Marketing is Everything in the Beauty Business! 憓 Talent gets you in the ...
coreylewis960
Studying and Notetaking: Some Suggestions
Studying and Notetaking: Some SuggestionsStudying and Notetaking: Some Suggestions
Studying and Notetaking: Some Suggestions
Damian T. Gordon

Comprehensive Guide to Effective Introduction to Database Systems Principles

  • 2. C++ and Files Why do we need files in programming? Files are used to store data Data is stored PERMANENTLY Files can be used to store Text or binary data Data is written or read in the form of input / output operations by transferring bytes of data Steps to use files in your C++ program: Determine the type of link required. Declare a stream for the desired type of link. Attach the desired file to the stream. Now process as required Close the file-link with stream. 2
  • 3. What is a Database? A set of information held in a computer Oxford English Dictionary One or more large STRUCTURED sets of PERSISTANT data, usually associated with software to update and query the data Free On-Line Dictionary of Computing A collection of data arranged for ease and speed of search and retrieval Dictionary.com 3
  • 4. What is a Database (cont.) A database is a WELL-ORGANIZED collection of data that are RELATED in a meaningful way A database contains a MODEL of something The database contains all the data needed by the organization Several users can access the data in an organization Databases are essential to every business They are used to To maintain internal records To present data to customers and clients To support commercial processes 4
  • 5. What is a Database (cont.) A database contains a model of something How will you model a STUDENT? Name ? Age ? Color of hair ? Height ? Telephone number ? Address ? Finger print ? Photo ? 5
  • 6. Examples Online Television Online streaming service, such as Netflix Databases are used to generate a list of TV shows to watch. The database tracks an individuals show preferences, and provide a list of recommended viewing. Social Gaming Gaming done across social networks is extremely data intensive. Gathering individual player information from around the globe and serving it to players on demand requires a high availability database software. Personal Cloud Storage Sync your devices with data on the cloud requires databases that are able to call up your data at a moments notice 6
  • 7. Examples (cont.) Sports Sports fans depend on huge databases full of player statistics. This includes game performances, injury reports, and more Finances Stock market to your local bank use databases Tracking the vast amount of information behind the worlds daily transactions requires extremely powerful databases. Organizations All organizations need some sort of data in order to do their work This data is collected, stored and analyzed using powerful and far-reaching database services. 7
  • 8. Examples (cont.) Social Media Social media platform stores large amount of users information This data is used to recommend friends, businesses, products, and topics to the end user. eCommerce Any online organization that sells its products uses databases. This data is stored in highly secure databases Healthcare Doctors offices and healthcare organizations store extensive amounts of patient data for easy accessibility. Weather Weather predictions depend on many factors. These data are collected, stored and analyzed within databases. 8
  • 9. Data and Information Data are RAW FACTS Building block of information. Data can be a representation of facts, concepts, or instructions INFORMATION is obtained by processing data Data has to be interpreted to obtain meaningful information Data and Information are usually used interchangeably Data in database can be broadly classified into two types User Data collection of information stored and needed by the organization Metadata which is the information about the data 9
  • 10. Data Handling Approaches Organizations can use different approaches of Data Handling Common data handling approaches are; Manual Approach Traditional File Based Approach Database Approach 10
  • 11. Manual Approach Manual databases use cards and paper Files are used to store information Files are labelled and stored in folders and cabinets Security is achieved by using Cabinet Lockers Insertion and retrieval Done by searching for the right cabinet and then for the right file and information. Limitations of the Manual approach Error prone Difficult to retrieve data and update Limited to small size information Difficult to related information Cross referencing is difficult 11
  • 13. File-Based Systems (cont.) Application programs are responsible for program logic and data maintenance Each program defines and manages its own data Data is stored in distinct files provided by OS Each file is created and accessed by a separate application program End users can access data via dedicated application programs only Example Your C++ program 13
  • 14. Limitations of File-Based System The major limitations of a file-based system are: 1. Duplication of Data 2. Data Dependence 3. Incompatible File Formats 4. Separation and Isolation of Data 1. Duplication of Data Also termed as Data Redundancy The same data being stored more than once by different programs potentially different values and/or different formats for the same item Duplication of data leads to loss of data integrity Wastage of space 14
  • 15. Limitations of File-Based System (cont.) 2. Data Dependence File structure is defined in the program code There is program-data dependence Data dependence means the application program depends on a specific structure of the data Data independence is generally preferred as it is more flexible Any change in the data structure need to changes the program as well The application program has to be rewritten 15
  • 16. Limitations of File-Based System (cont.) 3. Incompatible File Formats The structure of the file depends on the application programming language. Internal Data Structures are different for different Languages Example: The Data type INTEGER is not stored in the same manner by every programming language For example, the structure of the file generated by C# program may be different from the structure of a file generated by C++ program The incompatibility of such data files makes them difficult to be accessed by different application programs at the same time 16
  • 17. Limitations of File-Based System (cont.) 4. Separation and Isolation of Data Different data is stored in isolated (separate) files. It is difficult to manage related data. The application programmer must synchronize the processing of two files to ensure that the correct data are extracted. Data distributed in various files may be in different formats hence it is difficult to share data among different application 17
  • 19. The Database Approach (cont.) Problems of file approach arose because: Definition of data was embedded in application programs No control over access and manipulation of data beyond that imposed by application programs The DBMS Approach A DBMS is a software system that enables users to create, maintain, and control access to a database The same data is shared by different application programs Data redundancy is minimized Data is stored independent of a specific application programs Application can only access the database via the data management system (DBMS) 19
  • 20. Database and DBMS A Database is a collection of data designed to meet the information needs of an organization Data incudes User Data A collection of logically related data structured data and relationships of an organizations information. Meta Data A description of the data itself The system catalogue provides description of data to enable programdata independence. Database Management System (DBMS) A software system that enables users to define, create, maintain, and control access to the database. Application programs interacts with database by issuing an appropriate request (SQL statement) to the DBMS 20
  • 21. The Database System Environment 21
  • 22. Database System Environment (cont.) Hardware All the necessary input, output , storage and backup devices Can range from a PC to a network of computers. Software DBMS, operating system, network software (if necessary) and also the application programs Data User Data: Data used by the organization and Metadata: a description of this data People Different Roles taken by people while designing and using a Database systems 22
  • 23. Database Users End users Use the database system to achieve some goal They are unaware of the DBMS Access the database based on their access level and demand Access is via application programs or pre-defined queries Example: Facebook users Application Developers / Programmers Write software to allow end users to interface with the database They study user requirement to design the data structure (database) and access methods Use SQL to interact with the DBMS Example: Developers at Facebook 23
  • 24. Database Users (cont.) Database Administrator (DBA) Top-level database expert for an organization Designs & manages the database system Involved in database planning, development, maintenance of standards policies and procedures Database systems programmer Writes the database software (DBMS) itself Example: System developers at Oracle, Microsoft, IBM 24
  • 25. The DBMS A DBMS (Database Management System) is software that is used to maintain and use a database. A DBMS is a software system designed to store, manage, and facilitate access to databases. A DBMS is general-purpose software Meet the needs of as many applications as possible. i.e., not application specific. The same DBMS (e.g., Oracle, SQLServer, etc.) can be used in different systems A DBMS takes care of storing and accessing data Leaving application specific tasks to application programs 25
  • 26. The DBMS (cont.) Features of the DBMS Create the database Define security rules Server-level Database-level Share data among several users Concurrency control Add / Remove data Edit the data Retrieve the data from the database Indexing Recovery Transaction management, etc. 26
  • 27. Main Objectives of DBMS 1 Data Availability Data are made available to wide variety of users Users should have access to the data in a simple manner 2 Data Integrity refers to the correctness of the data in the database. 3 Data Security Only authorized users should have access to the data Different levels of security 4 Data Independence DBMS provides an abstract view of how the data is stored in the database. The system hides certain details of how the data are stored and maintained 27
  • 28. Advantages of DBMSs Control of data redundancy Data consistency Sharing of data Improved data integrity Improved security Enforcement of standards Program-data independence Increased concurrency Improved backup and recovery Reduced application development time Simple data administration 28
  • 29. Disadvantages of DBMSs Complexity Size Cost of DBMS Additional hardware costs Cost of conversion Performance Higher impact of a failure 29