Come 301 Dbms Lecture 1 Presentation Slides
Come 301 Dbms Lecture 1 Presentation Slides
MANAGEMENT
SYSTEMS
LECTURE 1
Data, Information and File
• Data: are the known facts or figures that have implicit meaning. It can
also be defined as it is the representation of facts, concepts or
instructions in a formal manner, which is suitable for understanding
and processing. Data can be represented in alphabets (A-Z, a-z), digits
(0-9) and using special characters (+,-.#,$, etc) e.g: 25, “ajit” etc.
• Information: Information is the processed data on which decisions
and actions are based. Information can be defined as the organized
and classified data to provide meaningful values. Eg: “The age of Ravi
is 25” File:
• File: is a collection of related data stored in secondary memory.
File Oriented Approach
• Data Item: The data item is also called as field in data processing and is
the smallest unit of data that has meaning to its users. Eg: “e101”, ”sumit”
• Entities: An entity is a thing or object in the real world that is
distinguishable from all other objects
• Eg: Bank, employee, student
• Attributes: Attributes are properties are of an entity.
• Eg: Empcode, ename, rolno, name
• Logical data and physical data: Logical data are the data for the table
created by user in primary memory. Physical data refers to the data stored
in the secondary memory.
Schema and sub-schema
• A schema is a logical database description and is drawn as a chart of the types of data that are
used. It gives the names of the entities and attributes and specify the relationships between them.
• A database schema includes such information as:
• Characteristics of data items such as entities and attributes.
• Logical structures and relationships among these data items.
• Format for storage representation.
• Integrity parameters such as physical authorization and back up policies.
• A subschema is derived schema derived from existing schema as per the user requirement.
There may be more then one subschema create for a single conceptual schema. Three Level
Architecture of DBMS
Three Level Architecture of DBMS
• 1. External Level: The external level is at the highest level of database abstraction. At
this level, there will be many views define for different users requirement. A view will
describe only a subset of the database. Any number of user views may exist for a given
global schema(conceptual schema). For example, each student has different view of the
time table. the view of a student of BTech (CSE) is different from the view of the
student of Btech (ECE). Thus this level of abstraction is concerned with different
categories of users. Each external view is described by means of a schema called sub
schema.
• 2. Conceptual Level: At this level of database abstraction all the database entities and
the relationships among them are included. One conceptual view represents the entire
database. This conceptual view is defined by the conceptual schema. The conceptual
schema hides the details of physical storage structures and concentrate on describing
entities, data types, relationships, user operations and constraints. It describes all the
records and relationships included in the conceptual view. There is only one conceptual
schema per database. It includes feature that specify the checks to relation data
consistency and integrity.
Three Level Architecture of DBMS
• 3. Internal level: It is the lowest level of abstraction closest to the physical
storage method used. It indicates how the data will be stored and describes
the data structures and access methods to be used by the database. The
internal view is expressed by internal schema.
• The following aspects are considered at this level:
• 1. Storage allocation e.g: B-tree, hashing
• 2. Access paths eg. specification of primary and secondary keys, indexes etc
• 3. Miscellaneous eg. Data compression and encryption techniques, optimization of the
internal structures.
Database users
• Naive Users: Users who need not be aware of the presence of the database system or any
other system supporting their usage are considered naïve users . A user of an automatic
teller machine falls on this category.
• Online Users: These are users who may communicate with the database directly via an
online terminal or indirectly via a user interface and application program. These users are
aware of the database system and also know the data manipulation language system.
• Application Programmers: Professional programmers who are responsible for developing
application programs or user interfaces utilized by the naïve and online user falls into this
category.
• Database Administration: A person who has central control over the system is called
database administrator . The function of DBA are:
• 1. Creation and modification of conceptual Schema definition
• 2. Implementation of storage structure and access method.
• 3. Schema and physical organization modifications .
• 4. Granting of authorization for data access.
• 5. Integrity constraints specification.
• 6. Execute immediate recovery procedure in case of failures
• 7. Ensure physical security to database
Database language
• 1) Data definition language (DDL): DDL is used to define database objects.The
conceptual schema is specified by a set of definitions expressed by this language. It also
gives some details about how to implement this schema in the physical devices used to
store the data. This definition includes all the entity sets and their associated attributes
and their relationships. The result of DDL statements will be a set of tables that are
stored in special file called data dictionary.
• 2) Data Manipulation Language (DML): A DML is a language that enables users to
access or manipulate data stored in the database. Data manipulation involves retrieval
of data from the database, insertion of new data into the database and deletion of data
or modification of existing data.
• There are basically two types of DML:
• Procedural: Which requires a user to specify what data is needed and how to get it.
• Non-Procedural: which requires a user to specify what data is needed without specifying how to
get it.
• 3) Data Control Language (DCL): This language enables user to grant authorization and
canceling authorization of database objects
Elements of DBMS
• DML Pre-Compiler: It converts DML statements embedded in an
application program to normal procedure calls in the host language. The
pre-complier must interact with the query processor in order to
generate the appropriate code.
• DDL Compiler: The DDL compiler converts the data definition
statements into a set of tables. These tables contains information
concerning the database and are in a form that can be used by other
components of the dbms.
• File Manager: File manager manages the allocation of space on disk
storage and the data structure used to represent information stored on
disk.
Elements of DBMS
• Database Manager: A database manager is a program module which provides the interface
between the low level data stored in the database and the application programs and queries
submitted to the system. The responsibilities of database manager are:
• 1. Interaction with File Manager: The data is stored on the disk using the file system which is
provided by operating system. The database manager translate the different DML statements into
low-level file system commands so the database manager is responsible for the actual storing,
retrieving and updating of data in the database.
• 2. Integrity Enforcement: The data values stored in the database must satisfy certain constraints
(eg: the age of a person can't be less then zero). These constraints are specified by DBA. Data
manager checks the constraints and if it satisfies then it stores the data in the database.
• 3. Security Enforcement: Data manager checks the security measures for database from
unauthorized users.
• 4. Backup and Recovery: Database manager detects the failures occur due to different causes (like
disk failure, power failure, deadlock, software error) and restores the database to original state of
the database.
• 5. Concurrency Control: When several users access the same database file simultaneously, there
may be possibilities of data inconsistency. It is responsible of database manager to control the
problems occur for concurrent transactions.
Elements of DBMS
• Query Processor: The query processor used to interpret to online user’s
query and convert it into an efficient series of operations in a form
capable of being sent to the data manager for execution. The query
processor uses the data dictionary to find the details of data file and
using this information it create query plan/access plan to execute the
query.
• Data Dictionary: Data dictionary is the table which contains the
information about database objects. It contains information like 1.
external, conceptual and internal database description 2. description of
entities, attributes as well as meaning of data elements 3. synonyms,
authorization and security codes 4. database authorization