DATABASE CONCEPT
• Data: Known facts that can be recorded and have an implicit meaning.
o For example, consider the names, telephone numbers, and addresses of the people
you know.
o You may have recorded this data in an indexed address book or you may have stored
it on a hard drive, using a Personal computer and software such as Microsoft Access
or Excel.
• Database: A database is a collection of data, typically describing the activities of one or more
related organizations.
o This collection of related data with an implicit meaning is a database.
o A database system is basically a computer-based record-keeping system.
o For example, a university database might contain information about the following:
▪ Entities such as students, faculty, courses, and classrooms.
▪ Relationships between entities, such as students' enrollment in courses,
faculty teaching courses, and the use of rooms for courses.
▪ An example of a large commercial database is [Link].
• Database Management System (DBMS) : A software package/ system to facilitate the
creation and maintenance of a computerized database.
• Database System: The DBMS software together with the data itself. Sometimes, the
applications are also included.
Data Base Management System (DBMS)
• A database management system (DBMS) is a collection of programs that enables users to
create and maintain a database.
• The DBMS is a general-purpose software system that facilitates the processes of defining,
constructing, manipulating, and sharing databases among various users and applications.
o Defining the database involves specifying the data types, structures, and constraints
for the data to be stored in the database.
o Constructing the database is the process of storing the data on some storage
medium controlled by the DBMS.
o Manipulating a database includes functions such as querying the database to
retrieve specific data, updating the database to reflect changes, and generating
reports from the data.
o Sharing a database allows multiple users and programs to access the database
simultaneously.
• An application program accesses the database by sending queries or requests for data to the
DBMS.
• A query typically causes some data to be retrieved.
• Other important functions provided by the DBMS include protecting the database and
maintaining it over a long period of time.
• Protection includes system protection against hardware or software malfunction (or crashes)
and security protection against unauthorized or malicious access.
• A typical large database may have a lifecycle of many years, so the DBMS must be able to
maintain the database system by allowing the system to evolve as requirements change over
time.
Difference Between File System and DBMS
Basics File System DBMS
The file system is a way of DBMS is software for managing the
arranging the files in a storage database.
Structure medium within a computer.
Redundant data can be present
In DBMS there is no redundant data.
Data Redundancy in a file system.
It doesn’t provide Inbuilt It provides in house tools for backup and
Backup and mechanism for backup and recovery of data even if it is lost.
Recovery recovery of data if it is lost.
There is no efficient query Efficient query processing is there in
Query processing processing in the file system. DBMS.
There is less data consistency in There is more data consistency because
Consistency the file system. of the process of normalization.
It is less complex as compared to It has more complexity in handling as
Complexity DBMS. compared to the file system.
File systems provide less security DBMS has more security mechanisms as
Security Constraints in comparison to DBMS. compared to file systems.
It has a comparatively higher cost than a
It is less expensive than DBMS.
Cost file system.
Basics File System DBMS
In DBMS data independence exists,
mainly of two types:
There is no data independence.
1) Logical Data Independence .
Data Independence
2)Physical Data Independence.
Only one user can access data at
Multiple users can access data at a time.
User Access a time.
The users are not required to The user has to write procedures for
Meaning write procedures. managing databases
Data is distributed in many files. Due to centralized nature data sharing is
Sharing So, it is not easy to share data. easy
It give details of storage and
It hides the internal details of Database
Data Abstraction representation of data
Integrity Integrity Constraints are difficult Integrity constraints are easy to
Constraints to implement implement
To access data in a file , user
requires attributes such as file No such attributes are required.
Attribute s name, file location.
Cobol , C++ Oracle , SQL Server
Example
Advantages of a DBMS
1. Controlling Redundancy
• Data redundancy means duplication of data.
• The redundancy in storing the same data multiple times leads to several problems. The
storage space is wasted, and files that represent the same data may become inconsistent.
• In the database approach, the views of different user groups are integrated during database
design.
• Ideally, we should have a database design that stores each logical data item—such as a
student’s name or birth date—in only one place in the database.
• This is known as data normalization, and it ensures consistency and saves storage space.
2. Controlling Inconsistency
• An inconsistent database provides incorrect or conflicting information.
• By controlling redundancy, the inconsistency is also controlled.
3. Data Integrity and Security
• If data is always accessed through the DBMS, the DBMS can enforce integrity constraints on
the data.
• For example, before inserting salary information for an employee, the DBMS can check that
the department budget is not exceeded.
• Also, the DBMS can enforce access controls that govern what data is visible to different
classes of users. Data security refers to the protection of data.
4. Facilitate Sharing of Data
• Individual pieces of data in the database may be shared among several different users in the
sense that each of those users may have access to the same piece of data, and each of them
may use it for different purposes.
• When several users share the data, centralizing the administration of data can offer
significant improvements.
5. Concurrent Access and Crash Recovery
• A DBMS schedules concurrent accesses to the data in such a manner that users can think of
the data as being accessed by only one user at a time.
• Further, the DBMS protects users from the effects of system failures.
[Link] Backup and Recovery
• A DBMS must provide facilities for recovering from hardware or software failures.
• The backup and recovery subsystem of the DBMS is responsible for recovery.
• For example, if the computer system fails in the middle of a complex update transaction, the
recovery subsystem is responsible for making sure that the database is restored to the state
it was in before the transaction started executing.
[Link] for Enforcing Standards
• The database approach permits the DBA to define and enforce standards among database
users in a large organization.
• This facilitates communication and cooperation among various departments, projects, and
users within the organization.
• Standards can be defined for names and formats of data elements, display formats, report
structures, terminology, and so on.
• The DBA can enforce standards in a centralized database environment more easily than in an
environment where each user group has control of its own data files and software.
8. Availability of Up-to-Date Information:
A DBMS makes the database available to all users.
9. Economies of Scale:
The DBMS approach permits consolidation of data and applications, thus reducing the amount of
wasteful overlap between activities of data processing personnel in different projects or
departments
DATABASE USERS
1. Database Administrators (DBAs)
Role:
• The Database Administrator is responsible for the overall management, configuration, and
maintenance of the database system. They ensure that the database is secure, functional,
and optimized for performance.
Responsibilities:
• Database Design: Create and modify database schema, tables, and relationships.
• Security Management: Control access permissions and privileges to ensure data security.
• Backup and Recovery: Set up and manage database backup and recovery processes.
• Performance Tuning: Monitor and optimize the database performance, such as query
optimization.
• Troubleshooting: Address and resolve any technical issues or failures in the database.
• Data Integrity: Ensure data consistency and enforce integrity constraints (e.g., foreign keys).
• User Management: Create and manage database users, assign appropriate privileges, and
monitor their activities.
2. Database Designers
Role:
• Database designers are responsible for designing the structure and organization of the
database. They translate business requirements into a database schema that supports the
efficient storage and retrieval of data.
Responsibilities:
• Schema Design: Create the overall database structure, including tables, relationships, keys,
and constraints.
• Normalization: Ensure the database design minimizes redundancy and maintains data
integrity using normalization techniques.
• Data Modeling: Use Entity-Relationship (ER) diagrams or other data modeling techniques to
represent data relationships.
• Consistency and Integrity: Define rules and constraints to ensure the database maintains
valid data.
• Documentation: Document the database design and any changes to it for future reference.
3. End Users
Role:
• End users are the individuals who interact with the database through applications or
interfaces. They can include business analysts, data analysts, or customers accessing data.
Responsibilities:
• Data Entry: Inputting data into the system (e.g., forms or application interfaces).
• Data Retrieval: Querying and viewing data as needed for analysis or reporting.
• Reporting: Running reports or using the data to make business decisions.
• Basic Data Maintenance: In some cases, users may update or delete their own data, subject
to permissions.
4. Application Programmers
Role:
• Application programmers develop software that interacts with the database. They create the
necessary applications that allow end users to interact with the data.
Responsibilities:
• Database Connectivity: Implement code that connects the application to the database.
• Data Retrieval and Manipulation: Write queries and scripts to fetch, update, or delete data
from the database.
• Transaction Management: Ensure that database transactions are executed correctly and
manage concurrency to prevent data anomalies.
• Error Handling: Ensure that errors in database interactions are handled gracefully and
appropriately.
5. Data Analysts / Data Scientists
Role:
• Data analysts and data scientists analyze and interpret the data stored in the database. They
generate insights, perform statistical analysis, and build predictive models using the data.
Responsibilities:
• Data Analysis: Write complex queries to analyze data and generate insights.
• Data Mining: Extract patterns or trends from large datasets.
• Data Cleaning: Ensure that the data is clean and free from inconsistencies or errors.
• Reporting: Generate detailed reports or visualizations based on data findings.
• Model Building: Use the data to build predictive models for business or scientific purposes.
6. Database Users with Limited Access (Viewers)
Role:
• These users have read-only access to the database. They can view but not modify the data.
Responsibilities:
• Data Viewing: Access and view data for reporting or analysis purposes.
• Limited Queries: Execute predefined or simple queries to extract necessary information
without the ability to alter data.
• Compliance: Ensure they follow proper data usage policies, especially regarding sensitive or
confidential information.
7. System Users
Role:
• System users are typically associated with the DBMS and operating system level, including
automated processes, services, and tasks that interact with the database.
Responsibilities:
• Automated Maintenance Tasks: Run scripts for backup, indexing, or cleanup processes.
• System Monitoring: Monitor the health and performance of the database at the system
level (e.g., disk space, memory usage).
• Database Optimization: Run automated processes that help with the overall optimization of
the system, such as re-indexing or purging outdated data.