Data
Data is a collection of raw facts such as:
- Numbers
- Words
- Measurements
- Observations
- Descriptions of things
Data by itself may not have a meaningful interpretation until it is processed or organized.
Information
Information is classified or organized data that has some meaningful value.
Information is processed data on which organizational decisions and actions can be based.
Example:
20 students are enrolled at Durgalaxmi for the year 2081 in Computer Engineering.
Knowledge
Knowledge is an understanding of a specific subject gained through experience or education.
Example:
20 students are enrolled, which is very minimum.
Database
A Database is a collection of related data that represents some aspect of the real world.
Simply, a database is a container of data files in which a large amount of data is stored.
Database Management System
A Database Management System (DBMS) is software used for storing and retrieving data while considering appropriate safety measures.
DBMS allows users to create databases according to their requirements.
It also facilitates the creation and maintenance of computerized databases.
Examples of DBMS
- MySQL
- MongoDB
- MS SQL Server
- Others
File System
A File System is a set of structural and logical rules used to organize groups of data and their names.
A file system is a traditional method of organizing and accessing data.
Limitations of File System
The major limitations of a file system include:
- Data Redundancy
- Data Inconsistency
- Data Isolation
- Data Dependency
- Controlled Data Sharing
1. Data Redundancy
Data Redundancy means duplication of the same data in different places or tables.
Redundancy leads to excessive use of storage space.
2. Data Inconsistency
Data Inconsistency occurs when the same data is managed differently in different places.
This creates unreliable information because it becomes difficult to determine which version of the information is correct.
3. Data Isolation
In a file system, data mapping may not be supported properly.
As a result, files may be created and stored separately or in isolation.
This makes it difficult to keep data in the same state after the execution of transactions.
4. Data Dependency
In a file system, data is stored in a specific format or structure.
If the format or structure changes, the existing application programs that access those files may also need to be changed.
Otherwise, the program may not work correctly.
5. Controlled Data Sharing
In a file system, it is difficult to provide controlled access to data at different levels for different users.
Advantages of DBMS
The major advantages of DBMS include:
- Data redundancy problems can be reduced.
- High security.
- Presence of data integrity.
- Supports multiple users.
- Allows shared data.
- Provides data backup.
Disadvantages of DBMS
DBMS also has some disadvantages.
1. Size
The functionality of DBMS requires large software packages that may occupy significant disk space.
2. Complexity
A DBMS can be complex to manage and maintain.
3. Higher Impact of Failure
The centralization of resources increases the vulnerability of the system because many users and applications depend on the availability of the DBMS.
Failure of an important component may affect overall operations.
4. Performance
According to the provided notes, DBMS performance may be slower in some situations and may not run as fast as possible.
5. Cost of DBMS
The cost of a DBMS can vary significantly depending on:
- Environment
- Features
- Functionality provided
Applications of DBMS
DBMS is used in many different fields and applications.
1. Security
According to the provided notes, DBMS provides security-related features and helps protect or recover data in cases of system failure or data loss.
2. Healthcare
DBMS is used in healthcare to manage:
- Patient data
- Medical reports
- Billing records
- Transaction records
3. Accounting
Database management systems are used in accounting to store information related to:
- Sales
- Holdings
- Financial instruments
- Acquisitions
Example: Stocks and bonds in a data set.
4. Banking
DBMS is used in banking to store:
- Customer transaction data
- Account holder information
- Employee information
- Other financial records
5. Credits and Exchanges
DBMS systems are used for transactions related to credit cards and for generating monthly statements.
6. Data Retrieval
DBMS provides a way to retrieve data quickly and easily using search queries.
7. Data Manipulation
DBMS provides tools to manipulate data using operations such as:
- Sorting
- Filtering
- Aggregating
- Merging
- Searching
- Displaying data
8. Multiuser Access
DBMS allows multiple users to access and modify data simultaneously.
Types of Database Users
There are different types of database users:
- Database Administrators
- Naïve Users
- Sophisticated Users
- Database Designers
- Application Programmers
1. Database Administrators
Database Administrators (DBA) are among the most important database users.
They have extensive control over the database and are sometimes known as super-users.
The responsibilities of a DBA include:
- Monitoring the database
- Managing backup
- Managing recovery
- Providing technical support
- Controlling database operations
2. Naïve Users
Naïve Users may not have detailed knowledge of DBMS concepts but still use database applications regularly.
They generally interact with the database through interfaces provided by applications.
They mostly use the database at the viewing or basic interaction level.
3. Sophisticated Users
Sophisticated Users understand DBMS commands and are familiar with database systems.
Examples include:
- Data Analysts
- Engineers
- System Analysts
4. Database Designer
A Database Designer designs and creates the structure of a database.
They may work with:
- Triggers
- Indexes
- Schemas
- Entity relationships
- Tables
- Constraints
These components help form the complete database structure.
5. Application Programmer
Application Programmers are also known as back-end developers.
They are computer professionals responsible for developing application programs that interact with databases.
Examples of programming languages mentioned in the notes include:
- C
- C++
- Java
- PHP
- Python
DBMS Architecture
The design of a DBMS depends on its architecture.
Basic client-server architecture is used to manage systems involving:
- Multiple computers
- Web servers
- Database servers
- Other network-connected components
Types of DBMS Architecture
There are three common types of DBMS architecture:
- 1-Tier Architecture
- 2-Tier Architecture
- 3-Tier Architecture
1. 1-Tier Architecture
In 1-Tier Architecture, the database is directly available to the user.
This architecture is commonly used for the development of local applications where programmers can directly communicate with the database for quick response.
2. 2-Tier Architecture
In 2-Tier Architecture, an application on the client side can directly communicate with the database on the server side.
For this interaction, APIs such as the following may be used:
- ODBC
- JDBC
The server side is responsible for functions such as:
- Query processing
- Transaction management
Figure: Add 2-Tier Architecture diagram here.
3. 3-Tier Architecture
In 3-Tier Architecture, an additional layer exists between the client and server.
The client cannot communicate directly with the database server.
This architecture is commonly used for large web applications.
Figure: Add 3-Tier Architecture diagram here.
Database Model
A Database Model is a conceptual representation of how data is organized and structured within a database.
It defines:
- Logical structure of the database
- How data is stored
- How data is organized
- How data is accessed
Types of Database Models
Some common types of database models are:
- Hierarchical Model
- Network Model
- Relational Model
- Object-Oriented Model
1. Hierarchical Model
In the Hierarchical Model, data is organized in a tree-like structure.
Each record has:
- One parent record
- Multiple child records
It is similar to an inverted tree in which data flows from parent to child.
This model was popular in early database systems.
2. Network Model
The Network Model extends the hierarchical model.
It allows a record to have:
- Multiple parent records
- Multiple child records
It uses pointers to represent relationships between records.
This creates a more flexible structure compared to the hierarchical model.
3. Relational Model
The Relational Model organizes data into tables called relations.
A table consists of:
- Rows or Tuples
- Columns or Attributes
Relationships between tables are established using keys.
The relational model is based on set theory and provides a flexible way to represent data and relationships.
SQL (Structured Query Language) is commonly used to query and manipulate relational databases.
4. Object-Oriented Model
The Object-Oriented Database Model stores data as objects, similar to objects used in object-oriented programming languages.
Objects may contain:
- Data fields
- Methods
- Functions
This model is suitable for applications where data and behavior are closely related.
Database Schema
A Database Schema is a blueprint or logical structure that defines the organization, structure, and relationships of data within a database.
It provides a framework for how data is:
- Stored
- Accessed
- Managed
A database schema may define:
- Tables
- Fields
- Keys
- Constraints
- Relationships
Levels of Database Schema
There are four levels of database schema:
- Physical Schema
- Logical Schema
- Conceptual Schema
- External Schema
1. Physical Schema
The Physical Schema describes how data is physically stored on storage devices such as:
- Hard Disk Drives
- Solid-State Drives
It may include details such as:
- File organization
- Indexing methods
- Data storage formats
- Access paths
The physical schema focuses on optimizing storage and access for efficient data retrieval and manipulation.
Examples include:
- Data block size
- File placement
- Indexing structures
2. Logical Schema
The Logical Schema describes the structure of the database without considering how the data is physically stored.
It defines:
- Tables
- Columns
- Relationships
- Constraints
- Other logical structures
The logical schema focuses on representing the data model and maintaining data integrity and consistency.
Examples include:
- Tables
- Views
- Indexes
- Primary keys
- Foreign keys
- Relationships between tables
3. Conceptual Schema
The Conceptual Schema provides a high-level view of the entire database.
It does not focus on detailed table structures or implementation details.
It represents:
- Entities
- Attributes
- Relationships
This schema is commonly used for database design and conceptual modelling.
A common example is an:
Entity-Relationship Diagram (ER Diagram)
ER diagrams represent entities, attributes, and relationships between them.
4. External Schema
The External Schema, also called a View Schema, represents specific views or subsets of a database according to the needs of individual users or applications.
It defines:
- How different users interact with the database
- Which data users can access
- Which data applications can view
The external schema provides a customized view of the database.
A common example is a View, which is a virtual table created from one or more base tables.
Discussion
Share a helpful question, idea, or explanation with other students.