0% found this document useful (0 votes)
10 views

Veda_file-5

The document provides an overview of data processing, file processing, and database management systems (DBMS), detailing the steps involved in data processing and the basic terminologies related to databases. It discusses the advantages and disadvantages of databases, the characteristics of DBMS, and the types of database languages, including DDL, DML, and DCL. Additionally, it covers various database models, the importance of ER diagrams, and the components of these diagrams, such as entities and attributes.

Uploaded by

Rachana Dhimal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Veda_file-5

The document provides an overview of data processing, file processing, and database management systems (DBMS), detailing the steps involved in data processing and the basic terminologies related to databases. It discusses the advantages and disadvantages of databases, the characteristics of DBMS, and the types of database languages, including DDL, DML, and DCL. Additionally, it covers various database models, the importance of ER diagrams, and the components of these diagrams, such as entities and attributes.

Uploaded by

Rachana Dhimal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

Unit 6

Database
Data Processing:
• Data processing is the re-structuring or re-ordering of data by people or
machine to increase their usefulness and add values for a particular
purpose.
• Data processing also refers to the complete check of the data validity,
accuracy, consistence, integrity, and its relevance to the client’s
requirements.
Steps in Data Processing :
1. Preparation of source document
2. Input of data
3. Manipulation of data
4. Output of information
5. Data storage
File Processing:
• File processing is the process of creating, storing, and accessing content of
files. For example, you are saving a word processing file to a hard drive.
Similarly, if you store some files on a floppy disk or you retrieve a file from
CD-ROM, it is file processing. File processing may be either sequential or
direct access file processing.
1. Sequential File Processing: it is just working through the input file one
record at a time in the sequence that the information has been stored.
‘Sequential’ is still a kind of file organization. Magnetic tape is the major
example of sequential file processing.
2. Direct-access file processing: Organization refers to the structured
arrangement of resources, people, and processes to achieve specific
goals efficiently. Example: Hard drives, SSDs, Pen drive etc.
Basic Terminologies:
• Data :Data is defined as the raw facts’ figures. It could be any numbers, alphabets
of any combinations of it.
• Information :When data are processed using a database program or software,
they are converted to the meaningful result called information.
• Field: Field is a column in a table that contains specific piece of information
within a record. It is the property or attributes of a table.
• Record: Record is a row in a table that contains information about person, event,
etc. It is a collection of interrelated fields. Another name of record is tuple.
• Table: Table is the arrangement of rows and columns. Each table must have
unique name and must be simple.
• File: a group of related records is a data file when it is independent of any other
files related to it, a single may be referred to as a flat file.
• Primary Key: Primary key is a column or a set of columns in a table whose values
uniquely identify a row in a table.
• Foreign Key: Foreign key is a column or a set of columns in a table whose values
correspond to the values of the primary key in another table which is used to
connect two tables or maintain relationship between them.
• Attributes: Attributes are the describing characteristics or properties that
define all items pertaining (related) to a certain category applied to all cells
of a column.
• Database Model: It is a way of organizing data and its interrelationship.
• SQL: SQL (Structured Query Language) is a standard programming language
used to manage and manipulate relational databases. It is used for tasks
such as querying, updating, inserting, and deleting data.
• MS Access: Microsoft Access is a Database Management System (DBMS)
from Microsoft that combines the relational Microsoft Jet Database Engine
with a graphical user interface and software development tools. It is a part
of the Microsoft Office suite of applications. It stores data in its own format
based on the Access Jet Database Engine. Objective: Table, Query, Form,
Report, Macros etc.
Data and Information
Data Information

Data is unorganized and unrefined facts . Information comprises processed,


organized data presented in a
meaningful context
Data is an individual unit that contains Information is a group of data that
row materials which do not carry any collectively carries a logical meaning.
specific meaning.
Data doesn’t depend on information. Information depends on data
Database:
• A database is a collection of information that is organized so that it
can be easily accessed, managed and updated.
• Database is a collection of interrelated data of entities or objects
which is stored in a computer in such a way that it can be easily
accessed by a user.
• The most obvious example of non-computerized database is a
telephone directory would use database to store data related to
people, phone numbers, other contact details etc.
Advantages of Database:
1.Reduce Data Redundancy:
Centralized control minimizes unnecessary data duplication and storage
requirements, streamlining processing.
2.Shared Data:
Multiple users or applications can share the same data, enhancing
collaboration and efficiency.
3.Elimination of Inconsistencies:
Avoiding data duplication ensures consistent and reliable information across
the system.
4.Integrity: Built-in checks ensure data accuracy and consistency, enforcing
rules for valid data entry.
5.Conflict Resolution:
The DBA optimizes file structures and access methods to balance
performance and user requirements.
6.Data Independence:
•Physical Independence: Changes in physical storage or file
organization don’t affect applications.
•Logical Independence: Applications remain unaffected by changes in
the database schema.
7.Security: Ensures protection of confidential data through controlled
access and authentication mechanisms.
8.Data Backup and Recovery: Safeguards against data loss by storing
backups and providing recovery options.
9. Improved decision making
10.Increased end user productivity
Disadvantages of Database:
1. Complexity: A database management system is highly complex. Administrators, designers, and
users must be trained to use it effectively.
2. Size: The database management system consumes a substantial amount of main memory as
well as a large number amount of disk space in order to make it run efficiently.
3. Cost: Cost of DBMS A multi-user database management system may be very expensive. Even
after the installation, there is a high recurrent annual maintenance cost on the software.
4. Cost of conversion: When moving from a file-base system to a database system, the company
is required to have additional expenses on hardware acquisition and training cost.
5. Performance: As the database approach is to cater for many applications rather than
exclusively for a particular one, some applications may not run as fast as before.
6. Higher impact of a failure: A database failure can have a big impact because all users and
applications depend on it. If any part fails, operations may stop, affecting customer services.
Database Management System (DBMS):
• DBMS is a set of software programs that is used to manages the database
structure and controls access to the data stored in a database.
• DBMS provides an interface to perform various operations like database creation,
storing data in it, updating data, creating a table in the database and a lot more.
• It provides protection and security to the database In the case of multiple users.
E.g., dbase, Oracle, MS-Access, MySQL, Fox base, Fox pro, etc.
The Major Uses of DBMS
• Database integration and reporting
• Application development
• Database access and maintenance
• Database creation and modification
Characteristics of DBMS
• Capacity to store large amount of data
• Capacity to interrogating data files, retrieving and modifying and
recording the data change.
• Data Independence
• Data Shared
• Correctness
• Build the confidentiality
• Minimize the duplication of data
• Security
Advantages of DBMS
• Controls database redundancy: It can control data redundancy because it stores all the
data in one single database le and that recorded data is placed in the database.
• Data sharing: In DBMS, the authorized users of an organization can share the data
among multiple users.
• Easily Maintenance: It can be easily maintainable due to the centralized nature of the
database system.
• Reduce time: It reduces development time and maintenance need.
• Backup: It provides backup and recovery subsystems which create automatic backup of
data from hardware and software failures and restores the data if required.
• Data consistency: Data inconsistency is due to data redundancy . Elimination of data
redundancy makes data in database consistent.
• Data Integrity: Data in the database must be correct and consistent.
• multiple user interface: It provides different types of user interfaces like graphical user
interfaces, application program interfaces.
• Improved data access
• Improved decision making
• Increased end user productivity
Disadvantages of DBMS
• Cost of Hardware and Software: It requires a high speed of data processor
and large memory size to run DBMS software.
• More Disk Space (Size): It occupies a large space of disks and large memory
to run them efficiently.
• Complexity: Database system creates additional complexity and
requirements.
• Higher impact of failure: Failure is highly impacted the database because
in most of the organization, all the data stored in a single database and if
the database is damaged due to electric failure or database corruption
then the data may be lost forever.
• Requirement of technical staff.
Database Schemas/Architectures
• A database Schema is a visual and logical architecture of a database
created on a database management system.
Following are the three levels of database architecture,
1. Physical level
2. Conceptual level
3. External/view level
level Architecture of DBMS

In the above diagram, It shows the architecture of DBMS. Mapping is the process of
transforming request responses between various database levels of architecture.
In Conceptual / Internal mapping, it is necessary to transform the request from the
conceptual to internal levels.
1. Physical Level
• Physical level describes the physical storage structure of data in the
database.
• It is also known as the Internal Level.
• This level is very close to the physical storage of data.
• At the lowest level, it is stored in the form of bits with physical
addresses on the secondary storage device.
• At the highest level, it can be viewed in the form of files.
2. Conceptual Level

• Conceptual level describes the structure of the whole database for a


group of users.
• It is also called the data model.
• Conceptual schema is a representation of the entire content of the
database.
• These schemas contain all the information to build relevant external
records.
• It hides the internal details of physical storage.
3. External Level
• External level is related to the data viewed by individual end users.
• This level includes a number of user views or external schemas.
• This level is closest to the user.
• The external view describes the segment of the database required for
a particular user group and hides the rest of the database from that
user group.
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. It helps to interact with database.
Types of Database Language
1. Data Definition Language :DDL is used to define database structure or
pattern. It is used to create schema, tables, indexes, etc. in the database.
Using the DDL statements, you can create the internal or external framework
of the database.
Here are some tasks that come under DDL:
• Create: It is used to create objects in the database.
• Alter: It is used to modify the structure of the database.
• Drop: It is used to delete objects from the database.
• Truncate: It is used to remove all records from a table.
• Rename: It is used to rename an object.
2. DML (Data Manipulation Language)
• DML stands for Data Manipulation Language. It is used for accessing and
manipulating data in a database. It handles user requests. Here are some tasks
that come under DML:
● Select: It is used to retrieve data from a database.
● Insert: It is used to insert data into a table.
● Update: It is used to update existing data within a table

3. DCL (Data Control Language)


● DCL stands for Data Control Language. It is used to control privilege in
database. It is used to retrieve the stored or saved data.
Here are some tasks that come under DCL:
● Grant: It is used to give user access privileges to a database.
● Revoke: It is used to take back permissions from the user.
There are the following operations which have the authorization of Revoke:
INSERT, EXECUTE, DELETE, UPDATE and SELECT.
RDBMS:(Relational Database Management System)
• RDBMS is a type of DBMS which stores and displays data in tabular format
of rows and columns, like spreadsheet. A table is a collection of related
data entries and contains rows and columns to store data.
• It is based on relational model, implements data in a series of two-
dimensional tables that are related to one another through foreign key.
Advantages of RDBMS:
1. Speed
2. Security
3. Simplicity
4. Accessibility
5. Accuracy
Primary key and Foreign key
• A primary key is a special relational database table column designated
to uniquely identify all table records.
Example : In a student’s database roll_no is unique so it can be taken as
a primary key.
• A foreign key is a column or group of columns in a relational database
table that provides a link between data in two tables. It acts as a cross
reference between tables because it references the primary key of
another table, thereby establishing a link between them.
Features of RDBMS
• Provides data to be stored in tables
• Persists data in the form of rows and columns.
• Provides facility primary key, to uniquely identify the rows
• Creates indexes for quicker data retrieval
• provides a virtual table creation in which sensitive data can be stored
and simplified query can be applied.(views)
• Sharing a common column in two or more tables (primary key and
foreign key)
• Provides multi user accessibility that can be controlled by individual
users.
Database Models
1. Hierarchical Database Model (Least Common)
• The hierarchical database model is a very structured top-down way of
organizing data. That’s to say that the data in this model is organized
in a tree-like structure with the top of the tree being the top of the
hierarchy. For example, consider the hierarchical model of a
University:
Network Database Model:
• A database model where data is organized using a graph structure
with records (nodes) and relationships (edges). It allows many-to-
many relationships using pointers or links.
Relational Database Model
• A relational database model is the most commonly used model when
constructing or redesigning a database. The relational model consists
of multiple tables that bear some relationship with each other. Each
table contains attributes that are the key that forms these
relationships.
Entity Relationship Diagram (ER-Diagram):
• An Entity- relationship model (ER model) describe the structure of a
database with the help of a diagram, which is know as Entity
Relationship Diagram.
• It is a diagram that displays the relationship of entity sets stored in a
database. It shows how different entities (like objects or concepts) are
connected and interact with each other through relationships.
• It contains different symbols that use rectangles to represent entities,
oval to define attributes and diamond shape to represent
relationship.
Need to Draw ER Diagram
• It helps in understanding the data relationships.
• ER diagrams are like a blueprint for designing a database.
• Helps in communicating about databases with database designers,
developers, users, etc.
• They help in describing different relationships and operations within
an organization.
ER-Diagram Symbols:
Components of ER Diagram
1.Entity
An entity is an object or concept about which you want to store
information.
Strong Entity does not depend on other Entity in the Schema. It has a
primary key, that helps in identifying it uniquely, and it is represented
by a rectangle.

Weak Entity
A Weak Entity is an entity that must defined by a foreign key
relationship with another entity as it cannot be uniquely identified by
its own attributes alone.
2. Attribute
• An attribute describes the property of an entity. An attribute is represented
as Oval in an ER diagram. There are four types of attributes:
• 1. Key attribute
2. Composite attribute
3. Multivalued attribute
4. Derived attribute
• 1. Key attribute:
• A key attribute can uniquely identify an entity from an entity set. For
example, student roll number can uniquely identify a student from a set of
students. Key attribute is represented by oval same as other attributes
however the text of key attribute is underlined.
2. Composite Attribute
• An attribute composed of many other attributes is called a
composite attribute. For example, the Address attribute of the
student Entity type consists of Street, City, State, and Country.
3. Multivalued Attribute
• An attribute consisting of more than one value for a given entity. For
example, Phone_No (can be more than one for a given student). In ER
diagram, a multivalued attribute is represented by a double oval.

• 4. Derived Attribute
• An attribute that can be derived from other attributes of the entity type is
known as a derived attribute. e.g.; Age (can be derived from DOB). In ER
diagram, the derived attribute is represented by a dashed oval.
The Complete Entity Type Student with its
Attributes can be represented as:
3. Relationship
• A relationship is represented by diamond shape in ER diagram, it
shows the relationship among entities. There are four types of
relationships:
1. One to One
2. One to Many
3. Many to One
4. Many to Many
2. 1. One to One Relationship
When a single instance of an entity is associated with a single instance
of another entity then it is called one to one relationship. For example,
a person has only one passport and a passport is given to one person.
2. One to Many Relationship
• When a single instance of an entity is associated with more than one
instances of another entity then it is called one to many relationship.
For example – a customer can place many orders but a order cannot
be placed by many customers.
3. Many to One Relationship
• When more than one instances of an entity is associated with a single
instance of another entity then it is called many to one relationship.
For example – many students can study in a single college but a
student cannot study in many colleges at the same time.
• 4. Many to Many Relationship
• When more than one instances of an entity is associated with more
than one instances of another entity then it is called many to many
relationship. For example, a can be assigned to many projects and a
project can be assigned to many students.
or
ER Diagram for Library Management System
symbols

You might also like