You are on page 1of 26

Unit 1: Introduction

Dhanashree Huddedar
Index
• Introduction to data Processing • View of data
• Overview of File Systems • Data Model
• Purpose of Database Systems • Database languages
• Concept of Database system • Database user and administrator
• Database System vs File System • Transaction Management
• Database system structure
Introduction to data Processing
• Nowadays more and more data is collected for academic, scientific
research, private & personal use, institutional use, commercial use.
• This collected data needs to be stored, sorted, filtered, analysed and
presented for it to be of any use.
• This process can be simple or complex depending on the scale at
which data collection is done and the complexity of the results which
are required to be obtained.
• Different types of output files obtained data
• Plain text file
• Table/ spreadsheet
• Charts & Graphs
• Maps/Vector or image file
Data Processing

• Data processing is the conversion of data into usable and desired


form.
• This conversion or “processing” is carried out using a predefined
sequence of operations either manually or automatically.
• complete process can be divided into 6 basic simple stages which
are:
• Data collection
• Storage of data
• Sorting of data
• processing of data
• Data analysis 
• Data presentation and conclusions
Types of data processing

• Manual data processing: In this method data is processed manually


without use of machine or electronic device. This methods might be
accompanied with automatic method for completion of the data
processing. 
• Mechanical data processing: Data processing is done by use of
mechanical device or very simple electronic devices like calculator and
type writers. When the need for processing is simple this method can
be adopted. 
• Electronic data processing: This is the fastest and best available
method with highest reliability and accuracy. Technology used is latest
as this method uses computers and employed in most of the
agencies. The use of software forms the part of this type of data
processing. 
Overview of File Systems
• Typical file-processing system is supported by a
conventional operating system.
• The system stores permanent records in various files, and
it needs different application programs to extract records
from and add records to the appropriate files.
• Before database management systems (DBMSs) were
introduced, organizations usually stored information in
such systems.
Disadvantages of File System
• Data redundancy and inconsistency
• Difficulty in accessing data
• Data isolation
• Integrity problems
• Concurrent-access anomalies
• Security problems
Purpose of DBMS
• There are several advantages of Database management system
over file system.
• No redundant data – Redundancy removed by data
normalization
• Data Consistency and Integrity – data normalization takes
care of it too
• Secure – Each user has a different set of access
• Privacy – Limited access
• Easy access to data
• Easy recovery
• Flexible
Concept of Database-1
• Field (Column):
• a single piece of information.  
• Could be a name, or a number.  In some cases, it may even be a null or empty
value.
• Record (Row):
• a collection of related fields. 
• A number of pieces of information that relate to the same object.  
• For example:  If you keep records on an employee, you might have their name,
address, social security number, phone number, etc…Each piece of the
information relates back to one employee.  This would be the employee’s record.
• Table (File):
• a collection of related records.  If you put all the employee records together, you
have a table of employees.
Concept of Database-2
• Database:
• a collection of tables.  
• If you were keeping the company records, you might have a table for employees, a table for
customers, and another for sales records.  
• All these tables would be combined as a database.
• Relational Database:
• a collection of related tables.  
• The difference between a database and a relational database is in the way the tables are
constructed.  
• If you were keeping the company records on a series of Excel spreadsheets, you would have
just a database.  
• You could pull information from each table, but you wouldn’t have the ability to use
information from one spreadsheet as a basis for asking questions about the information
contained on another sheet. 
• In a relational database, the tables are constructed so that there is a logical link between
them.  Based on the information that’s found in one table, you can follow this link and get
relevant information from another table.
Concept of Database-3
Features of a DBMS:
• Creating and Adding of Data Structures
• Query language
• Reporting facility
• Security, Control, Backup, and Disaster Recovery
Market share of DBMS tools
• Oracle Database – 70%
• Microsoft SQL Server – 68%
• MySQL (Oracle Corporation) – 50%
• IBM DB2 – 39%
• IBM Informix – 18%
• SAP Sybase Adaptive Server Enterprise – 15%
• SAP Sybase IQ – 14%
• Teradata – 11%
Database Management System (DBMS)
• DBMS contains information about a particular enterprise
• Collection of interrelated data
• Set of programs to access the data
• An environment that is both convenient and efficient to use
• Database Applications:
• Banking: transactions
• Airlines: reservations, schedules
• Universities: registration, grades
• Sales: customers, products, purchases
• Online retailers: order tracking, customized recommendations
• Manufacturing: production, inventory, orders, supply chain
• Human resources: employee records, salaries, tax deductions
• Databases can be very large.
• Databases touch all aspects of our lives
3 level of abstraction in DBMS
Data Models
• A collection of tools for describing
• Data
• Data relationships
• Data constraints
• Relational model
• Entity-Relationship data model (mainly for database design)
• Object-based data models (Object-oriented and Object-relational)
• Semi structured data model (XML)
• Other older models:
• Network model
• Hierarchical model
Relational Model
• All the data is stored in various tables.
• Example of tabular data in the relational model
Columns

Rows
A Sample Relational Database
Database Language

• A DBMS has appropriate


languages and interfaces to
express database queries and
updates.
• Database languages can be used
to read, store and update the
data in the database.
1. Data Definition Language 2. Data Manipulation Language
• DDL stands for Data Definition Language. DML stands for
It is used to define database structure or Data Manipulation Language. It is used for
pattern. accessing and manipulating data in a
• It is used to create schema, tables, database. It handles user requests.
indexes, constraints, etc. in the database. • Select: It is used to retrieve data from a
• Using the DDL statements, you can create database.
the skeleton of the database. • Insert: It is used to insert data into a
• Data definition language is used to store table.
the information of metadata like the • Update: It is used to update existing data
number of tables and schemas, their within a table.
names, indexes, columns in each table, • Delete: It is used to delete all records
constraints, etc. from a table.
• Eg. Create, Alter, Drop, Truncate, Rename, • Merge: It performs INSERT operation, i.e.,
Comment insert or update operations.
3. Data Control Language 4. Transaction Control Language
• DCL stands for Data Control Language.
• TCL is used to run the changes made
It is used to retrieve the stored or
saved data. by the DML statement. TCL can be
grouped into a logical transaction.
• The DCL execution is transactional. It
also has rollback parameters. • Here are some tasks that come
• (But in Oracle database, the execution under TCL:
of data control language does not • Commit: It is used to save the
have the feature of rolling back.) transaction on the database.
• Here are some tasks that come under • Rollback: It is used to restore the
database to original since the last
DCL:
Commit.
• Grant: It is used to give user access
privileges to a database.
• Revoke: It is used to take back
permissions from the user.
Database User and Administrator
• A primary goal of a database system is to retrieve information from and store
new information into the database. People who work with a database can be
categorized as database users or database administrators
• Database User:
• Naive users : are unsophisticated users who interact with the system by invoking one of the
application programs that have been written previously. For example, a clerk in the university
• Application programmers are computer professionals who write application programs.
Application programmers can choose from many tools to develop user interfaces.
• Sophisticated users interact with the system without writing programs. Instead, they form
their requests either using a database query language or by using tools such as data analysis
software. Analysts who submit queries to explore data in the database fall in this category.
• Specialized users are sophisticated users who write specialized database applications that do
not fit into the traditional data-processing framework. Among these applications are computer-
aided design systems, knowledgebase and expert systems, systems that store data with complex
data types (for example, graphics data and audio data), and environment- modelling systems.
Database Administrator
• The functions of a DBA include:
• Schema definition. The DBA creates the original database schema by executing a set of data
definition statements in the DDL.
• Storage structure and access-method definition.
• Schema and physical-organization modification. The DBA carries out changes to the schema
and physical organization to reflect the changing needs of the organization, or to alter the physical
organization to improve performance.
• Granting of authorization for data access. By granting different types of authorization, the
database administrator can regulate which parts of the database various users can access.
• Routine maintenance. Examples of the database administrator’s routine maintenance activities
are:
• Periodically backing up the database, either onto tapes or onto remote servers, to prevent loss of data in case of
disasters such as flooding.
• Ensuring that enough free disk space is available for normal operations, and upgrading disk space as required.
• Monitoring jobs running on the database and ensuring that performance is not degraded by very expensive tasks
submitted by some users.
Database System Structure
• DDL Compiler - Data Description Language compiler processes schema definitions specified
in the DDL. It includes metadata information such as the name of the files, data items,
storage details of each file, mapping information and constraints etc.
• DML Compiler and Query optimizer - The DML commands such as insert, update, delete,
retrieve from the application program are sent to the DML compiler for compilation into
object code for database access. The object code is then optimized in the best way to
execute a query by the query optimizer and then send to the data manager.
• Data Manager - The Data Manager is the central software component of the DBMS also
knows as Database Control System.
• The Main Functions of Data Manager is: –
• Convert operations in user's Queries coming from the application programs or combination of DML
Compiler and Query optimizer which is known as Query Processor from user's logical view to physical
file system.
• Controls DBMS information access that is stored on disk
• It also controls handling buffers in main memory.
• It also enforces constraints to maintain consistency and integrity of the data.
• It also synchronizes the simultaneous operations performed by the concurrent users.
• It also controls the backup and recovery operations.
• Data Dictionary - Data Dictionary is a repository of description of data in the database. It contains
information about
• Data - names of the tables, names of attributes of each table, length of attributes, and number of rows in each table.
• Relationships between database transactions and data items referenced by them which is useful in determining which
transactions are affected when certain data definitions are changed
• Constraints on data i.e. range of values permitted
• Detailed information on physical database design such as storage structure, access paths, files and record sizes.
• Access Authorization - is the Description of database users their responsibilities and their access rights
Importance of Data Dictionary

• It improves the control of DBA over the information system and user's understanding of use of the system
• It helps in documenting the database design process by storing documentation of the result of every design phase and
design decisions.
• It helps in searching the views on the database definitions of those views.
• It provides great assistance in producing a report of which data elements (i.e. data values) are used in all the programs.
• It promotes data independence i.e. by addition or modifications of structures in the database application program are
not affected.
• Data Files - It contains the data portion of the database.
• Compiled DML - The DML compiler converts the high level Queries into low level file access commands
known as compiled DML.
• End Users - Discussed in people dealing with database
Challenges in building a DBMS
• Growing complexity in landscape. ...
• Limits on scalability. ...
• Increasing data volumes. ...
• Data security. ...
• Decentralized data management. ..
Components of DBMS

• Software
• Hardware
• Data
• Procedures
• Database Access Language
• Query Processor
• Run Time Database Manager
• Report Writer

You might also like