Basics of Database
- Categories DBMS, Data Management, Database
In this post we will cover basics of database. To learn about basics of database, check out our video: https://youtu.be/UsBJ9l5tajA
- Why do we need a database?
Data is all around us. For example, you might have all your contacts and their phone numbers on your phone, your e-mails are stored in your e-mail app, your photographs are on Instagram, videos are on YouTube, and so on.
If you think you have a problem managing your data, think of some large companies like, Google, Facebook or any large corporation or bank. Imagine where they are storing all their user data, mails, messages, photos, videos, billing, vendor information etc.
And we as their customers want our data ASAP!
All of these companies have databases.
A database is nothing but a collection of data or information that is organized in such a way that it can be easily accessed, managed and updated.
And DBMS or Database Management System is a software that handles the storage, retrieval, and updating of data in a computer system.
Some popular DBMS are My SQL, SQL Server, Oracle etc.
But why not use our age old trusted file processing system?
File processing system has disadvantages like data redundancy, data inconsistency, unsharable data, unstandardized data, unsecure data etc.
Let’s understand each of these disadvantages one by one:
- Data redundancy means duplication of data. Non-database systems maintain separate copy of data for each application. This duplication of data may lead to inconsistency or incorrect data at times. For e.g. DBMS stores all data at one place and all the application programs that require this data can refer to the same central place. This centralization makes sure that data remains consistent and secure.
- Data Redundancy leads to Data inconsistency. Multiple mismatching copies of same data is known as Data inconsistency. When the redundancy is not controlled, there may be occasions on which the two entries about the same data do not agree. At such times, the database is said to be inconsistent. An inconsistent database will provide incorrect or conflicting information.
- Next comes sharing, DBMS makes sure that not only the existing applications can share the data in the database, but also that new applications can be developed to operate against that same stored data.
- There may be certain standards laid by the company, industry standards or National / International standards which need to be followed. DBMS can ensure that all the data follow standards for storage and retrieval.
- The data/information of an organization/individual must be kept secure and private. DBMS ensures data security and privacy by ensuring that the only means of access to the database is through the proper channel and also by carrying out authorization checks whenever access to sensitive data is attempted.
There are different types of Databases:
They include: Hierarchical, Network, Object Oriented and Relational Database
We will cover Relational Database here.
When the data is stored in multiple tables that are linked via common fields, then such a database is called Relational Database.
A table is data set that is organized into rows and columns.
A row is also called as record which represents one complete unit of information.
Columns are also called as Fields which contains one type of information. It is the smallest unit of named data. It may consist of any number of bits or bytes.
Typically a table has one column or Field which uniquely identifies the record in the table. That field is called the primary key.
A Foreign Key is a field that references the primary key of another table.
Now that you have your data in databases, how do you work with it?
Most large companies have DBA or Database Administrator, who is responsible for managing and maintaining the DBMS.
They use SQL or Structured Query Language which helps you create, access and manipulate databases.
You typically write Queries in English like language to perform any of these tasks.
Most DBMS displays Forms which is an interface in user specified layout that lets users view, enter, change data directly in the table.
The data is then used to present as Reports.
It is a formal, presentable printed document that lists data in a formatted manner.
Check out our video: https://youtu.be/UsBJ9l5tajA