SlideShare a Scribd company logo
LEARNING OBJECTIVES
1. What is a database system, and how does it differ from file-oriented systems?
2. What is a relational database system?
3. How do you design a well-structured set of tables in a relational database?
4. How do you query a relational database system?
Databases and Files
1. What is the nature of data stored in an accounting system
For financial reporting, an accounting system must necessarily store data about :
• Assets
• Liabilities and equity
• revenue and expense transactions.
• audit, tax, and control information needs.
• information about budgets, transactions in progress
File-Oriented Systems
In early processing systems, an organization’s information was
stored as groups of records in separate files. These file
processing systems constituted of a few data files and many
application programs. Each file called a flat file contained and
processed information for one specific function, such as
accounting or inventory.
Limitations of File Processing System:
• Separated and Isolated Data: To make a decision, a user
might need data from two separate files.
• Data Redundancy: Often, the same information was stored
in more than one file. the replication of data caused loss of
data integrity. no one would know which information was
correct.
• Difficulty in representing data from user’s view: it was
difficult to determine relationships between isolated data in
order to meet user requirements
Database Systems
• Databases were developed to address the proliferation of
redundant data in the files of systems using the file approach.
• The goal of the database approach is to create an organization-
wide database that stores all of the data needed to operate the
business while linking data across various functions and
eliminating redundancy
• In summary, a database is an organized collection of data about a
set of entities stored with as little data redundancy as possible. A
database’s value comes from the consolidation of data into a
common pool that can serve a variety of users and data
processing applications.
Chapter 4 Chapter Relational DB - Copy.pptx
The Advantages of Database Systems
• DBMS offers a variety of techniques to store & retrieve data
• Uniform administration procedures for data
• A DBMS uses various powerful functions to store and retrieve data efficiently.
• Offers Data Integrity and Security
• The DBMS implies integrity constraints to get a high level of protection against prohibited
access to data.
• Reduced Application Development Time
• Consume lesser space
• Reduction of redundancy.
• Data independence.
A database Management System
(DBMS)
• is the program that manages and controls the data and the
interfaces between the data and the application programs that
use the data stored in the database
• The database administrator (DBA) is responsible for coordinating,
controlling, and managing the database
LOGICAL AND PHYSICAL VIEWS OF DATA
The logical view is how people conceptually organize and understand the relationships among data
items.
For example : a sales manager views all customer information as being stored in a table.
The physical view refers to the way data are physically arranged and stored in the
computer system.
The DBMS allows users to access, query, or update the database without reference to how or where
data are physically stored.
Separating the logical and physical views of data also means that users can change their logical view
of data without changing the way data are physically stored
The Database approach provides two separate views of the data: the physical view and the
logical view
A schema
Physical Schema
 It is also known as Internal level.
 This is the lowest level of the architecture.
 This data is stored in the external hard drives in the form of bits.
 This level describes how the data actually stored in the storage device.
 This physical level also discuess encryption techniques.
 This level is also responsible for allocating space of the data.
Conceptual Schema
 It is also known as logical level.
 The conceptual level is a higher level than the physical level.
 This level is maintained by DBA(database administrator).
 The whole design of the database such as relationship among data ,schema of data etc.are
described in this level.
 It is the middle level between external or internal levels.
External Schema
It is also known as view level.
 This is highest level architecture and closest to the user.
 The user doesn’t need to know the database schema details such as data structure, table
definition etc.
 External level is related to the data which is viewed by individual end users.
A data dictionary
A data dictionary can be defined as a collection of metadata such as object name, data
type, size, classification, and relationships with other data assets. A data dictionary acts
as a reference guide on a dataset.
DBMS Language
A DBMS has several languages :
The data definition language (DDL) :
 builds the data dictionary
 creates the database
 describes logical views for each user, and specifies record or field security constraints
Examples of DDL commands in structured query language (SQL) would be the CREATE, DROP,
and ALTER statements.
DBMS Language
A DBMS has several languages :
The data manipulation language (DML)
changes database content, including data, updates, insertions, and deletions
SQL examples
would include INSERT, UPDATE, TRUNCATE, and DROP statements
DBMS Language
A DBMS has several languages :
The data query language (DQL)
is a high-level, English-like language that contains powerful, easy-to-use commands that
enable users to retrieve, sort, order, and display data.
SQL examples
the SELECT statement in the SQL language
Relational data model
A two-dimensional table representation of data; each row represents a unique entity (record)
and each column is a field where record attributes are stored
Inventory Relation
Attribute/Column Name
Row/Record
/Tuple
Filed
Type Of Attribute
Simple Attributes
The Student is an entity represented by a rectangle
It consists of attributes: Roll_no, class, and Age.
We can't further subdivide the Roll_no attribute and even the other two attributes into sub-
attributes.
These attributes are also known as atomic attributes
Composite Attributes
The Student is an entity represented by a rectangle
It consists of attributes: Roll_no, class, and Age.
We can't further subdivide the Roll_no attribute and even the other two attributes into sub-
attributes.
These attributes are also known as atomic attributes
Basic Requirements Of A Relational
Database
We now turn to the guidelines used to develop a properly structured relational
database.
 . Every column in a row must be single valued
 Primary keys cannot be null.
 Foreign keys, if not null, must have values that correspond to the value of a primary key in
another table
 All nonkey attributes in a table must describe a characteristic of the object identified by the
primary key
These four constraints produce a well-structured (normalized) database in which
data are
consistent and data redundancy is minimized and controlled.
Two Approaches to Database
Desgine
 normalization
begins by assuming that everything is initially stored in one large table. Rules are then
followed to decompose that initial table into a set of tables that are called third normal form
(3NF)
 semantic data modeling
the designer uses knowledge of business processes and information needs to create a
diagram that shows what to include in the database. This diagram is used to create a set of
relational tables that are already in 3NF
Database Systems And The Future of Accounting
 Database systems expand accounting’s ability to produce real-time dynamic reports of all aspects
of the accounting equation
 Databases are capturing increasing amounts of transaction data beyond what was captured
through accounting journals and ledgers in double entry accounting.
 Presently, data about even the smallest movements of materials in production, inventory
defects, machine operations, and employee effort can be captured in real time.
 Management can access the information they need whenever they want it. For example, tables
storing information about assets can include historical costs as well as current replacement
costs, market values, and real-time utilization
Chapter Quiz
1. What is each row in a relational database table called?
a. tuple
b. relation
c. attribute
d. anomaly
2. An employee database that consolidates payroll, personnel, and job skills master files is referred to
as
a. data integration.
b. data sharing.
c. data independence.
Chapter Quiz
3. Which of the following describes a situation where non-primary key items are stored multiple
times, leading to data inconsistencies?
a. update anomaly
b. insert anomaly
c. delete anomaly
4. The internal-level schema of a database system consists of an individual user’s view of portions
of a database and is also called a subschema.
a. True
b. False
Chapter Quiz
5. Which of the following is an individual user’s view of the database?
a. internal-level schema
b. conceptual-level schema
c. external-level schema
d. logical-level schema
6. Which of the following would managers most likely use to retrieve information about sales
during the month of October?
a. DQL
b. DML
c. DSL
d. DDL
Chapter Quiz
7. Which of the following is not considered an advantage of a database system?
a. Data are independent of the programs that use them.
b. Integrated data can be shared with authorized users.
c. Data can be stored multiple times in multiple locations.
d. Master files are consolidated and accessible to many application programs.
8. The constraint that all foreign keys must have either null values or the value of a primary key in
another table is referred to as which of the following?
a. referential integrity rule
b. entity integrity rule
c. foreign key value rule
d. null value rule
Chapter Quiz
9. The constraint that all primary keys must have non-null data values is referred to as which of the
following?
a. referential integrity rule
b. entity integrity rule
c. normalization rule
d. relational data model rule
10.Which of the following is not a basic requirement of a relational database?
a. Primary keys cannot be null.
b. Every column in a row must be single valued.
c. Foreign keys cannot be null.
d. All non-key attributes in a table must describe a characteristic of the object identified by the
primary key
Chapter 4 Chapter Relational DB - Copy.pptx
Ad

More Related Content

Similar to Chapter 4 Chapter Relational DB - Copy.pptx (20)

Introduction to Databases and Transactions
Introduction to Databases and TransactionsIntroduction to Databases and Transactions
Introduction to Databases and Transactions
نبيله نواز
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
ndegwajeremiah8842
 
Ch1_Intro-95(1).ppt
Ch1_Intro-95(1).pptCh1_Intro-95(1).ppt
Ch1_Intro-95(1).ppt
RAJULKUMARSUTHAR
 
DBMS-material for b.tech students to learn
DBMS-material for b.tech students to learnDBMS-material for b.tech students to learn
DBMS-material for b.tech students to learn
Rajasekhar364622
 
dbms-semester-IV SQL CHARTS and notes 3rd sem
dbms-semester-IV SQL CHARTS and notes 3rd semdbms-semester-IV SQL CHARTS and notes 3rd sem
dbms-semester-IV SQL CHARTS and notes 3rd sem
FaheemAhmed989764
 
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyocUnit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
dagadsai0330
 
Unit 2 DATABASE ESSENTIALS.pptx
Unit 2 DATABASE ESSENTIALS.pptxUnit 2 DATABASE ESSENTIALS.pptx
Unit 2 DATABASE ESSENTIALS.pptx
Nirmalavenkatachalam
 
Ch-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdfCh-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdf
MrjJoker1
 
Lecture 1 to 3intro to normalization in database
Lecture 1 to 3intro to  normalization in databaseLecture 1 to 3intro to  normalization in database
Lecture 1 to 3intro to normalization in database
maqsoodahmedbscsfkhp
 
D I T211 Chapter 1
D I T211    Chapter 1D I T211    Chapter 1
D I T211 Chapter 1
askme
 
Dbms module i
Dbms module iDbms module i
Dbms module i
SANTOSH RATH
 
D I T211 Chapter 1 1
D I T211    Chapter 1 1D I T211    Chapter 1 1
D I T211 Chapter 1 1
askme
 
Dbms mca-section a
Dbms mca-section aDbms mca-section a
Dbms mca-section a
Vaibhav Kathuria
 
DBMS.pptx
DBMS.pptxDBMS.pptx
DBMS.pptx
panderohit000
 
MS-CIT Unit 9.pptx
MS-CIT Unit 9.pptxMS-CIT Unit 9.pptx
MS-CIT Unit 9.pptx
SHRIBALAJIINFOTECH
 
Database System
Database SystemDatabase System
Database System
Hasaka Sasaranga
 
Database systems Handbook 2V.pdf
Database systems Handbook 2V.pdfDatabase systems Handbook 2V.pdf
Database systems Handbook 2V.pdf
Bahria University Islamabad, Pakistan
 
database management systems for ug students
database management systems for ug studentsdatabase management systems for ug students
database management systems for ug students
veenashinde8
 
CHAPTER 1 Database system architecture.pptx
CHAPTER 1 Database system architecture.pptxCHAPTER 1 Database system architecture.pptx
CHAPTER 1 Database system architecture.pptx
kashishy2
 
Dbms unit i
Dbms unit iDbms unit i
Dbms unit i
Arnav Chowdhury
 
Introduction to Databases and Transactions
Introduction to Databases and TransactionsIntroduction to Databases and Transactions
Introduction to Databases and Transactions
نبيله نواز
 
DBMS-material for b.tech students to learn
DBMS-material for b.tech students to learnDBMS-material for b.tech students to learn
DBMS-material for b.tech students to learn
Rajasekhar364622
 
dbms-semester-IV SQL CHARTS and notes 3rd sem
dbms-semester-IV SQL CHARTS and notes 3rd semdbms-semester-IV SQL CHARTS and notes 3rd sem
dbms-semester-IV SQL CHARTS and notes 3rd sem
FaheemAhmed989764
 
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyocUnit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
dagadsai0330
 
Ch-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdfCh-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdf
MrjJoker1
 
Lecture 1 to 3intro to normalization in database
Lecture 1 to 3intro to  normalization in databaseLecture 1 to 3intro to  normalization in database
Lecture 1 to 3intro to normalization in database
maqsoodahmedbscsfkhp
 
D I T211 Chapter 1
D I T211    Chapter 1D I T211    Chapter 1
D I T211 Chapter 1
askme
 
D I T211 Chapter 1 1
D I T211    Chapter 1 1D I T211    Chapter 1 1
D I T211 Chapter 1 1
askme
 
database management systems for ug students
database management systems for ug studentsdatabase management systems for ug students
database management systems for ug students
veenashinde8
 
CHAPTER 1 Database system architecture.pptx
CHAPTER 1 Database system architecture.pptxCHAPTER 1 Database system architecture.pptx
CHAPTER 1 Database system architecture.pptx
kashishy2
 

Recently uploaded (20)

Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
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
 
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdfBiophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
PKLI-Institute of Nursing and Allied Health Sciences Lahore , Pakistan.
 
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
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
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)
 
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
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
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
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
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
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
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
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
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
 
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
 
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
 
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
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
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
 
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
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
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
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
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
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
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
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
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
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
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
 
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
 
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
 
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
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
Ad

Chapter 4 Chapter Relational DB - Copy.pptx

  • 1. LEARNING OBJECTIVES 1. What is a database system, and how does it differ from file-oriented systems? 2. What is a relational database system? 3. How do you design a well-structured set of tables in a relational database? 4. How do you query a relational database system?
  • 2. Databases and Files 1. What is the nature of data stored in an accounting system For financial reporting, an accounting system must necessarily store data about : • Assets • Liabilities and equity • revenue and expense transactions. • audit, tax, and control information needs. • information about budgets, transactions in progress
  • 3. File-Oriented Systems In early processing systems, an organization’s information was stored as groups of records in separate files. These file processing systems constituted of a few data files and many application programs. Each file called a flat file contained and processed information for one specific function, such as accounting or inventory.
  • 4. Limitations of File Processing System: • Separated and Isolated Data: To make a decision, a user might need data from two separate files. • Data Redundancy: Often, the same information was stored in more than one file. the replication of data caused loss of data integrity. no one would know which information was correct. • Difficulty in representing data from user’s view: it was difficult to determine relationships between isolated data in order to meet user requirements
  • 5. Database Systems • Databases were developed to address the proliferation of redundant data in the files of systems using the file approach. • The goal of the database approach is to create an organization- wide database that stores all of the data needed to operate the business while linking data across various functions and eliminating redundancy • In summary, a database is an organized collection of data about a set of entities stored with as little data redundancy as possible. A database’s value comes from the consolidation of data into a common pool that can serve a variety of users and data processing applications.
  • 7. The Advantages of Database Systems • DBMS offers a variety of techniques to store & retrieve data • Uniform administration procedures for data • A DBMS uses various powerful functions to store and retrieve data efficiently. • Offers Data Integrity and Security • The DBMS implies integrity constraints to get a high level of protection against prohibited access to data. • Reduced Application Development Time • Consume lesser space • Reduction of redundancy. • Data independence.
  • 8. A database Management System (DBMS) • is the program that manages and controls the data and the interfaces between the data and the application programs that use the data stored in the database • The database administrator (DBA) is responsible for coordinating, controlling, and managing the database
  • 9. LOGICAL AND PHYSICAL VIEWS OF DATA The logical view is how people conceptually organize and understand the relationships among data items. For example : a sales manager views all customer information as being stored in a table. The physical view refers to the way data are physically arranged and stored in the computer system. The DBMS allows users to access, query, or update the database without reference to how or where data are physically stored. Separating the logical and physical views of data also means that users can change their logical view of data without changing the way data are physically stored The Database approach provides two separate views of the data: the physical view and the logical view
  • 11. Physical Schema  It is also known as Internal level.  This is the lowest level of the architecture.  This data is stored in the external hard drives in the form of bits.  This level describes how the data actually stored in the storage device.  This physical level also discuess encryption techniques.  This level is also responsible for allocating space of the data.
  • 12. Conceptual Schema  It is also known as logical level.  The conceptual level is a higher level than the physical level.  This level is maintained by DBA(database administrator).  The whole design of the database such as relationship among data ,schema of data etc.are described in this level.  It is the middle level between external or internal levels.
  • 13. External Schema It is also known as view level.  This is highest level architecture and closest to the user.  The user doesn’t need to know the database schema details such as data structure, table definition etc.  External level is related to the data which is viewed by individual end users.
  • 14. A data dictionary A data dictionary can be defined as a collection of metadata such as object name, data type, size, classification, and relationships with other data assets. A data dictionary acts as a reference guide on a dataset.
  • 15. DBMS Language A DBMS has several languages : The data definition language (DDL) :  builds the data dictionary  creates the database  describes logical views for each user, and specifies record or field security constraints Examples of DDL commands in structured query language (SQL) would be the CREATE, DROP, and ALTER statements.
  • 16. DBMS Language A DBMS has several languages : The data manipulation language (DML) changes database content, including data, updates, insertions, and deletions SQL examples would include INSERT, UPDATE, TRUNCATE, and DROP statements
  • 17. DBMS Language A DBMS has several languages : The data query language (DQL) is a high-level, English-like language that contains powerful, easy-to-use commands that enable users to retrieve, sort, order, and display data. SQL examples the SELECT statement in the SQL language
  • 18. Relational data model A two-dimensional table representation of data; each row represents a unique entity (record) and each column is a field where record attributes are stored Inventory Relation Attribute/Column Name Row/Record /Tuple Filed
  • 20. Simple Attributes The Student is an entity represented by a rectangle It consists of attributes: Roll_no, class, and Age. We can't further subdivide the Roll_no attribute and even the other two attributes into sub- attributes. These attributes are also known as atomic attributes
  • 21. Composite Attributes The Student is an entity represented by a rectangle It consists of attributes: Roll_no, class, and Age. We can't further subdivide the Roll_no attribute and even the other two attributes into sub- attributes. These attributes are also known as atomic attributes
  • 22. Basic Requirements Of A Relational Database We now turn to the guidelines used to develop a properly structured relational database.  . Every column in a row must be single valued  Primary keys cannot be null.  Foreign keys, if not null, must have values that correspond to the value of a primary key in another table  All nonkey attributes in a table must describe a characteristic of the object identified by the primary key These four constraints produce a well-structured (normalized) database in which data are consistent and data redundancy is minimized and controlled.
  • 23. Two Approaches to Database Desgine  normalization begins by assuming that everything is initially stored in one large table. Rules are then followed to decompose that initial table into a set of tables that are called third normal form (3NF)  semantic data modeling the designer uses knowledge of business processes and information needs to create a diagram that shows what to include in the database. This diagram is used to create a set of relational tables that are already in 3NF
  • 24. Database Systems And The Future of Accounting  Database systems expand accounting’s ability to produce real-time dynamic reports of all aspects of the accounting equation  Databases are capturing increasing amounts of transaction data beyond what was captured through accounting journals and ledgers in double entry accounting.  Presently, data about even the smallest movements of materials in production, inventory defects, machine operations, and employee effort can be captured in real time.  Management can access the information they need whenever they want it. For example, tables storing information about assets can include historical costs as well as current replacement costs, market values, and real-time utilization
  • 25. Chapter Quiz 1. What is each row in a relational database table called? a. tuple b. relation c. attribute d. anomaly 2. An employee database that consolidates payroll, personnel, and job skills master files is referred to as a. data integration. b. data sharing. c. data independence.
  • 26. Chapter Quiz 3. Which of the following describes a situation where non-primary key items are stored multiple times, leading to data inconsistencies? a. update anomaly b. insert anomaly c. delete anomaly 4. The internal-level schema of a database system consists of an individual user’s view of portions of a database and is also called a subschema. a. True b. False
  • 27. Chapter Quiz 5. Which of the following is an individual user’s view of the database? a. internal-level schema b. conceptual-level schema c. external-level schema d. logical-level schema 6. Which of the following would managers most likely use to retrieve information about sales during the month of October? a. DQL b. DML c. DSL d. DDL
  • 28. Chapter Quiz 7. Which of the following is not considered an advantage of a database system? a. Data are independent of the programs that use them. b. Integrated data can be shared with authorized users. c. Data can be stored multiple times in multiple locations. d. Master files are consolidated and accessible to many application programs. 8. The constraint that all foreign keys must have either null values or the value of a primary key in another table is referred to as which of the following? a. referential integrity rule b. entity integrity rule c. foreign key value rule d. null value rule
  • 29. Chapter Quiz 9. The constraint that all primary keys must have non-null data values is referred to as which of the following? a. referential integrity rule b. entity integrity rule c. normalization rule d. relational data model rule 10.Which of the following is not a basic requirement of a relational database? a. Primary keys cannot be null. b. Every column in a row must be single valued. c. Foreign keys cannot be null. d. All non-key attributes in a table must describe a characteristic of the object identified by the primary key