0% found this document useful (0 votes)
15 views16 pages

DBMS

The document outlines the characteristics of database management systems (DBMS), including their self-describing nature, program-data independence, and support for multiple user views. It also describes the roles of various actors in a database environment, such as database administrators, designers, and end users, along with essential database concepts like entities, relationships, and schemas. Additionally, it discusses the advantages of using a database approach and the different types of data models and DBMS languages.

Uploaded by

nidhi.karkala26
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)
15 views16 pages

DBMS

The document outlines the characteristics of database management systems (DBMS), including their self-describing nature, program-data independence, and support for multiple user views. It also describes the roles of various actors in a database environment, such as database administrators, designers, and end users, along with essential database concepts like entities, relationships, and schemas. Additionally, it discusses the advantages of using a database approach and the different types of data models and DBMS languages.

Uploaded by

nidhi.karkala26
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/ 16

1.​ Characteristics of DB approaches.

1️⃣ Self-Describing Nature of a Database System:

●​ A DBMS catalog stores the description of the database, including its data structures, types, and
constraints.
●​ This description is called metadata, which helps the DBMS handle different database
applications efficiently.

2️⃣ Insulation Between Programs and Data (Program-Data Independence):

●​ The DBMS separates the data from the programs that access it.
●​ This allows changes in the data structure without modifying the application programs.

3️⃣ Data Abstraction:

●​ The DBMS hides storage details and provides users with a simplified view of the data.
●​ Programs interact with data models rather than the physical data storage.

4️⃣ Support for Multiple Views of Data:

●​ Different users can access different views of the same database.


●​ Each view shows only the relevant data to the user.

5️⃣ Sharing of Data and Multi-User Transaction Processing:

●​ Multiple users can access and modify the database simultaneously.


●​ Concurrency control ensures that transactions do not interfere with each other.
●​ The recovery subsystem ensures that completed transactions are permanently saved.

2.​ Actors on the Scene in a Database Environment

Database Administrators (DBA):

●​ The DBA manages the database system and its resources.​

●​ Responsibilities include:
○​ Granting access to authorized users.
○​ Monitoring and optimizing database performance.
○​ Ensuring data security and preventing unauthorized access.
○​ Handling system failures and recovery.​

Example: A DBA at a bank ensures customer data is secure and accessible.​


2️⃣ Database Designers:

●​ Responsible for identifying the data to be stored and defining its structure.
●​ They interact with end users to understand their data requirements.
●​ Create database models and define relationships between data entities.
●​ Develop multiple user views and integrate them into a unified design.

Example: A designer at an e-commerce platform defines product, customer, and order tables.​

3️⃣ End Users:

●​ Individuals who access the database for querying, updating, and generating reports.​

●​ Types of End Users:​

○​ Casual End Users:


■​ Occasionally access the database for varied data needs.
■​ Example: Bank customers checking account details.​

○​ Naïve End Users (Parametric):


■​ Regularly query and update the database using predefined forms or queries.
■​ Example: Bank tellers, hotel clerks.​

○​ Sophisticated End Users:


■​ Engineers, scientists, and analysts who write complex queries and applications.
■​ Example: Data scientists analyzing large datasets.​

○​ Stand-alone Users:
■​ Use pre-built software with GUI interfaces to manage small databases.
■​ Example: Small business owners using accounting software.

4️⃣ System Analysts and Application Programmers (Software Engineers):

●​ System analysts understand user requirements and develop standard database operations.​

●​ Application programmers implement and maintain these operations by:


○​ Writing, testing, and debugging database applications.
○​ Maintaining data integrity and optimizing application performance.​

●​ Example: A software engineer developing a booking system for airline reservations


3.​ Terms
●​ Database:

A database is an organized collection of related data stored electronically. It allows efficient


data retrieval, management, and manipulation.

●​ Example:
○​ A student database in a college contains tables for:
■​ Student details (name, roll number, course)
■​ Course details (course ID, name, credits)
■​ Faculty details (name, department, contact)

●​ Entity:

An entity is an object or concept in the real world that can have data stored about it. It can be a physical
object or a conceptual object.

●​ Example:
○​ In a college database:
■​ Student → Entity with attributes like roll number, name, and age.
■​ Course → Entity with attributes like course ID and course name.

●​ Cardinality Ratio:

Cardinality ratio defines the number of entities in one entity set that can be associated with entities in
another set. It represents the relationship between two entities.

●​ Types of Cardinality Ratios:


○​ One-to-One (1:1) → One entity is related to only one entity in another set.
■​ Example: Person ↔ Passport (one person has one passport).

○​ One-to-Many (1:N) → One entity is related to multiple entities.


■​ Example: Department ↔ Employees (one department has many employees).
○​ Many-to-Many (M:1) → relationship exists when many instances of one entity are
associated with one instance of another entity.
■​ Example: Students ↔ College: Many students can belong to one college.

○​ Many-to-Many (M:N) → Multiple entities in both sets are related to each other.
■​ Example: Students ↔ Courses (students can enroll in many courses, and
courses can have many students).

●​ Degree of Relationship:
●​ The degree of relationship refers to the number of entity types involved in a relationship.​

●​ Types:

Unary Relationship (Degree 1):​

●​ Involves only one entity type associated with itself.


●​ Represents a self-referencing relationship.
●​ Example: Employee reports to another Employee.​
Binary Relationship (Degree 2):​

●​ Involves two different entity types.


●​ It is the most common relationship type in databases.
●​ Example: Student enrolled in a Course.​

Ternary Relationship (Degree 3):​

●​ Involves three entity types associated together.


●​ Represents a more complex relationship.
●​ Example: Supplier supplies a Product to a Customer.​

N-ary Relationship (Degree n):​

●​ Involves n types of entities, where n > 3.


●​ It is a generalized form of ternary and binary relationships.
●​ Example: Doctor, Patient, Hospital, and Insurance Provider interacting in a hospital
management system

●​ Weak Entity

A weak entity is an entity that cannot exist independently. It depends on a strong entity for its
existence.​
It does not have a primary key and uses a foreign key from the strong entity for identification.​
Represented by a double rectangle in ER diagrams.
●​ Example:
○​ Dependent is a weak entity, which depends on the Employee entity.
○​ Dependent uses the Employee ID (foreign key) along with its own identifier (e.g.,
Dependent Name) to form a composite key.

●​ Strong Entity

A strong entity is an entity that can exist independently in a database. It has a primary key that
uniquely identifies its instances.​
Represented by a single rectangle in ER diagrams.

●​ Example: Employee → It has its own primary key (Employee ID) and does not rely on any other
entity for identification.

●​ Schema

A schema is the logical structure or blueprint of a database.​


It defines how data is organized, including: Tables, Fields, Data types, Relationships between tables

●​ Types of Schema:
○​ Physical Schema: Defines how data is stored (storage format, indexing).
○​ Logical Schema: Describes the database structure (tables, attributes, keys).​

●​ Example:​

○​ A schema for a student database may include tables such as:


■​ Student(Roll_no, Name, Age)
■​ Course(Course_ID, Course_Name, Credits)

●​ Instances
●​ An instance refers to the actual data stored in a database at a specific moment in time.
●​ It represents the state of the database.
●​ Example: For the Student table:​

Roll_no Name Age

101 Ravi 20

102 Priya 22

The above rows represent instances of the Student table at that moment.

●​ DB Languages

Database languages are used to define, manipulate, and access data in a DBMS.​
Types of DB Languages:

○​ Data Definition Language (DDL):


■​ Used for defining and managing schema.
■​ Example: CREATE, ALTER, DROP.​

○​ Data Manipulation Language (DML):


■​ Used for data retrieval and modification.
■​ Example: SELECT, INSERT, UPDATE, DELETE.​

○​ Data Control Language (DCL):


■​ Used for access control.
■​ Example: GRANT, REVOKE.​

○​ Transaction Control Language (TCL):


■​ Used for transaction management.
■​ Example: COMMIT, ROLLBACK.​

●​ DB Interfaces

DB Interfaces are tools used to interact with the database.

●​ Types of DB Interfaces:
○​ Graphical User Interface (GUI):
■​ Provides a visual way to interact with the database.
■​ Example: phpMyAdmin, MySQL Workbench.
○​ Command-Line Interface (CLI):
■​ Interact with the database using SQL commands.
■​ Example: MySQL, PostgreSQL CLI.
○​ Application Programming Interface (API):
■​ Allows interaction between applications and the database.
■​ Example: JDBC, ODBC.​

●​ Structural Constraints

Structural constraints define the rules and limitations in a relationship.

●​ Types of Structural Constraints:


○​ Cardinality Constraint:
■​ Specifies the number of entity instances that can be related.
■​ Example: One-to-One, One-to-Many, Many-to-Many.​

○​ Participation Constraint:
■​ Specifies whether all or only some instances of an entity participate in the
relationship.
■​ Total participation: All instances participate.
■​ Partial participation: Some instances participate.

●​ Weak Entity Types

Weak entity types refer to entity sets that rely on a strong entity for identification.​
They have a partial key that combines with the primary key of the strong entity to form a composite key.

●​ Example:
○​ Dependent (weak entity) → Depends on Employee (strong entity).
○​ The composite key: Employee_ID + Dependent_Name.​

●​ Strong Entity Types

Strong entity types are independent and have their own primary key. They do not require
another entity for identification.

●​ Example:​

○​ Employee → Has a unique Employee_ID as the primary key.


○​ Student → Has a unique Roll_no as the primary key.

4. Advantages of Using the Database Approach

●​ It allows easy interaction with data using high-level tools like SQL.
●​ It reduces data redundancy by minimizing duplication and improving storage efficiency.
●​ It ensures data consistency through concurrency control mechanisms.
●​ It enhances security by restricting unauthorized access.
●​ It provides efficient query processing using indexing and optimized storage structures.
●​ It offers backup and recovery services to prevent data loss during failures.
●​ It supports multiple user interfaces, making it flexible for different user types.

5. Data Models


Data models define how data is stored, connected, accessed, and updated in a database management
system. They describe the database structure, operations for manipulating data, and constraints to
maintain data integrity.

1. Conceptual Data Model:​


The conceptual data model represents the high-level view of the database. It outlines the entities,
attributes, and relationships between them in a way that is close to how users perceive data. It defines
the scope and general rules of the database without focusing on physical implementation.

2. Physical Data Model:​


The physical data model defines the low-level, internal details of how data is stored in the system. It
specifies the storage methods, file organization, indexing, and access paths used by the DBMS. This
model is mainly for database administrators.

3. Representational (Implementation) Data Model:​


This model is a bridge between the conceptual and physical models, representing how data will be
stored in tables. It defines the design of tables, relationships, and keys, making it technology-specific. It
focuses on practical database implementation.

Data Model Structure and Constraints:​


Constraints define rules and limitations on data, ensuring accuracy and consistency. They include data
types, table relationships, and entity integrity constraints. Constraints must be enforced at all times.

Data Model Operations:​


Data model operations involve data retrieval and manipulation. These include:

●​ Basic operations: Inserting, deleting, and updating records.


●​ User-defined operations: Custom operations, such as calculating GPA or updating inventory,
tailored to specific business needs
6. Database Schema:​
The database schema is the description of the structure of a database. It defines how the data is
organized and specifies the data types, relationships, and constraints applied to the data. The schema
acts as a blueprint or design plan for the database. It is specified during the database design phase and
remains unchanged over time.

●​ A schema diagram is a visual representation of the database schema, displaying the tables,
fields, and relationships.

Example:​
In a student database, the schema defines the tables (e.g., Students, Courses) along with the fields (e.g.,
Student_ID, Name, Age) and their data types (e.g., integer, varchar).

Database State (or Instance):​


The database state refers to the actual data stored in the database at a particular moment. It includes the
collection of all the records in the database. The state changes frequently as data is inserted, updated, or
deleted.

●​ It is also called a database instance, occurrence, or snapshot.​

●​ The initial database state is the state of the database when it is first loaded into the system.​

●​ A valid state is a state that satisfies all the constraints defined by the schema.​

Example:​
If the Students table contains three rows with the details of three students, the current state of the
database consists of these records. When a new student is added, the state changes.

7. Three-Schema Architecture of DBMS


The three-schema architecture is a framework used to describe the structure of a database at three levels
of abstraction: internal, conceptual, and external. It helps in data abstraction, ensuring data
independence and enabling multiple views of the database for different users.

1. Internal Schema:​
The internal schema defines the physical storage structure of the database. It describes how the data is
actually stored on the disk, including access paths, indexes, and storage blocks.

●​ It uses a physical data model and specifies the format and organization of data at the lowest
level.
●​ The internal schema is invisible to end users.

Example:​
In a student database, the internal schema defines how the Student_ID and Name are stored in memory
blocks and how indexing improves the search performance.

2. Conceptual Schema:​
The conceptual schema defines the logical structure of the entire database. It represents the data
model, tables, relationships, constraints, and rules.

●​ It provides a global view of the database that is shared by the entire organization.
●​ The conceptual level is also called the logical level.
●​ Database administrators and programmers primarily interact with this schema.​

Example:​
In a student database, the conceptual schema specifies the tables (Students, Courses), attributes
(Student_ID, Name, Age), and the relationships between them.
3. External Schema:​
The external schema represents the user-specific view of the database. Different users or groups may
have different external schemas based on their requirements.

●​ It defines subschemas that describe the portion of the database relevant to a particular user group.
●​ It hides the remaining database from that user group, ensuring data security and privacy.

Example:​
In a student database:

●​ Faculty may have access only to student grades and courses.


●​ Students may see only their own grades and details.​

4. Schema Mappings:

●​ Mappings between the three levels transform user requests into physical operations.
●​ When a user queries the database, the DBMS maps the external schema to the internal schema.
●​ The results are reformatted to match the user’s view (e.g., displaying SQL query results on a
webpage).​

8. DBMS Languages

Database Management Systems (DBMS) use specialized languages to define, manipulate, and manage
data efficiently. The main DBMS languages include:

1.​ Data Definition Language (DDL):


○​ Used to define the structure of the database.
○​ Includes commands like CREATE, ALTER, DROP, and RENAME.
○​ Defines schemas, tables, indexes, and constraints.​

2.​ Data Manipulation Language (DML):


○​ Used for accessing and modifying data in the database.
○​ Includes commands like SELECT, INSERT, UPDATE, and DELETE.
○​ Enables data retrieval, insertion, and deletion.​

3.​ Data Control Language (DCL):


○​ Used to control access to data.
○​ Includes commands like GRANT and REVOKE.
○​ Ensures data security by managing user privileges.​
4.​ Transaction Control Language (TCL):
○​ Used to manage transactions in a database.
○​ Includes commands like COMMIT, ROLLBACK, and SAVEPOINT.
○​ Ensures data consistency and recovery in case of failures.​

9. Database System Utilities

Database Management Systems (DBMS) include various utilities that assist the Database
Administrator (DBA) in managing the database efficiently. The main utilities include:

1.​ Loading:
○​ Used to import existing data files (e.g., text files or sequential files) into the database.
○​ Automatically reformats and stores the data in the database.
○​ Common loading tools include IDMS (Computer Associates), SUPRA (Cincom), and
IMAGE (HP).
2.​ Backup:
○​ Creates a backup copy of the database by dumping the entire database onto tape.
○​ Used to restore the database in case of disk failures.
○​ Supports incremental backups to save space.
3.​ Database Storage Reorganization:
○​ Rearranges database files into different file organizations.
○​ Improves data retrieval performance.
4.​ Performance Monitoring:
○​ Monitors database usage and performance.
○​ Provides statistics for the DBA to make informed decisions.​

5.​ Additional Utilities:


○​ Sorting files for efficient data organization.
○​ Data compression to save storage space.
○​ User access monitoring to track database activity.
○​ Network interfacing for remote database access.​

6.​ Tools, Application Environments, and Communication Facilities:​

○​ CASE tools aid in database design during the development phase.


○​ Data dictionary stores catalog information about schemas and constraints.
○​ Information repository holds details about design decisions, usage standards, and
application descriptions.
○​ Application development environments provide tools for GUI development,
querying, and database programming.
○​ Communication software enables remote users to access the database via internet
routers, phone lines, or satellite networks.

10. Types of Attributes


1.​ Simple Attribute:
○​ Also known as atomic attribute.
○​ It cannot be divided further into smaller components.
○​ Example: In a student table, the attribute gender is a simple attribute as it contains only
one value.

2.​ Composite Attribute:


○​ Consists of multiple sub-attributes.
○​ It can be divided into smaller parts.
○​ Example: The attribute Name can be divided into First Name, Middle Name, and Last
Name.

3.​ Single-valued Attribute:


○​ An attribute that contains only one value.
○​ Example: Date of Birth (DOB) of a student, as a student can have only one date of birth.

4.​ Multi-valued Attribute:


○​ An attribute that can contain more than one value.
○​ Represented by a double oval in an ER diagram.
○​ Example: A student having multiple phone numbers or email IDs.

5.​ Derived Attribute:


○​ An attribute that can be calculated from other attributes.
○​ Represented by a dotted oval in an ER diagram.
○​ Example: Age can be derived from DOB.

6.​ Complex Attribute:


○​ A combination of multi-valued and composite attributes.
○​ It consists of multiple values, with each value having further subdivisions.
○​ Example: If a person has more than one office, and each office has an address made up
of street and city, it is a complex attribute.​

7.​ Key Attribute:


○​ An attribute that can uniquely identify each record in a table.
○​ Example: Student ID or Employee ID.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy