Database is a basic subject of IT majors, any IT student needs to master and proficiently use Database for future work. However, this is also a difficult subject for many students to understand, especially in the Database design phase. Therefore, I write this series of articles in the hope that it will help you more easily access this subject.

Watching: What is Data

Reason for a database

We start the story of a grocery store owned by Aunt Ba at the beginning of the alley, every day sells 3-5 bags of soap, 4 bottles of fish sauce, 6 packs of Bim Bim… To know the profit, loss and make sure not to miss , loss, Aunt Ba took a notebook to record the amount of purchases, the amount of sales each day and checked through the remaining goods to know the profit and loss.

Since the day the apartment in front was formed, the population has been crowded, and Aunt Ba’s shop has been very busy. Every day selling hundreds of items, each item from a few dozen to a hundred, Auntie Ba can’t calculate the profit or the inventory anymore.

Fortunately, there is a Ti in the house who just finished an office computer course, so Aunt Ba bought him a computer and asked him to help. It sets up Excel tables to manage Inventory, Import, Sales as follows:

Adding some more formulas, the daily calculation, addition, subtraction, multiplication, and division of Aunt Ba is greatly reduced, saving a lot of work.

When the apartment in front was filled, Aunt Ba’s business became extremely prosperous. Besides groceries, she sells stationery and some other household items. The little boards that I used to work in the past were fine, but now there are too many running too slow, sometimes I’m not careful enough to run it wrong (due to not updating the formula). Moreover, only it can do it, anyone who touches it is wrong so it’s inconvenient.

READ MORE  What is Business Strategy, Concepts, Objectives, Roles

The other day, my aunt asked Tom next door, he is a real IT guy, he told me to use software and databases to solve it. It said that there is a database and software, so she will not be afraid of the wrong formula, not afraid of a lot of data that anyone can enter. Whatever it sounds like.

So what is a database

?“A database is an efficient way of organizing data storage to ensure fast and accurate data entry and extraction”.

What is a relational database

?A database has many ways of being organized, in which the most effective way is to organize according to the relational model proposed by German Dr. E.F.Code in 1969 and they call it a relational database.

“Relational databases organize data in tables and relationships to reduce data redundancy while ensuring efficiency in data storage and retrieval”

Today, relational databases are used in most software systems from accounting, banking, business, etc.

Fundamentals of a Relational Database

1. Table of data (Table)

A data table is a key component in a relational database. The table contains the data.

In there:

Column/Field: fields that represent attributes of the data table, such as name, address, etc. Line (row): is a data line consisting of related data, also known as a record (table). records).

See also: What is Leukemia – Lekemiah Marrow Cml

Cell: The intersection between rows and columns and is where data is stored. Primary Key: is a field or fields that are combined used to define a record table. Primary key has 02 attributes that cannot be duplicated and cannot be null. For example, the value 1 of that CustomerID field will infer all the data of the first row. In other words, the values ​​of the first row are the values ​​of the attributes of the table with customerID = 1.

READ MORE  Today's Popular Forms of Wholesale

A table may or may not have a primary key, but for ease of management people often define a primary key for the tables.

2. Relationship (Relationship)

In there:

Foreign Key (Foreign Key): is a field in this table (Invoice table) but has a corresponding field as the primary key in the other table (Customer table) to create a relationship between the two tables.Relationship: create relationship between two tables to determine the relationship between the data fields of the two tables. For example, if you want to know what orders a customer with customer code #1 buys, you have to rely on the above relationship. In the relational database, the relationship is presented in the following three forms: 1-1 relationship: In this relationship, each table has only one and only one corresponding record. For example husband-wife relationship, relationship Basic information – Details … 1-n relationship: Is the most common relationship in the database, in this system 1 table in this table has many tables. in the corresponding table. In the above example, a table in the Customer table has many records in the Invoice table. The n-n relationship: in this relationship, one record in this table corresponds to many records in the other table and vice versa.

Take a look at the modeling below to better understand the relationships.

3. Entity Relationship Diagram (ERD: Entity Relationship Diagram)

ERD will help you to understand faster the structure of Database, thereby making it easier for you to manipulate them.

Relational Schema (ERD) of an order management database

Database Management System (DBMS) DBMS is the software used to manage and operate the Database. Popular DBMSs like MySQL, SQL Server, Oracle Database, DB2…

READ MORE  Net asset value

Comparison table of some popular DBMS:

DBMSSystem SizeOperating System Year of Birth Oracle Large UNIXWindows 1979 DB2 Large and Medium AIX(R) HP-UX Linux(R) Solaris 1985 MySQL Small and Medium All OS 1987 MS SQL Server Small and Medium Windows 2000…

Summary

We have just learned the basic concepts of Database and Relational Database, there are still many issues to learn such as why to use relational database, how to set up database design … We will continue to learn the next parts in the following articles.

See also: Composer 6: Practice Writing Simple and Correcting Errors

Next article: Database design – Steps to take

If you have anything unclear or have any questions, you can leave a comment below and I will be happy to discuss with you.