Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

AUTHOR-BLOGSHUB.

NET

UNIT 1-DATABASE SYSTEM CONCEPT

 Data
 Data is the information which has been translated into a form
that is more convenient to process or move.
 Data is the raw fact or material that can be processed for any
computing machine.
 Data is a collection of facts, such as numbers, words,
measurements, observations or just description of things.
 Data is a systematic record of a specific quantity or thing.

 Information
 Information is a organized data which has been same meaningful
values for the receiver.
 Information is a data that has been converted into a more useful
or intelligible form.

 Database
 A Database is an organized collection of data, so that it can be
easily access and manage.
 A database is a systematic or organized collection pf related
information that is stored in such way that it can be easily
accessed, retrived, managed and update.
 A database is a systematic collection of data.
AUTHOR-BLOGSHUB.NET

 Database Management System (DBMS)


 A database management system (DBMS) is a software that is
used to manage data from a database.
 DBMS is a software to create and manage databases, allowing
users to create, read, update, and delete data in database.
 DBMS is a computerized data keeping system.

 File Processing System


 After invention of computers, it becomes easy to store data with
the help of files.
 Traditional file processing system is a computer based system in
which all the information is stored in various computer files.

 Advantages of DBMS over File Processing System


1. Controlling Data Redundancy
2. Easy Access to Data
3. Data Consistency
4. Sharing of Data
5. Data Independence
6. Data Control
7. Security
8. Control over Concurrency
9. Metadata Management
10. Flexible
AUTHOR-BLOGSHUB.NET

 Controlling Data Redundancy


 Data Redundancy in DBMS is having several or multiple copies of
the same data in the database.
 Redundancy may cause inconsistency in data when they are not
properly updated.
 It is important to remove redundant data from the database as it
generates data redundancy in the DBMS and it can be done using
deleting unused data from the database.
 We can also control data redundancy by normalizing databases.

 Easy Access to Data


 A Data Base Management System is a system software for easy,
efficient and reliable data processing and management.
 Data access is the on-demand, authorized ability to retrieve,
modify, copy, or move data from system.
 With data access, users can perform these functions in any location.

 Data Consistency
 Data Consistency means a set of rules that ensure that all data
points in the database system are correctly read and accepted.
 Data consistency means that each user sees a consistent view of the
data, including visible changes made by the user's own transactions
and transactions of other users.
 Data consistency is obtained by the controlling data redundancy.

 Sharing of Data
 Data sharing is the process of making the same data resources
available to multiple applications, users, or organizations.
 In DBMS, data can be easily shared by different applications.
AUTHOR-BLOGSHUB.NET

 Multiple users can be authorized to access the same data


simultaneously.

 Data Independence
 Data independence is the ability to modify one level of a DBMS
without affecting the next higher level's data structure or access
methods.
 It's of two types, physical and logical.
 Physical data independence allows you to modify the physical level
without affecting the conceptual and view level.
 Logical independence makes sure that modifying the logical schema
wouldn't affect the view level.

 Data Control
 Database control refers to the task of enforcing regulations so as to
provide correct data to authentic users and applications of a
database.
 DBMS is provide the centralized data storage, hence keeping control
on data is much more easy than traditional file processing system.

 Security
 Data security is the process of protecting data from unauthorized
access.
 Security is the protection of a database against both intentional and
unintentional threats, which might be computer-based or non-
computer based.
 Security of data base is controlled by Database Administrator (DBA).
AUTHOR-BLOGSHUB.NET

 Control over Concurrency


 Concurrency control required to maintain consistency data.
 Concurrency control concept comes under the Transaction in
database management system (DBMS).
 It is a procedure in DBMS which helps us for the management of
two simultaneous processes to execute without conflicts between
each other

 Metadata Management
 It describes the context and information about data, the way that
data is stored and the various relations among data.
 Metadata in a relational DBMS stores data about Constraints, Table
Relationships, Data Types, Columns, Tables, and so on.

 Flexible
 With time, data storage costs reduce, making storing data in tables
more flexible.
 It eliminated data redundancy while at the same time providing
easier access to data.

 Application of Database
1. Telecom
2. Banking
3. Industry
4. E-Commerce
5. Airlines
6. Education Systems
7. Railway Reservation System
8. Library Management System
9. Social Media Sites
AUTHOR-BLOGSHUB.NET

 Telecom
 There is a database to keeps track of the information regarding calls
made, network usage, customer details etc.
 Without the database systems it is hard to maintain that huge
amount of data that keeps updating every millisecond.

 Banking
 To track client accounts, balances, and deposits, banks employ
databases.
 Databases may be used by retail shops to hold information on
inventory, sales, customers, and prices.

 Industry
 Users within a company can access, update and delete data in a
database or information system.
 This information is easily available to users when the company's
information systems are integrated with the relational DBMS.

 E-Commerce
 In an e-commerce application, the main purpose of a database is to
store information for retrieving the product details, customer
information, track transactions.
 Databases help e-commerce sites to update and hold information
regarding products.

 Airlines
 Airlines use databases for storing passenger information when
tickets are booked and when passengers check-in at the airport.
AUTHOR-BLOGSHUB.NET

 Education Systems
 A student database management system manages, organizes and
analyze student data regarding attendance, exam results,
homework, assignments, etc.
 Teachers can use these reports to study the students' performance
and give them meaningful feedback.

 Railway Reservation System


 The main application is to design and develop a database that
maintaining the records of different trains, passengers, tracks,
stations, schedule and routes.
 It can also consists of station names, the tracks that connect those
stations, schedules of the train and the information of the station.

 Library Management System


 There will be so many numbers of books in the library and it is very
hard to keep a record of all the books in a register or a copy.
 DBMS is necessary to keep track of all the book records, issue dates,
name of the books, author and maintain the records.

 Social Media Sites


 In social media sites by filling the required details we are able to
access social media platforms.
 Many users sign up daily on social websites such as Facebook,
Pinterest and Instagram.
 All the information related to the users are stored and maintained
with the help of DBMS.
AUTHOR-BLOGSHUB.NET

 Three Level Architecture for Database System


1. Physical level / Internal Schema
2. Logical level / Conceptual Schema
3. View level / External Schema

The main objective of three level architecture is to enable


multiple users to access the same data with a personalized view
while storing the underlying data only once. Thus it separates the
user's view from the physical structure of the database.
AUTHOR-BLOGSHUB.NET

 Physical Level
 The physical level describes the physical storage structure of the
database.
 The physical level is also known as a internal schema.
 Physical level is used in data management to describe how data is
to be represented and stored (files, indices, et al.) in secondary
storage using a particular database management system.
 e.g. Oracle RDBMS, Sybase SQL Server, etc.

 Logical Level
 The Logical level is at a higher level than the physical level.
 It is also known as the conceptual schema.
 It describes how the database appears to the users conceptually
and the relationships between various data tables.
 Conceptual schema is a representation of the entire content of the
database.
 These schema contains all the information to build relevant external
records.

 View Level
 View Level is the highest level in this architecture.
 It is also known a the External Schema.
 There are different views at this level that define the parts of the
overall data of the database.
 This level is for the end-user interaction at this level, end users can
access the data based on their queries.

 Data Abstraction
 Data abstraction means hiding unnecessary background details
from the end user to make the accessing of data easy and secure.
 Data Abstraction is a process of hiding unwanted or irrelevant
details from the end user.
AUTHOR-BLOGSHUB.NET

 Instance and Schema

 Instance
 Instance basically refers to a collection of data and information that
the database stores at any particular moment.
 An instance is also called a current state or database state.
Eg. Let's say we have a single table student in the database; today,
the table has 100 records, so today, the instance of the database
has 100 records.

 Schema
 Schema refers to the overall description of any given database.
 A database schema defines how data is organized within a
relational database or how the data is represented to a user.
 This is inclusive of logical constraints such as, table names, fields,
data types, and the relationships between these entities.

 Types of Schemas
1. Physical Schema
2. Logical Schema
3. View Schema

 Physical Schema
Physical schema is a term used in data management to describe
how data is to be represented and stored (files, indices, et al.) in
secondary storage

 Logical Schema
The logical schema defines the structure of the data itself and the
relationships between the various attributes, tables, and entries.
AUTHOR-BLOGSHUB.NET

 View Schema
 View Schema defines the design of the database at the view level
of the data abstraction.
 It defines how an end-user will interact with the database system.

 Data Independence
Data independence refers characteristic of being able to modify the
schema at one level of the database system without altering the
schema at the next higher level.

 Types of Data Independence


1. Physical Independence
2. Logical Independence

 Physical Independence
Physical Data Independence means changing the physical level
without affecting the logical level or conceptual level.
Eg. 1.Making use of new storage technology, such as a hard drive or
magnetic tapes.
2.Change the location of the database from one drive to another.
3.Changing the database's file organization.

 Logical Independence
Logical data independence means being able to change the
conceptual schema without having to change the external schema.
Eg. changes in logical independence are Adding, deleting, or
modifying the entity or relationship.
AUTHOR-BLOGSHUB.NET

 Overall Structure of DBMS

DBMS as an interface between the user and the database.


The user requests the DBMS to perform various operations (insert,
delete, update and retrieval) on the database. The components of
DBMS perform these requested operations on the database and
provide necessary data to the users. The various components of
DBMS are shown below: -

Structure of DBMS

1. DDL Compiler
i. Data Description Language compiler processes schema
definitions specified in the DDL.
ii. It includes metadata information such as the name of the files,
data items, storage details of each file, mapping information and
constraints etc.
AUTHOR-BLOGSHUB.NET

2. DML Compiler and Query optimizer


i. 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.
ii. 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.

3. Data Manager
i. The Data Manager is the central software component of the
DBMS also knows as Database Control System.

 The Main Functions of Data Manager Are: –


 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.

4. Data Dictionary
 Data Dictionary is a repository of description of data in the
database.
 Data dictionary is used to actually control the data integrity,
database operation and accuracy. It may be used as a important
part of the DBMS.
 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
AUTHOR-BLOGSHUB.NET

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


Data Dictionary is necessary in the databases due to following
reasons:

 It improves the control of DBA over the information system and


user's understanding of use of the system.
 It helps in documentating 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
effected.

5. Data Files - It contains the data portion of the database.

6. Compiled DML - The DML complier converts the high level Queries
into low level file access commands known as compiled DML.

7. End Users - They are already discussed in previous section.


AUTHOR-BLOGSHUB.NET

 Data Modelling
 The process of analysis of data object and their relationships to
other data objects is known as data modelling.
 It is the conceptual representation of data in database.
 Data models define how data is connected to each other and hoe
they are processed and stored inside the system.
 A data models provides a way to describes the design of a database
at the physical, logical and view levels.

 Types of Data Models


1. Relational model
2. Hierarchical model
3. Network model
4. Entity-relationship model

 Relational Model
 The relational model is developed by E. F. Codd.
 The Relational database is a type of record-based relations.
 Relational model can represent as a table with columns and rows.
 Tables are used to represent their relationships.
 Table is collection of rows and columns.
 Tables are also known as relation.
 Records are known as tuple.
 Fields are known as attribute.
 The relational model is called as record based model because the
database is structured in fixed format records of different types.
Eg.
AUTHOR-BLOGSHUB.NET

 Advantages of Relational Model


1. Support SQL
2. Flexible
3. Ease of use
4. Accuracy

 Hierarchical Model
 A data model in which a data is organized into a tree structure is
known as hierarchical data model.
 Hierarchical data model structure contains parent child relationship
where root of the tree is a parent which then branches into its
children.
 The data is stored in the form of records.These records are
connected to the one other.
 The record is collections of field and each field contains only one
value.
Eg.

Hierarchical Model

 Advantages of Hierarchical Model


 Simple to Understand
 Database Integrity
 Efficient
AUTHOR-BLOGSHUB.NET

 Network Model
 It is an extended model of hierarchical data model.
 This data model is also represented as hierarchical, but any child in
the tree can have multiple parents.
 In network data model there is no need of parent child association.
 There is no downward tree structure.
 It is the flexible way of representing the objects and their
relationships.
 A network data model allows multiple record linked in the same file.
Eg.

Network Model

 Advantages of Network Model


 Design is simple.
 Capability to handle multiple relationships.
 Easy to access.
AUTHOR-BLOGSHUB.NET

 Entity Relationship Model


 It is a high-level data model.
 This model is used to define the data elements and relationship for
a specified system.
 Entity relationship model is a graphical representation that shows
the relationships among people, objects, places, concepts or
events within an information technology (IT) system.
 It develops a conceptual design for the database.
 It also develops a very simple and easy to design view of data.
 Eg.

Entity Relationship Model

 Advantages of Entity Relationship Model


 Simple Design
 Effective Representation
 Connected with Relational Model
AUTHOR-BLOGSHUB.NET

 Data Modelling using E-R Model


 Entity
 An entity is referred to as an object or thing that exists in the real
world.
 Entity has certain properties called attributes that define the nature
of the entity.

 Entity Set
 An entity set is a grouping of entities that share the same attributes.
In other words, an entity set is a group of distinct entities that have
the same properties.

 Strong Entity Set


 A strong entity set is an entity set that contains sufficient attributes
to identify all its entities uniquely.
 A primary key exists for the strong entity set.

 Weak Entity Set


 A weak entity set is an entity set that does not contain sufficient
attributes to identify its records uniquely.

 Types of Entity
1. Strong Entity or Regular Entity
2. Weak Entity

 Strong Entity
 A strong entity is an entity that is not dependent on any other
entity.
 A strong entity is an entity type whose existence doesn't depend on
any other entity.
 Strong entity types have a key attribute.
 The key attribute helps in identifying each entity uniquely.
 Strong Entity is denoted by a single rectangle.
AUTHOR-BLOGSHUB.NET

Eg. the "Customer" is the entity type with attributes such as ID,
Name, Gender, and Phone Number. Customer is a strong entity type
as it has a unique ID for each customer.

 Weak Entity
 The weak entity in DBMS do not have a primary key and are
dependent on the parent entity.
 It mainly depends on other entities.
 Weak entity is an entity that cannot be uniquely identified by its
attributes alone; therefore, it must use a foreign key in conjunction
with its attributes to create a primary key.
Eg. An entity set of cars having attributes such as a car's color, and
a car's name is a weak entity since two cars can have the same color
as well as the same name. So, none of the attributes can be
considered the primary key, and hence the entity set is weak.

 Attributes
 we have entities, and each entity contains some property about
their behavior which is called the attribute.
 An attributes an characteristics of an entity.
 All attributes have their own values.

 Types of Attributes
1. Single Valued Attribute
2. Multi Valued Attribute
3. Simple Attribute
4. Composite Attribute
5. Derived Attribute

 Single Valued Attribute


 A single valued attribute is the attribute which can hold a single
value for the single entity.
AUTHOR-BLOGSHUB.NET

Eg. A single person have only one AADHAR Number .

 Multi Valued Attribute


 A multi valued attribute is the attribute which can hold a multiple
values for the single entity.
Eg.A single person can have multiple contact number.

 Simple Attribute
 A attribute whose value can not be further divided is known as
simple attribute.
Eg.In the entity student,student age cannot be divided.

 Composite attribute
 A attribute whose value can be further divided is known as
composite attribute.
Eg.In the entity of student,the student name can be further divided
into first name,middle name and last name.

 Derived Attribute
 Derived attributes are the attributes that do not exist in the physical
database, but their values are derived from other attributes present
in the database.
Eg.In the student entity,the student average age is not present
physically but we can calculate by student_age.

 E-R Diagram
 The pictorial representation of data using different conventions
which state that how these data are related with each other is
known as E-R (Entity Relationship)Diagram.
 It express the logical structure of database in graphical manner.
AUTHOR-BLOGSHUB.NET

 Various Symbols used in E-R Diagram


AUTHOR-BLOGSHUB.NET

 Mapping Cardinality in E-R Diagram

 Mapping Cardinality in E-R Diagram


1. One to One
2. One to Many
3. Many to One
4. Many to Many

 One to One
 A one-to-one (1:1) relationship describes a situation where one
occurrence of an entity relates to exactly one occurrence of
another entity.
AUTHOR-BLOGSHUB.NET

 One to Many
 A one-to-many (1:N) relationship describes a situation where one
occurrence in an entity relates to many occurrences in another
entity.

 Many to One
 A Many-to-One relationship is defined as a relationship between
several instances of one entity and one instance of another entity.

Many to One Relationship

 Many to Many
 A Many-to-Many relationship is defined as a relationship between
several instances of one entity with several instance of another
entity.

Many to Many Relationship


AUTHOR-BLOGSHUB.NET

 Draw an E-R Diagram for customer branch and account relationship

 Draw an E-R Diagram for student and college

You might also like