SlideShare a Scribd company logo
Ashis Talukder, MIS, DU
Lecture on
DATABASE
Ashis Talukder
Lecturer, MIS
University Of Dhaka
Ashis Talukder, MIS, DU
Introduction
Traditional File Management
DBM
Purpose of Database Systems
View of Data
Data Models
Data Definition Language
Data Manipulation Language
Database Administrator
Database Users
Overall System Structure
Ashis Talukder, MIS, DU
Database
 Data may be logically organized
into characters, fields, records,
files & databases.
Ashis Talukder, MIS, DU
Database OrganizationDatabase Organization
Bit:
− Smallest unit of data
− binary digit (0,1/ On, Off & Y, N)
− Most basic unit of physical storage
Byte:
− Group of bits that represents a single
alphabetic, numeric or other symbols
− Also called charcter
ORGANIZING DATA IN A TRADITIONAL FILE
ENVIRONMENT
Ashis Talukder, MIS, DU
Database OrganizationDatabase Organization
Field:
− Next higher level of data
− Consists of group of bytes or a complete
number which represent DETUM or FACT
− Example: Name, account number, roll,
balance
Record:
− Group of interrelated fields
− Example: (11, Mina, 82) (roll, name, marks)
ORGANIZING DATA IN A TRADITIONAL FILE
ENVIRONMENT
Ashis Talukder, MIS, DU
Database OrganizationDatabase Organization
File/Table:
− Group of records of same type
− Example: customer table, account table
ORGANIZING DATA IN A TRADITIONAL FILE
ENVIRONMENT
Ashis Talukder, MIS, DU
Database OrganizationDatabase Organization
Database:
− Integrated ca
− Example: customer table, account table
ORGANIZING DATA IN A TRADITIONAL FILE
ENVIRONMENT
Ashis Talukder, MIS, DU
The Data Hierarchy
Ashis Talukder, MIS, DU
Data Hierarchy
Ashis Talukder, MIS, DU
Traditional File Processing
Ashis Talukder, MIS, DU
Database Management System (DBMS)
 Collection of interrelated data
 Set of programs to access the data
 DBMS contains information about a particular enterprise
 Goal of the DBMS is to provides a way to store and retrieve
database information that is both convenient and efficient.
 Database Applications:
 Banking: Customer Information, loans, and all transactions
 Airlines: reservations, schedules
 Universities: registration, grades
 Sales: customers, products, purchases
 Manufacturing: production, inventory, orders, supply chain
 Human resources: employee records, salaries, tax deductions
 Databases touch all aspects of our lives
Ashis Talukder, MIS, DU
Purpose of Database System
 In the early days, database applications were built on top of file
systems
 Drawbacks of using file systems to store data:
 Data redundancy and inconsistency
 Multiple file formats, duplication of information in different files
 Difficulty in accessing data
 Need to write a new program to carry out each new task
 Data isolation — multiple files and formats
 Integrity problems
 Integrity constraints (e.g. account balance > 0) become part of
program code
 Hard to add new constraints or change existing ones
Ashis Talukder, MIS, DU
Purpose of Database Systems (Cont.)
 Drawbacks of using file systems (cont.)
 Atomicity of updates
 Failures may leave database in an inconsistent state with
partial updates carried out
 E.g. transfer of funds from one account to another should
either complete or not happen at all
 Concurrent access by multiple users
 Concurrent accessed needed for performance
 Uncontrolled concurrent accesses can lead to
inconsistencies
 E.g. two people reading a balance and updating it at the same time
 Security problems
 Database systems offer solutions to all the above
problems
Ashis Talukder, MIS, DU
Some Commercial Database Management Systems
 Microsoft Access
 FoxPro
 dBase
 Oracle – Oracle 8i, Oracle9i, Oracle 10g
Microsoft SQL Server
IBM DB2/DB2UDB
Informix
Sybase
MySQL
Ingress
Postgre SQL
Ashis Talukder, MIS, DU
Levels of Abstraction
 Physical level describes how a record (e.g.,
customer) is stored.
 Logical level: describes data stored in database, and
the relationships among the data.
type customer = record
name : string;
street : string;
city : integer;
end;
 View level: application programs hide details of data
types. Views can also hide information (e.g., salary)
for security purposes.
Ashis Talukder, MIS, DU
Data Abstraction
Ashis Talukder, MIS, DU
Instances and Schemas
 Similar to types and variables in programming languages
 Schema – the logical structure of the database
 e.g., the database consists of information about a set of customers and accounts
and the relationship between them)
 Analogous to type information of a variable in a program
 Physical schema: database design at the physical level
 Logical schema: database design at the logical level
 Instance – the actual content of the database at a particular point in time
 Analogous to the value of a variable
 Physical Data Independence – the ability to modify the physical schema without
changing the logical schema
 Applications depend on the logical schema
 In general, the interfaces between the various levels and components should be
well defined so that changes in some parts do not seriously influence others.
Ashis Talukder, MIS, DU
Data Models
 A collection of tools for describing
 data
 data relationships
 data semantics
 data constraints
 Entity-Relationship model
 Relational model
 Other models:
 object-oriented model
 semi-structured data models
 Older models: network model and hierarchical
model
Ashis Talukder, MIS, DU
Entity-Relationship Model
Ashis Talukder, MIS, DU
Entity Relationship Model (Cont.)
 E-R model of real world
 Entities (objects)
 E.g. customers, accounts, bank branch
 Relationships between entities
 E.g. Account A-101 is held by customer Johnson
 Relationship set depositor associates customers
with accounts
 Widely used for database design
 Database design in E-R model usually converted
to design in the relational model (coming up
next) which is used for storage and processing
Ashis Talukder, MIS, DU
customer-
name
Customer-id
customer-
street
customer-
city
account-
number
Johnson
Smith
Johnson
Jones
Smith
192-83-7465
019-28-3746
192-83-7465
321-12-3123
019-28-3746
Alma
North
Alma
Main
North
Palo Alto
Rye
Palo Alto
Harrison
Rye
A-101
A-215
A-201
A-217
A-201
Attributes
Relational Database Model
Ashis Talukder, MIS, DU
A Sample Relational Database
Ashis Talukder, MIS, DU
Database Language
 A database system provides a
data-definition language to
specify the database schema
and a data-manipulation
language to express database
queries and update.
Ashis Talukder, MIS, DU
Data Definition Language (DDL)
 Specification notation for defining the database schema
 E.g.
create table account (
account-number char(10),
balance integer)
 DDL is also used to specify additional properties of the data.
 Example : Alter/DROP/TRUNCATE/ comment/ Grant/ Revoke
 The storage structure and access methods used by the database system by a
set of statements in a special type of DDL called a data storage and
definition language
 DDL compiler generates a set of tables stored in a data dictionary
 Data dictionary contains metadata (i.e., data about data)
 Database schema
 Data storage and definition language
 language in which the storage structure and access methods used
by the database system are specified
 Usually an extension of the data definition language
Ashis Talukder, MIS, DU
DDL ……………. Cont.
 The data values stored in the database must satisfy certain consistency
constraints.
 Domain Constraints : A domain of possible values must be associated
with every attribute ( i.e. Char type, integer type, date/time etc)
 Referential Integrity : There are cases where we wish to ensure that a
value that appear in one relation for a given set of attribute also appears
for a certain set of attributes in another relation.
 Assertions: An assertion is any condition that the database must always
satisfy. i.e Account Balance >=$100
 Authorization : differentiate among the user as far as the type of
access they are permitted on various data values in the database.
 Read authorization
 Insert authorization
 Update authorization
 Delete authorization.
Ashis Talukder, MIS, DU
Database Languages
The output of the DDL is placed in the data dictionary, which
contains metadata- that is, data about data.
1. relation-metadata (relation-name, no-of-attributes, storage-
organization, location)
2. attribute-metadata (attribute-name, relation-name, domain-
type, position, length)
3. user-metadata (user-name, encrypted-password, group)
4. index-metadata (index-name, relation-name, index-type, index-
attributes)
5. view-metadata (view-name, definition)
Ashis Talukder, MIS, DU
Data Manipulation Language (DML)
 Language for accessing and manipulating
the data organized by the appropriate data
model
 DML also known as query language
 Two classes of languages
 Procedural – user specifies what data is required
and how to get those data
 Nonprocedural – user specifies what data is
required without specifying how to get those
data
 SQL is the most widely used query language
Ashis Talukder, MIS, DU
SQL
 SQL: widely used non-procedural language
 E.g. find the name of the customer with customer-id 192-83-7465
select customer.customer-name
from customer
where customer.customer-id = ‘192-83-7465’
 E.g. find the balances of all accounts held by the customer with
customer-id 192-83-7465
select account.balance
from depositor, account
where depositor.customer-id = ‘192-83-7465’ and
depositor.account-number = account.account-
number
 Application programs generally access databases through one of
 Language extensions to allow embedded SQL
 Application program interface (e.g. ODBC/JDBC) which allow SQL
queries to be sent to a database
Ashis Talukder, MIS, DU
An Un-normalized Relation for ORDER
Ashis Talukder, MIS, DU
Normalized Tables Created from ORDER
Ashis Talukder, MIS, DU
Database Users
Users are differentiated by the way they expect to
interact with the system. Four different types:
1. Naive users – are unsophisticated users who interact
with the system by invoking one of the permanent
application programs that have been written previously.
E.g. people accessing database over the web, bank
tellers, clerical staff
2. Application programmers – are computer
professionals who write application programs. Application
programmers can choose from many tools to develop
user interface.
Ashis Talukder, MIS, DU
Database Users
 3. Sophisticated users – interact with the system without
writing programs. Instead, they form their requests in a
database query language. Analysts who submits queries to
explore data in the database.
e.g., analyst looking at sales data (OLAP – Online analytical
processing), data mining – finds certain kinds of patterns in
data.
 4. Specialized users – are sophisticated users who write
specialized database applications that do not fit into the
traditional data processing framework.
e.g., computer-aided design systems, knowledge-base and
expert systems and environment-modeling systems – uses
complex data types.
Ashis Talukder, MIS, DU
Database Administrator
(DBA)
 Coordinates all the activities of the database system; the
database administrator has a good understanding of the
enterprise’s information resources and needs. DBA has
central control of both data and the programs that
access that data.
 The functions of Database administrator (DBA) include:
 Schema definition
 Storage structure and access method definition
 Schema and physical-organization modification
 Granting of authorization for data access
Ashis Talukder, MIS, DU
Transaction Management
 A transaction is a collection of operations
that performs a single logical function in a
database application
e.g., deposit, withdrawal, transfer
between accounts
A – Atomicity, C – Consistency,
I – Isolation, D - Durability
Ashis Talukder, MIS, DU
Transaction Management
 Transaction-management
component ensures that the
database remains in a consistent
(correct) state despite system failures
(e.g., power failures and operating
system crashes) and transaction
failures
e.g., system crash cannot wipe out
“committed” transactions
Ashis Talukder, MIS, DU
Storage Manager
 A storage manager is a program module that provides the interface
between the low-level data stored in the database and the application
programs and queries submitted to the system. The storage manager
translates the various DML statements into low-level file system thus
 The storage manager is responsible for
Efficient storage, retrieval and updating of data in the database.
The storage manager components include :
 Authorization & Integrity manager: test for satisfaction of integrity
constraints and checks the authority of user to access data.
 Transaction manager: which ensure that the database remains in a
consistent despite of power failure.
 File Manager: Which manages the allocation of space on disk storage & the
data structures used to represent information stored on disk.
 Buffer Manager : Which is responsible for fetching data from disk storage into
main memory, and deciding what data to cache in main memory.
Ashis Talukder, MIS, DU
Storage Manager
The storage manager stores:
 Data files (relations): which stores the database
itself.
 Data dictionary : Which stores metadata about
structure of the database, in particular the
schema of the database. (sometimes called
catalog)
 Indices : which can provide fast access to data
Items. Like Index of a text book.
Ashis Talukder, MIS, DU
The Query Processor
 Components include:
1. DDL interpreter : Which Interprets DDL
statements and records the definitions in the
dictionary.
2. DML compiler : Which translates DML statements
in a query language into an evaluation plan
consisting of low level instruction that the query
evaluation engine understand.
3. Query evaluation engine : Which execute low-
level instructions generated by the DML compiler.
Ashis Talukder, MIS, DU
Database Administrator
 Coordinates all the activities of the database system; the database
administrator has a good understanding of the enterprise’s
information resources and needs.
 Database administrator's duties include:
 Schema definition
 Storage structure and access method definition
 Schema and physical organization modification
 Granting user authority to access the database
 Specifying integrity constraints
 Acting as liaison with users
 Monitoring performance and responding to changes in
requirements
Ashis Talukder, MIS, DU
Overall System Structure
Ashis Talukder, MIS, DU
Application Architectures
Two-tier architecture: E.g. client programs using ODBC/JDBC to
communicate with a database
Three-tier architecture: E.g. web-based applications, and
applications built using “middleware”
Ashis Talukder, MIS, DU
Centralized database:
• Used by single central processor or multiple processors in
client/server network
• There are advantages and disadvantages to having all
corporate data in one location.
• Security is higher in central environments, risks lower.
• If data demands are highly decentralized, then a
decentralized design is less costly, and more flexible.
Distributing DatabasesDistributing Databases
Ashis Talukder, MIS, DU
• Databases can be decentralized either by
partitioning or by replicating
• Partitioned database: Database is divided into
segments or regions. For example, a customer
database can be divided into Eastern customers and
Western customers, and two separate databases
maintained in the two regions.
CREATING A DATABASE ENVIRONMENT
Distributed database:
Ashis Talukder, MIS, DU
• Duplicated database: The database is completely
duplicated at two or more locations. The separate
databases are synchronized in off hours on a batch
basis.
• Regardless of which method is chosen, data
administrators and business managers need to
understand how the data in different databases will
be coordinated and how business processes might
be effected by the decentralization.
CREATING A DATABASE ENVIRONMENT
Ashis Talukder, MIS, DU
• The quality of decision making in a firm is directly
related to the quality of data in its databases.
• Data Quality Audit: Structured survey of the accuracy
and level of completeness of the data in an
information system
• Data Cleansing: Consists of activities for detecting
and correcting data in a database or file that are
incorrect, incomplete, improperly formatted, or
redundant
CREATING A DATABASE ENVIRONMENT
Ensuring Data Quality:
Ashis Talukder, MIS, DU
Online Analytical Processing (OLAP):
• Multidimensional data analysis
• Supports manipulation and analysis of large
volumes of data from multiple
dimensions/perspectives
DATABASE TRENDS
Multidimensional Data AnalysisMultidimensional Data Analysis
Ashis Talukder, MIS, DU
Multidimensional Data Model
DATABASE TRENDS
Ashis Talukder, MIS, DU
Data warehouse: A Data warehouse is a database
that stores current & historical data of potential interest
to manager throughout the company
• Supports reporting and query tools
• Stores current and historical data
• Consolidates data for management analysis and decision
making
DATABASE TRENDS
Data Warehousing and Data MiningData Warehousing and Data Mining
Ashis Talukder, MIS, DU
Components of a Data Warehouse
DATABASE TRENDS
Ashis Talukder, MIS, DU
Data mart:
• Subset of data warehouse
• Contains summarized or highly focused portion of
data for a specified function or group of users
DATABASE TRENDS
Data mining:
• Tools for analyzing large pools of data
• Find hidden patterns and infer rules to predict
trends
Ashis Talukder, MIS, DU
Benefits of Data Warehouses:
• Improved and easy accessibility to information
• Ability to model and remodel the data
DATABASE TRENDS

More Related Content

What's hot

Assignment on dbms
Assignment on dbmsAssignment on dbms
Assignment on dbms
Mohd Arif
 
27 fcs157al2
27 fcs157al227 fcs157al2
27 fcs157al2
CHANDRA BHUSHAN
 
Dbms and sqlpptx
Dbms and sqlpptxDbms and sqlpptx
Dbms and sqlpptx
thesupermanreturns
 
database
databasedatabase
Database management systems
Database management systemsDatabase management systems
Database management systems
Joel Briza
 
TID Chapter 10 Introduction To Database
TID Chapter 10 Introduction To DatabaseTID Chapter 10 Introduction To Database
TID Chapter 10 Introduction To Database
WanBK Leo
 
DBMS FOR STUDENTS MUST DOWNLOAD AND READ
DBMS FOR STUDENTS MUST DOWNLOAD AND READDBMS FOR STUDENTS MUST DOWNLOAD AND READ
DBMS FOR STUDENTS MUST DOWNLOAD AND READ
amitp26
 
Basic Concept of Database
Basic Concept of DatabaseBasic Concept of Database
Basic Concept of Database
Marlon Jamera
 
Computer lecture (1) m.nasir
Computer lecture (1) m.nasirComputer lecture (1) m.nasir
Computer lecture (1) m.nasir
Muhammad Nasir
 
PPT demo
PPT demoPPT demo
PPT demo
sophie17
 
Database
DatabaseDatabase
Database
Nuqra Rabbani
 
Introduction to databases
Introduction to databasesIntroduction to databases
Introduction to databases
Aashima Wadhwa
 
11 Database Concepts
11 Database Concepts11 Database Concepts
11 Database Concepts
Praveen M Jigajinni
 
Database an introduction
Database an introductionDatabase an introduction
Database an introduction
Anwarul Islam, PhD
 
6.2 software
6.2 software6.2 software
Database Management System
Database Management SystemDatabase Management System
Database Management System
Abishek V S
 
introduction to database
 introduction to database introduction to database
introduction to database
Akif shexi
 
Database Management Systems
Database Management SystemsDatabase Management Systems
Intro to Database Design
Intro to Database DesignIntro to Database Design
Intro to Database Design
Sondra Willhite
 

What's hot (19)

Assignment on dbms
Assignment on dbmsAssignment on dbms
Assignment on dbms
 
27 fcs157al2
27 fcs157al227 fcs157al2
27 fcs157al2
 
Dbms and sqlpptx
Dbms and sqlpptxDbms and sqlpptx
Dbms and sqlpptx
 
database
databasedatabase
database
 
Database management systems
Database management systemsDatabase management systems
Database management systems
 
TID Chapter 10 Introduction To Database
TID Chapter 10 Introduction To DatabaseTID Chapter 10 Introduction To Database
TID Chapter 10 Introduction To Database
 
DBMS FOR STUDENTS MUST DOWNLOAD AND READ
DBMS FOR STUDENTS MUST DOWNLOAD AND READDBMS FOR STUDENTS MUST DOWNLOAD AND READ
DBMS FOR STUDENTS MUST DOWNLOAD AND READ
 
Basic Concept of Database
Basic Concept of DatabaseBasic Concept of Database
Basic Concept of Database
 
Computer lecture (1) m.nasir
Computer lecture (1) m.nasirComputer lecture (1) m.nasir
Computer lecture (1) m.nasir
 
PPT demo
PPT demoPPT demo
PPT demo
 
Database
DatabaseDatabase
Database
 
Introduction to databases
Introduction to databasesIntroduction to databases
Introduction to databases
 
11 Database Concepts
11 Database Concepts11 Database Concepts
11 Database Concepts
 
Database an introduction
Database an introductionDatabase an introduction
Database an introduction
 
6.2 software
6.2 software6.2 software
6.2 software
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
introduction to database
 introduction to database introduction to database
introduction to database
 
Database Management Systems
Database Management SystemsDatabase Management Systems
Database Management Systems
 
Intro to Database Design
Intro to Database DesignIntro to Database Design
Intro to Database Design
 

Viewers also liked

Management information system Unit 1
Management information system Unit 1Management information system Unit 1
Management information system Unit 1
Sharda University Greater Noida
 
Lec monitor
Lec monitorLec monitor
Lec monitor
Protik Roy
 
Mis 001
Mis 001Mis 001
Lecture 1 mis
Lecture 1  misLecture 1  mis
Lecture 1 mis
sukhalalton1
 
Ch01
Ch01Ch01
Ch01
Taha Khan
 
Management information system
Management information systemManagement information system
Management information system
Ranjeeta Swarnakar
 
Ch02 mis-imp-concepts
Ch02 mis-imp-conceptsCh02 mis-imp-concepts
Ch02 mis-imp-concepts
SR NAIDU
 
Lecture 11 bmbs management information system qs
Lecture 11 bmbs management information system   qsLecture 11 bmbs management information system   qs
Lecture 11 bmbs management information system qs
Muhammad Ovais
 
Introduction to Programming and QBasic Tutorial
Introduction to Programming and QBasic TutorialIntroduction to Programming and QBasic Tutorial
Introduction to Programming and QBasic Tutorial
nhomz
 
Qbasic tutorial
Qbasic tutorialQbasic tutorial
Qbasic tutorial
jovelleluzon
 
Laudon mis12 ppt01
Laudon mis12 ppt01Laudon mis12 ppt01
Laudon mis12 ppt01
Norazila Mat
 
MIS Chapter 1
MIS Chapter 1MIS Chapter 1
MIS Chapter 1
Dara Som
 
Mis lecture ppt
Mis lecture pptMis lecture ppt
Mis lecture ppt
Vandana Agrawal
 
Management Information System (Full Notes)
Management Information System (Full Notes)Management Information System (Full Notes)
Management Information System (Full Notes)
Harish Chand
 

Viewers also liked (14)

Management information system Unit 1
Management information system Unit 1Management information system Unit 1
Management information system Unit 1
 
Lec monitor
Lec monitorLec monitor
Lec monitor
 
Mis 001
Mis 001Mis 001
Mis 001
 
Lecture 1 mis
Lecture 1  misLecture 1  mis
Lecture 1 mis
 
Ch01
Ch01Ch01
Ch01
 
Management information system
Management information systemManagement information system
Management information system
 
Ch02 mis-imp-concepts
Ch02 mis-imp-conceptsCh02 mis-imp-concepts
Ch02 mis-imp-concepts
 
Lecture 11 bmbs management information system qs
Lecture 11 bmbs management information system   qsLecture 11 bmbs management information system   qs
Lecture 11 bmbs management information system qs
 
Introduction to Programming and QBasic Tutorial
Introduction to Programming and QBasic TutorialIntroduction to Programming and QBasic Tutorial
Introduction to Programming and QBasic Tutorial
 
Qbasic tutorial
Qbasic tutorialQbasic tutorial
Qbasic tutorial
 
Laudon mis12 ppt01
Laudon mis12 ppt01Laudon mis12 ppt01
Laudon mis12 ppt01
 
MIS Chapter 1
MIS Chapter 1MIS Chapter 1
MIS Chapter 1
 
Mis lecture ppt
Mis lecture pptMis lecture ppt
Mis lecture ppt
 
Management Information System (Full Notes)
Management Information System (Full Notes)Management Information System (Full Notes)
Management Information System (Full Notes)
 

Similar to Lect 30 dbms_fundamentals

Unit01 dbms
Unit01 dbmsUnit01 dbms
Unit01 dbms
arnold 7490
 
dbms notes.ppt
dbms notes.pptdbms notes.ppt
dbms notes.ppt
Ranjit273515
 
Ch-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdfCh-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdf
MrjJoker1
 
21UCAC 41 Database Management System.ppt
21UCAC 41 Database Management System.ppt21UCAC 41 Database Management System.ppt
21UCAC 41 Database Management System.ppt
ssuser7f90ae
 
Introduction to Database, Purpose of Data, Data models, Components of Database
Introduction to Database, Purpose of Data, Data models, Components of DatabaseIntroduction to Database, Purpose of Data, Data models, Components of Database
Introduction to Database, Purpose of Data, Data models, Components of Database
kasthurimukila
 
Dbms
DbmsDbms
Dbms
saurav-IT
 
Ch1- Introduction to dbms
Ch1- Introduction to dbmsCh1- Introduction to dbms
Ch1- Introduction to dbms
Shakila Mahjabin
 
database introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdfdatabase introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdf
parveen204931475
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to Database
Siti Ismail
 
Ch1
Ch1Ch1
Ch1
CAG
 
Ch1
Ch1Ch1
Ch1 2
Ch1 2Ch1 2
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
koolkampus
 
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
 
DBMS - Introduction
DBMS - IntroductionDBMS - Introduction
DBMS - Introduction
JOSEPHINE297640
 
DBMS introduction and functionality of of dbms
DBMS introduction and functionality of  of dbmsDBMS introduction and functionality of  of dbms
DBMS introduction and functionality of of dbms
ranjana dalwani
 
data base manage ment
data base manage mentdata base manage ment
data base manage ment
kaleemullah125
 
Database Management System, Lecture-1
Database Management System, Lecture-1Database Management System, Lecture-1
Database Management System, Lecture-1
Sonia Mim
 
Dbms unit01
Dbms unit01Dbms unit01
Dbms unit01
Ila Chandana
 
Database management system
Database management systemDatabase management system
Database management system
khagendrabasnet4
 

Similar to Lect 30 dbms_fundamentals (20)

Unit01 dbms
Unit01 dbmsUnit01 dbms
Unit01 dbms
 
dbms notes.ppt
dbms notes.pptdbms notes.ppt
dbms notes.ppt
 
Ch-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdfCh-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdf
 
21UCAC 41 Database Management System.ppt
21UCAC 41 Database Management System.ppt21UCAC 41 Database Management System.ppt
21UCAC 41 Database Management System.ppt
 
Introduction to Database, Purpose of Data, Data models, Components of Database
Introduction to Database, Purpose of Data, Data models, Components of DatabaseIntroduction to Database, Purpose of Data, Data models, Components of Database
Introduction to Database, Purpose of Data, Data models, Components of Database
 
Dbms
DbmsDbms
Dbms
 
Ch1- Introduction to dbms
Ch1- Introduction to dbmsCh1- Introduction to dbms
Ch1- Introduction to dbms
 
database introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdfdatabase introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdf
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to Database
 
Ch1
Ch1Ch1
Ch1
 
Ch1
Ch1Ch1
Ch1
 
Ch1 2
Ch1 2Ch1 2
Ch1 2
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
 
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
 
DBMS - Introduction
DBMS - IntroductionDBMS - Introduction
DBMS - Introduction
 
DBMS introduction and functionality of of dbms
DBMS introduction and functionality of  of dbmsDBMS introduction and functionality of  of dbms
DBMS introduction and functionality of of dbms
 
data base manage ment
data base manage mentdata base manage ment
data base manage ment
 
Database Management System, Lecture-1
Database Management System, Lecture-1Database Management System, Lecture-1
Database Management System, Lecture-1
 
Dbms unit01
Dbms unit01Dbms unit01
Dbms unit01
 
Database management system
Database management systemDatabase management system
Database management system
 

More from Protik Roy

Technology in education
Technology in educationTechnology in education
Technology in education
Protik Roy
 
Qualitative research
Qualitative researchQualitative research
Qualitative research
Protik Roy
 
Historical research
Historical researchHistorical research
Historical research
Protik Roy
 
Fundamental research
Fundamental researchFundamental research
Fundamental research
Protik Roy
 
Experimental research
Experimental researchExperimental research
Experimental research
Protik Roy
 
Appplied research
Appplied researchAppplied research
Appplied research
Protik Roy
 
Action research
Action researchAction research
Action research
Protik Roy
 
Nature of phylosophy in education presentation
Nature of phylosophy in education presentationNature of phylosophy in education presentation
Nature of phylosophy in education presentation
Protik Roy
 
Virus
VirusVirus
Virus
Protik Roy
 
Software
SoftwareSoftware
Software
Protik Roy
 
Presentation on virus
Presentation on virusPresentation on virus
Presentation on virus
Protik Roy
 
Net 02 03_lan
Net 02 03_lanNet 02 03_lan
Net 02 03_lan
Protik Roy
 
Lec 8 alu_cu
Lec 8 alu_cuLec 8 alu_cu
Lec 8 alu_cu
Protik Roy
 
Lec 6 memory
Lec 6 memoryLec 6 memory
Lec 6 memory
Protik Roy
 
Lec 5 output unit
Lec 5 output unitLec 5 output unit
Lec 5 output unit
Protik Roy
 
Lec 5 input unit
Lec 5 input unitLec 5 input unit
Lec 5 input unit
Protik Roy
 
Lec 5 input unit
Lec 5 input unitLec 5 input unit
Lec 5 input unit
Protik Roy
 
Lec 4 oraganization
Lec 4 oraganizationLec 4 oraganization
Lec 4 oraganization
Protik Roy
 
Lec 3 classification
Lec 3 classificationLec 3 classification
Lec 3 classification
Protik Roy
 
Lec 2 introduction_generation
Lec 2 introduction_generationLec 2 introduction_generation
Lec 2 introduction_generation
Protik Roy
 

More from Protik Roy (20)

Technology in education
Technology in educationTechnology in education
Technology in education
 
Qualitative research
Qualitative researchQualitative research
Qualitative research
 
Historical research
Historical researchHistorical research
Historical research
 
Fundamental research
Fundamental researchFundamental research
Fundamental research
 
Experimental research
Experimental researchExperimental research
Experimental research
 
Appplied research
Appplied researchAppplied research
Appplied research
 
Action research
Action researchAction research
Action research
 
Nature of phylosophy in education presentation
Nature of phylosophy in education presentationNature of phylosophy in education presentation
Nature of phylosophy in education presentation
 
Virus
VirusVirus
Virus
 
Software
SoftwareSoftware
Software
 
Presentation on virus
Presentation on virusPresentation on virus
Presentation on virus
 
Net 02 03_lan
Net 02 03_lanNet 02 03_lan
Net 02 03_lan
 
Lec 8 alu_cu
Lec 8 alu_cuLec 8 alu_cu
Lec 8 alu_cu
 
Lec 6 memory
Lec 6 memoryLec 6 memory
Lec 6 memory
 
Lec 5 output unit
Lec 5 output unitLec 5 output unit
Lec 5 output unit
 
Lec 5 input unit
Lec 5 input unitLec 5 input unit
Lec 5 input unit
 
Lec 5 input unit
Lec 5 input unitLec 5 input unit
Lec 5 input unit
 
Lec 4 oraganization
Lec 4 oraganizationLec 4 oraganization
Lec 4 oraganization
 
Lec 3 classification
Lec 3 classificationLec 3 classification
Lec 3 classification
 
Lec 2 introduction_generation
Lec 2 introduction_generationLec 2 introduction_generation
Lec 2 introduction_generation
 

Recently uploaded

Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
NelTorrente
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 

Recently uploaded (20)

Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 

Lect 30 dbms_fundamentals

  • 1. Ashis Talukder, MIS, DU Lecture on DATABASE Ashis Talukder Lecturer, MIS University Of Dhaka
  • 2. Ashis Talukder, MIS, DU Introduction Traditional File Management DBM Purpose of Database Systems View of Data Data Models Data Definition Language Data Manipulation Language Database Administrator Database Users Overall System Structure
  • 3. Ashis Talukder, MIS, DU Database  Data may be logically organized into characters, fields, records, files & databases.
  • 4. Ashis Talukder, MIS, DU Database OrganizationDatabase Organization Bit: − Smallest unit of data − binary digit (0,1/ On, Off & Y, N) − Most basic unit of physical storage Byte: − Group of bits that represents a single alphabetic, numeric or other symbols − Also called charcter ORGANIZING DATA IN A TRADITIONAL FILE ENVIRONMENT
  • 5. Ashis Talukder, MIS, DU Database OrganizationDatabase Organization Field: − Next higher level of data − Consists of group of bytes or a complete number which represent DETUM or FACT − Example: Name, account number, roll, balance Record: − Group of interrelated fields − Example: (11, Mina, 82) (roll, name, marks) ORGANIZING DATA IN A TRADITIONAL FILE ENVIRONMENT
  • 6. Ashis Talukder, MIS, DU Database OrganizationDatabase Organization File/Table: − Group of records of same type − Example: customer table, account table ORGANIZING DATA IN A TRADITIONAL FILE ENVIRONMENT
  • 7. Ashis Talukder, MIS, DU Database OrganizationDatabase Organization Database: − Integrated ca − Example: customer table, account table ORGANIZING DATA IN A TRADITIONAL FILE ENVIRONMENT
  • 8. Ashis Talukder, MIS, DU The Data Hierarchy
  • 9. Ashis Talukder, MIS, DU Data Hierarchy
  • 10. Ashis Talukder, MIS, DU Traditional File Processing
  • 11. Ashis Talukder, MIS, DU Database Management System (DBMS)  Collection of interrelated data  Set of programs to access the data  DBMS contains information about a particular enterprise  Goal of the DBMS is to provides a way to store and retrieve database information that is both convenient and efficient.  Database Applications:  Banking: Customer Information, loans, and all transactions  Airlines: reservations, schedules  Universities: registration, grades  Sales: customers, products, purchases  Manufacturing: production, inventory, orders, supply chain  Human resources: employee records, salaries, tax deductions  Databases touch all aspects of our lives
  • 12. Ashis Talukder, MIS, DU Purpose of Database System  In the early days, database applications were built on top of file systems  Drawbacks of using file systems to store data:  Data redundancy and inconsistency  Multiple file formats, duplication of information in different files  Difficulty in accessing data  Need to write a new program to carry out each new task  Data isolation — multiple files and formats  Integrity problems  Integrity constraints (e.g. account balance > 0) become part of program code  Hard to add new constraints or change existing ones
  • 13. Ashis Talukder, MIS, DU Purpose of Database Systems (Cont.)  Drawbacks of using file systems (cont.)  Atomicity of updates  Failures may leave database in an inconsistent state with partial updates carried out  E.g. transfer of funds from one account to another should either complete or not happen at all  Concurrent access by multiple users  Concurrent accessed needed for performance  Uncontrolled concurrent accesses can lead to inconsistencies  E.g. two people reading a balance and updating it at the same time  Security problems  Database systems offer solutions to all the above problems
  • 14. Ashis Talukder, MIS, DU Some Commercial Database Management Systems  Microsoft Access  FoxPro  dBase  Oracle – Oracle 8i, Oracle9i, Oracle 10g Microsoft SQL Server IBM DB2/DB2UDB Informix Sybase MySQL Ingress Postgre SQL
  • 15. Ashis Talukder, MIS, DU Levels of Abstraction  Physical level describes how a record (e.g., customer) is stored.  Logical level: describes data stored in database, and the relationships among the data. type customer = record name : string; street : string; city : integer; end;  View level: application programs hide details of data types. Views can also hide information (e.g., salary) for security purposes.
  • 16. Ashis Talukder, MIS, DU Data Abstraction
  • 17. Ashis Talukder, MIS, DU Instances and Schemas  Similar to types and variables in programming languages  Schema – the logical structure of the database  e.g., the database consists of information about a set of customers and accounts and the relationship between them)  Analogous to type information of a variable in a program  Physical schema: database design at the physical level  Logical schema: database design at the logical level  Instance – the actual content of the database at a particular point in time  Analogous to the value of a variable  Physical Data Independence – the ability to modify the physical schema without changing the logical schema  Applications depend on the logical schema  In general, the interfaces between the various levels and components should be well defined so that changes in some parts do not seriously influence others.
  • 18. Ashis Talukder, MIS, DU Data Models  A collection of tools for describing  data  data relationships  data semantics  data constraints  Entity-Relationship model  Relational model  Other models:  object-oriented model  semi-structured data models  Older models: network model and hierarchical model
  • 19. Ashis Talukder, MIS, DU Entity-Relationship Model
  • 20. Ashis Talukder, MIS, DU Entity Relationship Model (Cont.)  E-R model of real world  Entities (objects)  E.g. customers, accounts, bank branch  Relationships between entities  E.g. Account A-101 is held by customer Johnson  Relationship set depositor associates customers with accounts  Widely used for database design  Database design in E-R model usually converted to design in the relational model (coming up next) which is used for storage and processing
  • 21. Ashis Talukder, MIS, DU customer- name Customer-id customer- street customer- city account- number Johnson Smith Johnson Jones Smith 192-83-7465 019-28-3746 192-83-7465 321-12-3123 019-28-3746 Alma North Alma Main North Palo Alto Rye Palo Alto Harrison Rye A-101 A-215 A-201 A-217 A-201 Attributes Relational Database Model
  • 22. Ashis Talukder, MIS, DU A Sample Relational Database
  • 23. Ashis Talukder, MIS, DU Database Language  A database system provides a data-definition language to specify the database schema and a data-manipulation language to express database queries and update.
  • 24. Ashis Talukder, MIS, DU Data Definition Language (DDL)  Specification notation for defining the database schema  E.g. create table account ( account-number char(10), balance integer)  DDL is also used to specify additional properties of the data.  Example : Alter/DROP/TRUNCATE/ comment/ Grant/ Revoke  The storage structure and access methods used by the database system by a set of statements in a special type of DDL called a data storage and definition language  DDL compiler generates a set of tables stored in a data dictionary  Data dictionary contains metadata (i.e., data about data)  Database schema  Data storage and definition language  language in which the storage structure and access methods used by the database system are specified  Usually an extension of the data definition language
  • 25. Ashis Talukder, MIS, DU DDL ……………. Cont.  The data values stored in the database must satisfy certain consistency constraints.  Domain Constraints : A domain of possible values must be associated with every attribute ( i.e. Char type, integer type, date/time etc)  Referential Integrity : There are cases where we wish to ensure that a value that appear in one relation for a given set of attribute also appears for a certain set of attributes in another relation.  Assertions: An assertion is any condition that the database must always satisfy. i.e Account Balance >=$100  Authorization : differentiate among the user as far as the type of access they are permitted on various data values in the database.  Read authorization  Insert authorization  Update authorization  Delete authorization.
  • 26. Ashis Talukder, MIS, DU Database Languages The output of the DDL is placed in the data dictionary, which contains metadata- that is, data about data. 1. relation-metadata (relation-name, no-of-attributes, storage- organization, location) 2. attribute-metadata (attribute-name, relation-name, domain- type, position, length) 3. user-metadata (user-name, encrypted-password, group) 4. index-metadata (index-name, relation-name, index-type, index- attributes) 5. view-metadata (view-name, definition)
  • 27. Ashis Talukder, MIS, DU Data Manipulation Language (DML)  Language for accessing and manipulating the data organized by the appropriate data model  DML also known as query language  Two classes of languages  Procedural – user specifies what data is required and how to get those data  Nonprocedural – user specifies what data is required without specifying how to get those data  SQL is the most widely used query language
  • 28. Ashis Talukder, MIS, DU SQL  SQL: widely used non-procedural language  E.g. find the name of the customer with customer-id 192-83-7465 select customer.customer-name from customer where customer.customer-id = ‘192-83-7465’  E.g. find the balances of all accounts held by the customer with customer-id 192-83-7465 select account.balance from depositor, account where depositor.customer-id = ‘192-83-7465’ and depositor.account-number = account.account- number  Application programs generally access databases through one of  Language extensions to allow embedded SQL  Application program interface (e.g. ODBC/JDBC) which allow SQL queries to be sent to a database
  • 29. Ashis Talukder, MIS, DU An Un-normalized Relation for ORDER
  • 30. Ashis Talukder, MIS, DU Normalized Tables Created from ORDER
  • 31. Ashis Talukder, MIS, DU Database Users Users are differentiated by the way they expect to interact with the system. Four different types: 1. Naive users – are unsophisticated users who interact with the system by invoking one of the permanent application programs that have been written previously. E.g. people accessing database over the web, bank tellers, clerical staff 2. Application programmers – are computer professionals who write application programs. Application programmers can choose from many tools to develop user interface.
  • 32. Ashis Talukder, MIS, DU Database Users  3. Sophisticated users – interact with the system without writing programs. Instead, they form their requests in a database query language. Analysts who submits queries to explore data in the database. e.g., analyst looking at sales data (OLAP – Online analytical processing), data mining – finds certain kinds of patterns in data.  4. Specialized users – are sophisticated users who write specialized database applications that do not fit into the traditional data processing framework. e.g., computer-aided design systems, knowledge-base and expert systems and environment-modeling systems – uses complex data types.
  • 33. Ashis Talukder, MIS, DU Database Administrator (DBA)  Coordinates all the activities of the database system; the database administrator has a good understanding of the enterprise’s information resources and needs. DBA has central control of both data and the programs that access that data.  The functions of Database administrator (DBA) include:  Schema definition  Storage structure and access method definition  Schema and physical-organization modification  Granting of authorization for data access
  • 34. Ashis Talukder, MIS, DU Transaction Management  A transaction is a collection of operations that performs a single logical function in a database application e.g., deposit, withdrawal, transfer between accounts A – Atomicity, C – Consistency, I – Isolation, D - Durability
  • 35. Ashis Talukder, MIS, DU Transaction Management  Transaction-management component ensures that the database remains in a consistent (correct) state despite system failures (e.g., power failures and operating system crashes) and transaction failures e.g., system crash cannot wipe out “committed” transactions
  • 36. Ashis Talukder, MIS, DU Storage Manager  A storage manager is a program module that provides the interface between the low-level data stored in the database and the application programs and queries submitted to the system. The storage manager translates the various DML statements into low-level file system thus  The storage manager is responsible for Efficient storage, retrieval and updating of data in the database. The storage manager components include :  Authorization & Integrity manager: test for satisfaction of integrity constraints and checks the authority of user to access data.  Transaction manager: which ensure that the database remains in a consistent despite of power failure.  File Manager: Which manages the allocation of space on disk storage & the data structures used to represent information stored on disk.  Buffer Manager : Which is responsible for fetching data from disk storage into main memory, and deciding what data to cache in main memory.
  • 37. Ashis Talukder, MIS, DU Storage Manager The storage manager stores:  Data files (relations): which stores the database itself.  Data dictionary : Which stores metadata about structure of the database, in particular the schema of the database. (sometimes called catalog)  Indices : which can provide fast access to data Items. Like Index of a text book.
  • 38. Ashis Talukder, MIS, DU The Query Processor  Components include: 1. DDL interpreter : Which Interprets DDL statements and records the definitions in the dictionary. 2. DML compiler : Which translates DML statements in a query language into an evaluation plan consisting of low level instruction that the query evaluation engine understand. 3. Query evaluation engine : Which execute low- level instructions generated by the DML compiler.
  • 39. Ashis Talukder, MIS, DU Database Administrator  Coordinates all the activities of the database system; the database administrator has a good understanding of the enterprise’s information resources and needs.  Database administrator's duties include:  Schema definition  Storage structure and access method definition  Schema and physical organization modification  Granting user authority to access the database  Specifying integrity constraints  Acting as liaison with users  Monitoring performance and responding to changes in requirements
  • 40. Ashis Talukder, MIS, DU Overall System Structure
  • 41. Ashis Talukder, MIS, DU Application Architectures Two-tier architecture: E.g. client programs using ODBC/JDBC to communicate with a database Three-tier architecture: E.g. web-based applications, and applications built using “middleware”
  • 42. Ashis Talukder, MIS, DU Centralized database: • Used by single central processor or multiple processors in client/server network • There are advantages and disadvantages to having all corporate data in one location. • Security is higher in central environments, risks lower. • If data demands are highly decentralized, then a decentralized design is less costly, and more flexible. Distributing DatabasesDistributing Databases
  • 43. Ashis Talukder, MIS, DU • Databases can be decentralized either by partitioning or by replicating • Partitioned database: Database is divided into segments or regions. For example, a customer database can be divided into Eastern customers and Western customers, and two separate databases maintained in the two regions. CREATING A DATABASE ENVIRONMENT Distributed database:
  • 44. Ashis Talukder, MIS, DU • Duplicated database: The database is completely duplicated at two or more locations. The separate databases are synchronized in off hours on a batch basis. • Regardless of which method is chosen, data administrators and business managers need to understand how the data in different databases will be coordinated and how business processes might be effected by the decentralization. CREATING A DATABASE ENVIRONMENT
  • 45. Ashis Talukder, MIS, DU • The quality of decision making in a firm is directly related to the quality of data in its databases. • Data Quality Audit: Structured survey of the accuracy and level of completeness of the data in an information system • Data Cleansing: Consists of activities for detecting and correcting data in a database or file that are incorrect, incomplete, improperly formatted, or redundant CREATING A DATABASE ENVIRONMENT Ensuring Data Quality:
  • 46. Ashis Talukder, MIS, DU Online Analytical Processing (OLAP): • Multidimensional data analysis • Supports manipulation and analysis of large volumes of data from multiple dimensions/perspectives DATABASE TRENDS Multidimensional Data AnalysisMultidimensional Data Analysis
  • 47. Ashis Talukder, MIS, DU Multidimensional Data Model DATABASE TRENDS
  • 48. Ashis Talukder, MIS, DU Data warehouse: A Data warehouse is a database that stores current & historical data of potential interest to manager throughout the company • Supports reporting and query tools • Stores current and historical data • Consolidates data for management analysis and decision making DATABASE TRENDS Data Warehousing and Data MiningData Warehousing and Data Mining
  • 49. Ashis Talukder, MIS, DU Components of a Data Warehouse DATABASE TRENDS
  • 50. Ashis Talukder, MIS, DU Data mart: • Subset of data warehouse • Contains summarized or highly focused portion of data for a specified function or group of users DATABASE TRENDS Data mining: • Tools for analyzing large pools of data • Find hidden patterns and infer rules to predict trends
  • 51. Ashis Talukder, MIS, DU Benefits of Data Warehouses: • Improved and easy accessibility to information • Ability to model and remodel the data DATABASE TRENDS