Interactive Data Transforming | Lecture 1
Database Management Systems (DBMS) is software that provides an interface between users,
applications, and the database itself to manage data efficiently. It allows users to store, retrieve,
update, and delete data in a structured and organized way.
Here are some problems DBMS could solve:
Data redundancy and inconsistency
Multiple file formats, duplication in different files. Imagine you have the same piece of
information stored in multiple places. If you update the address in one place, but forget to
update it elsewhere, you end up with inconsistent data.
Difficulty in accessing data
Need to write a new program to carry out each new task. If you have your data stored in
different files and formats, and you want to do something new with it (like generating a
report or analyzing sales trends), you might need to write a new program or script every
time.
Data isolation
Multiple files and format. For example, sales data might be in one file format, and customer
data might be in another.
Integrity problems
Integrity constraints (e.g. account balance > 0) become “buried” in program code rather than
being states explicitly. Certain rules need to be followed to keep data accurate and
meaningful. For example, an account balance should never go below zero. If these rules are
just written in the program code, they can be hard to find, update, or enforce consistently.
Database (DB): Collection of data with the same structure, including correlations and relationships.
There’s a common purpose, i.e., defined for a particular use. Shared, i.e., used by several users.
Database Management System (DBMS): Collection of programs over DB. Define, i.e., specify the data
types, structure, constraints. Build & manipulate, i.e., store on disk, retrieve, update. Administrate,
e.g., manage access rights.
Applications: Access to DB for performing queries. Android app, Web application, etc.
As you can see in the image, DBMS is
like a black box interacting between
users/applications and the database.
This is an example consider our
university, but another example could
also be airlines: reservations and
schedule information. Among the first
to use databases in a geographically
distributed manner. Of banking:
customer information, accounts,
loans, and banking transactions.
, The ultimate goal is to separate data from application.
Provide an interface that the application programmer must follow
Allow system administrator to make modifications without having an impact on the user e.g.
improve or reconfigure system
Users can change their view of the data without having to worry about how it is stored
In order for this to happen, it happens in 3 layers:
For example, imagine you have an online bookstore. The DBMS manages all the data related to the
books, customers, orders, and payments.
External layer: communication with users.
For a customer view, a customer might only see a simple list of books, including the title, author, and
price, when browsing the online store. They don’t see the internal details like how the data is stored.
For an admin view, an admin user might have access to more detailed data, such as inventory levels,
profit margins, or the ability to edit or delete books from the catalog. For a sales view, a salesperson
might have a view that shows sales statistics, order histories, and customer details relevant to
processing and tracking orders.
- Analysis of user requests (queries)
- Access control
- Answer presentation
Logical layer:
The database defines tables like “Books”, “Customers”, “Orders”, and “Payments”. Each table has
attributes (columns) such as “Books” having “Title”, “Author”, etc. Relationships are also defined here,
such as each “Order” being linked to a “Customer”. Constraints like ensuring that the “Price” of a
book is never negative are also managed at this layer.
- Optimization of queries
- Resolving conflicting accesses, i.e., multiple users
- Guarantees constant availability even in case of failures
Internal layer:
Data about books (like title, author, and price) is stored in a binary format in files on the server. The
DBMS manages where these files are stored on the disk, how they are indexed (to speed up
searches), and how the data is compressed to save space.
- Storing the data
- Software for structuring the data
- Efficient access methods (i.e., keys, indices etc.)
So the process in action would be:
Step 1: A customer searches for a book by title on the online bookstore (external layer).