First, we need to define data and how it is managed before talking about a database. So we can understand why we use a database in our daily work.
First, we need to define the traditional approach, where the management and structure of the data are defined within the application.
The second approach, DBMSs, is the more exciting approach with several advantages. However, we first need to make an introduction to understand the reason for its use.
How do we use the data?
Humanity has historically produced data in many ways, but the volume of data has only increased with the evolution of technology and its consequent democratization.
In the past, computational power was concentrated in large frames in academia or large companies.
From the 1980s onwards, PCs began appearing on the market with IBM.
As a result, the general public has begun to embrace technology. In addition, with the democratization of technology, people began to use computers in their daily lives.
Over time we have evolved in terms of software and hardware, thus providing the most significant computational capacity.
Likewise, the services available on the internet have evolved.
Traditional approach
Before the database management system’s creation, many professionals created data structure and its management within the user applications.
In this case, the program was responsible for the business logic, structure, and management of this data.
We encountered some problems with this approach. Rework, data inconsistency, and application data dependency are some of these problems.
Furthermore, it is difficult to imagine that two different applications use the same dataset. There is no way to guarantee data consistency, let alone concurrency control.
Assuming each application had its specific data set, another issue that could arise was redundancy.
In addition to redundancy, we would have redundant rework effort to maintain this data. This rework happens because there is no data centralization.
Let’s go to the example…
Let us assume a university scenario where the financial and education sectors would have access to student data.
However, of course, every industry has a different perspective on data.
For example, no sector other than financial needs accesses student payment data. Consequently, this information may be restricted or linked to a group of users.
Several university sectors need access to student information, such as name, course, discipline, and grade, among other attributes.
Each application would have its files with the same information using the traditional approach.
Unfortunately, this approach entails redundancy and rework to maintain this data.
How did DBMSs come about?
The emergence of DBMSs came in line with the need to determine greater efficiency for data management.
In the past, the structure and management of this data were done by different people and applied specific actions. Then, each person worked on a set of information.
In this way, DBMSs have a centralizing role, where they determine both the structure and the management and several other advantages related to the data.
Before the advent of relational DBMSs, there were other hierarchical network models. However, these models had their limitations.
Database Templates
Thus, the relational model came to bring greater query efficiency to databases and, consequently, define a more general and application-independent structure.
In previous models, it was interesting that your users knew the specifics of the database.
The relational model brought isolation between the application and the system.
Thus, users need to be aware of the database structure and its operation and may perform queries for our database.
What is SQL?
SQL is a relational database query language. Based on relational algebra, it defines the operations and clauses that are used within set theory.
SQL allows the highest level of abstraction regarding the structure of the entities of the tables within the database.
Because it is based on set theory, it is possible to query these entities without knowing how many attributes each one has.
Clauses are used in the construction of a query or query. This query is submitted to the DBMS, which processes the query and accesses the database.
From the query performed, the DBMS returns the results from the tables instantiated within your system.
Below an example of SQL queries.
What are DBMS?
After all, what are DBMS? They are systems aimed specifically at structuring and managing data.
Its structure is defined by means of tables and rows.
These tables, called entities within the data modeling, have relationships with each other.
We can understand entities as objects in the real world, having properties that define them and characteristics that describe them.
Thus, these properties are arranged within a relational schema as attributes.
Relationships between these real-world objects are handled within data modeling. Later we will talk, in another article, about mapping the ER to the relational schema.
DBMS – Database Management Systems
A DBMS is a general-purpose software that aims to help the user define, implement, manipulate and share a database between several applications.
The steps involving a database are:
Definition:
This step involves specifying data types, structures, and constraints of the data to be stored in the DBMS.
Finally, the DB definition or descriptive information is stored in the DBMS catalog (Metadata).
Implementation:
is the process of inserting data into some storage medium controlled by the DBMS.
Manipulation:
execution of queries for data retrieval and updates to reflect changes in the mini-world.
Sharing:
allowing multiple-access by users or programs simultaneously.
Features of a Database
Another essential feature of a DBMS is data protection. The protection of a DBMS consists of protection against hardware and software malfunctions.
In addition, against unauthorized or malicious access. On the other hand, DBMSs have a life cycle of several years of operation.
This way, the system must be able to maintain the database considering changes over time.
Characteristics of a DBMS
A database has a data source from which data is derived, some level of interaction with real-world events.
In addition, there is an audience interested in consuming your content. Data consumption happens mostly from some API.
However, we can use services or even perform queries to the DB.
Various actions can modify the state of the DBMS.
Therefore, examples of these actions are purchasing a product via e-commerce, adding a dependent to the company employee, and registering a student.
For the DB to be reliable, every change must be “immediately” reflected in the DB. Consequently, this change takes place in the mini-world that the BD represents.
Some of the concepts linked to the database are described below:
- Real-world context
Representation of some limited context, this being a real-world scope. The term “mini world” or “discourse universe” is adopted in this case.
Changes that occur in the mini-world must be reflected in the database.
- Coherence:
Data in a database is a logically coherent and consistent collection of stored data. Random data cannot be correctly referenced in a database.
Trying to insert random data into a rigid DB-like structure would be hard work.
- Purpose:
A DBMS is designed, implemented, and populated with a purpose. This goal is tied to the context of the mini-world we want to model.
There is a user group and some pre-defined application database design goals. Therefore, people and applications will consume the data persisted in the database.
Final considerations
That was our first step… I hope it made it clearer to you about what a database is all about.
This is one of the IT themes that go beyond barriers and are used in the vast majority of scenarios.
Where there is data, there is a database management system.
Videos about Database
Videos on our YouTube channel about databases.
Read about other relevant topics:
Where to Start in the Data Science Career?
- Build Your Own DNS Server: A Step-by-Step Guide using BIND9
- Tutorial for SSH Public Key Authentication
- Socket UDP Python Chat
- Socket TCP Python make a chat
- apt get behind proxy
Juliana Mascarenhas
Data Scientist and Master in Computer Modeling by LNCC.
Computer Engineer