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

Department of Information Technology:: VRSEC III/IV B.Tech VTH Sem DBMS - 17IT2505A

The document discusses file systems versus DBMS and describes the structure and components of a DBMS. It provides details on: 1) The key differences between file systems and DBMS, such as crash recovery, redundant data, and query processing capabilities. 2) The main components of a DBMS, including the database manager, query processor, storage manager, and data dictionary. 3) The levels of abstraction in a DBMS - the conceptual, external, and physical schemas and how they provide data independence.
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)
124 views

Department of Information Technology:: VRSEC III/IV B.Tech VTH Sem DBMS - 17IT2505A

The document discusses file systems versus DBMS and describes the structure and components of a DBMS. It provides details on: 1) The key differences between file systems and DBMS, such as crash recovery, redundant data, and query processing capabilities. 2) The main components of a DBMS, including the database manager, query processor, storage manager, and data dictionary. 3) The levels of abstraction in a DBMS - the conceptual, external, and physical schemas and how they provide data independence.
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/ 12

Department of Information Technology:: VRSEC

III/IV B.Tech Vth Sem


DBMS -17IT2505A

Topic : File systems vs DBMS

File system provides the detail of the data representation and storage of data. DBMS provides a
crash recovery mechanism, i.e., DBMS protects the user from the system failure. File
system doesn't have a crash mechanism, i.e., if the system crashes while entering some data, then
the content of the file will lost.

• File system is a software that manages ad organizes the files in a storage medium within a
computer.whereas, DBMS is a software for managing the database.
• In File system Redundant data can be present in a file system. But in DBMS there is no
redundant data.
• File system doesn’t provide backup and recovery of data if it is lost. But DBMs provides
backup and recovery of data even if it is lost.
• There is no efficient query processing in file system. whereas Efficient query processing is
there in DBMS.
• There is less data consistency in file system. whereas there is more data consistency because
of the process of normalization.
• File systems are less complex as compared to DBMS- more complexity in handling as
compared to file system.
• File systems provide less security in comparison to DBMS.
• File systems are less expensive than DBMS
Topic: Advantages of a DBMS

Advantages of DBMS

• Segregation of applicaion program.


• Minimal data duplicacy or data redundancy.
• Easy retrieval of data using the Query Language.
• Reduced development time and maintainance need.
• With Cloud Datacenters, we now have Database Management Systems capable of storing
almost infinite data.
• Seamless integration into the application programming languages which makes it very
easier to add a database to almost any application or website.

Topic: Describing and storing data in a DBMS

Describing and Storing Data in a DBMS


• A data model is a collection of high-level data description constructs that hide many low-level
storage details
• A semantic data model is a more abstract, high-level data model that makes it easier for a user
to come up with a good initial description of the data in an enterprise.
• A database design in terms of a semantic model serves as a useful starting point and is
subsequently translated into a database design in terms of the data model the DBMS actually
supports.
• A widely used semantic data model called the entity-relationship (ER) model allows us to
pictorially denote entities and the relationships among them
The Relational Model
• The central data description construct in this model is relation, which can be thought of as a
set of records.
• A description of data in terms of a data model is called a schema.

• The schema for a relation specifies its name, the name of each field or attribute or column.
• Example: student information in a university database my be stored in a relation with the
following schema (with 5 fields):
• Students(sid: string, name: string, login: string, age: integer, gpa: real)
• An example instance of the Students relation:
sid name login age gpa

53666 Jones jones@cs 18 3.4

53588 Smith smith@ee 18 3.2

• Each row in the Students relation is a record that describes a student. Every row follows the
schema of the Student relation and schema can therefore be regarded as a template for
describing a student.
• We can make the description of a collection of students more precise by specifying integrity
constraints, which are conditions that the records in a relation must staisfy.
•Other notable models: hierarchial model, network model, object-oriented model, and the
object-relational model.
Levels of Abstraction in a DBMS

• A data definition language (DDL) is used to define the external and conceptual schemas.
• Information about conceptual, external, and physical schemas is stored in the system catalogs.
• Any given database has exactly one conceptual schema and one physical schema because it has
just one set of stored relations, but it may have several external schemas, each tailored to a
particular group of users.
Conceptual Schema
• The conceptual schema (sometimes called the logical schema) describes the stored data in
terms of the data model of the DBMS.
• Relations contain information about entities and relationships
Physical Schema
• The physical schema specifies additional storage detail, summarizes how the relations
described in conceptual schema are actually stored on secondary storage devices such as disks
and tapes.
• Decide what file organizations to use to store the relations, then create indexes to speed up data
retrieval operations.
External Schema
• External schemas allow data access to be customized and authorized at the level of individual
user or groups of users.
• Each external schema consists of a collection of views and relations from the conceptual
schema.
• A view is conceptually a relation, but the records in a view are not stored in the DBMS. The
records are computed using a definition for the view, in terms of relations stored in the DBMS.
• The external schema design is guided by the end user requirements.

Data Independence
• Data independence is achieved through the use of the three levels of data abstraction; in
particular, the conceptual schema and the external schema provide distinct benefits in this area.
• Logical data Independence:
• Users can be shielded from changes in the logical structure of the data, or changes in the
choice of relations to be stored.
• Example: Student_public, Student_private => create levels using views in external schema
• Physical data independence:
• The conceptual schema insulates users from changes in the physical storage of the data.
• The conceptual schema hides details such as how the data is actually laid out on disk, the
file structure, and the choice of indexes.

Topic: Structure of a DBMS

• DBMS (Database Management System) acts as an interface between the user and the
database. The user requests the DBMS to perform various operations such as 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.
• Database Manager: The interface between low-level data and application programs and
queries.
• Query Processor translates statements in a query language into low-level instructions
the database manager understands. (May also attempt to find an equivalent but more
efficient form.) The Query Processor simplifies and facilitates access to data. The Query
processor includes the following component.
• Query Evaluation Engine
• The DDL interpreter interprets DDL statements and records the definition in the data
dictionary. The DML compiler translates DML statements in a query language into an
evaluation plan consisting of low-level instructions that the query evaluation engine
understands. The DML compiler also performs query optimization, which is it picks the
lowest cost evaluation plan from among the alternatives. Query evaluation engine executes
low level instructions generated by the DML compiler.
• A parser is a compiler or interpreter component that breaks data into smaller elements for
easy translation into another language.
• The query optimizer (called simply the optimizer) is built-in database software that
determines the most efficient method for a SQL statement to access requested data.
• A query plan (or query execution plan) is a sequence of steps used to access data in
a SQL relational database management system.
• Operator Evaluator: When different operators like =, <, <=, >, >= or ≠ are used in the
query, there are different techniques that a DBMS uses to evaluate it.
• DML Precompiled converts DML statements embedded in an application program to
normal procedure calls in a host language. The precompiled interacts with the query
processor.
• Data Files: store the database itself.
• Data Dictionary: stores information about the structure of the database. It is used heavily.
Great emphasis should be placed on developing a good design and efficient implementation
of the dictionary.
• Indices: provide fast access to data items holding particular values.
• Storage Manager
• The storage manager is important because database typically require a large amount of
storage space. So it is very important efficient use of storage, and to minimize
the movement of data to and from disk .
• 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 the queries submitted to the
system. The Storage manager is responsible for the interaction with the file manager.
• The Storage manager translates the various DML statements into low level file system
commands. Thus the storage manager is responsible for storing, retrieving, and updating
data in the database. The storage manager components include the following.

• Authorization and Integrity Manager

o Transaction Manger
o File Manager
o Buffer Manger

• Authorization and Integrity Manger tests for the satisfaction of integrity constraints and
checks the authority of users to access data. Transaction manager ensures that the database
remains in a consistent state and allowing concurrent transactions to proceed without
conflicting.
• The file manager manages the allocation of space on disk storage and the data structures
used to represent information stored on disk. The Buffer manager is responsible for
fetching the data from disk storage into main memory and deciding what data to cache in
main memory.
• The storage manager implements the following data structures as part of the physical
system implementation. Data File, Data Dictionary, Indices. Data files stores the database
itself. The Data dictionary stores Meta data about the structure of database, in particular
the schema of the database. Indices provide fast access to data items.

• End Users:The second class of users then is end user, who interacts with system from
online workstation or terminals.

Topic: People who work with databases

A variety of people are associated with the creation and use of databases. There are database
implementers, who build DBMS software, and end users who wish to store and use data in a
DBMS. Database implementers work for vendors such as IBM or Oracle.
End users come from a diverse and increasing number of fields. Many end users simply use
applications written by database application programmers (see below) and so require little
technical knowledge about DBMS software.
Sophisticated users who make more extensive use of a DBMS, such as writing their own queries,
require a deeper understanding of its features.

Two other classes of people are associated with a DBMS: application programmers and database
administrators.

Database application programmers develop packages that facilitate data access for end users,
who are usually not computer professionals, using the host or data languages and software tools
that DBMS vendors provide. Application programs should ideally access data through the external
schema. It is possible to write applications that access data at a lower level, but such applications
would compromise data independence.

A personal database is typically maintained by the individual who owns it and uses it.

Corporate or enterprise-wide databases are typically important and complex are maintained by
professional, called the database administrator (DBA).

The DBA is responsible for many critical tasks:

• Design of the Conceptual and Physical Schemas: The DBA is responsible for interacting
with the users of the system to understand what data is to be stored in the DBMS and how
it is likely to be used.
• Security and Authorization: The DBA is responsible for ensuring that unauthorized data
access is not permitted. In general, not everyone should be able to access all the data.
• Data Availability and Recovery from Failures: The DBA must take steps to ensure that
if the system fails, users can continue to access as much of the uncorrupted data as possible
• Database Tuning: Users' needs are likely to evolve with time. The DBA is responsible for
modifying the database, in particular the conceptual and physical schemas, to ensure
adequate performance as requirements change.

Topic: Database Design and ER Diagrams ;Entities, attributes, and Entity sets

ER Model

The ER model defines the conceptual view of a database. It works around real-world entities and
the associations among them. At view level, the ER model is considered a good option for
designing databases.

Entity

An entity can be a real-world object, either animate or inanimate, that can be easily identifiable.

For example, in a school database, students, teachers, classes, and courses offered can be
considered as entities. All these entities have some attributes or properties that give them their
identity.

Attributes
Attributes describe the properties of the entity of which they are associated. (or)
Entities are represented by means of their properties, called attributes. All attributes have values.
For example, a student entity may have name, class, and age as attributes.

There exists a domain or range of values that can be assigned to attributes. For example, a student's
name cannot be a numeric value. It has to be alphabetic. A student's age cannot be negative, etc.

Types of Attributes
• Simple attribute − Simple attributes are atomic values, which cannot be divided further.
For example, a student's phone number is an atomic value of 10 digits.
• Composite attribute − Composite attributes are made of more than one simple attribute.
For example, a student's complete name may have first_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.
For example, average_salary in a department should not be saved directly in the database,
instead it can be derived. For another example, age can be derived from data_of_birth.
• Single-value attribute − Single-value attributes contain single value.
For example − Social_Security_Number.
• Multi-value attribute − Multi-value attributes may contain more than one values.
For example, a person can have more than one phone number, email_address, etc.

These attribute types can come together in a way like −

• simple single-valued attributes


• simple multi-valued attributes
• composite single-valued attributes
• composite multi-valued attributes

Entities are objects or concepts that represent important data. Entities are typically nouns such as
product, customer, location, or promotion. There are three types of entities commonly used in
entity relationship diagrams.

• ERD attribute symbols

• ERD attributes are characteristics of the entity that help users to better understand the
database. Attributes are included to include details of the various entities that are
highlighted in a conceptual ER diagram.
• ERD relationship symbols

• Within entity-relationship diagrams, relationships are used to document the


interaction between two entities. Relationships are usually verbs such as assign,
associate, or track and provide useful information that could not be discerned
with just the entity types.

Relationship Symbol Name Description

Relationship Relationships are associations


between or among entities.

Weak Weak Relationships are


relationship connections between a weak entity
and its owner.

Topic: Additional features of the ER Model

Participation Constraints

• Total Participation − Each entity is involved in the relationship. Total participation is


represented by double lines.
• Partial participation − Not all entities are involved in the relationship. Partial
participation is represented by single lines.
The ER Model has the power of expressing database entities in a conceptual hierarchical manner.
As the hierarchy goes up, it generalizes the view of entities, and as we go deep in the hierarchy, it
gives us the detail of every entity included.

You might also like