Basics Of Database With Real Life Example

Overview of Database

A database is an organized collection of data. It is the collection of schemas, tables, queries, reports, views and other objects.

SQL:

  • SQL stands for Structured Query Language.
  • SQL is a standard language for accessing and manipulating databases.
  • Used to Create, Transfer, Retrieve information from RDBMS.
  • RDBMS like MS SQL Server, MS Access, Oracle, MySQL, DB2, Sybase & Informix.
  • SQL is defined by ISO & ANSI.
  • Simple language
  • Very powerful

SQL Commands

DDL – Data Definition Language

  • These commands are used to create, modify, drop the structure of database objects.
  • CREATE; ALTER, DROP, RENAME and TRUNCATE commands are used.

DML – Data Manipulation Language.

  • These commands are used to store, retrieve, modify, delete the data.
  • SELECT, INSERT, UPDATE, DELETE commands are used.

TCL – Transaction Control Language.

  • These commands are used for managing changes affecting the data.
  • COMMIT, ROLLBACK, SAVEPOINT commands are used.

Real life example

We are using it everyday in different situations like Food storage, Medical store, Cloths cupboard, etc and are related to database because database is like a container.

  1. Food storage

    Food storage

  2. Medical Store

    Medical Store

The data is typically organized to model aspects of reality in a way that supports processes requiring information, such as modeling the availability of storage in kitchen in a way that supports finding what items with quantity details like suppose we want to find how much rice is remaining in a rice pot then we can see that pot & find out.

Suppose our food storage in kitchen. If we found rice pot is empty then we can fill that by simply inserting new rice into pot. Here we called insert statement which is a DML statement.

Suppose we daily use Sugar to make Tea if we see there is only little sugar remaining in the pot then we simply update that sugar with new one, here we called Update statement.

Some items have manufacturer and expiry date. If any item expired then simply put that item into dustbin, here we called delete command.

In some situations we use same name for two different items but it may conflict so we need to rename any one item out of that. Suppose we use daily different types of Oil like coconut oil & sunflower oil. Then we can’t give same name to both like oil. We have to rename it, here we simply use Rename command.

Summary

This article will help fresher candidates to understand basics of database with real life example.

Hope so you enjoyed this one.

Up Next
    Ebook Download
    View all
    Learn
    View all