Category Archives: DBMS

Posts for Database Management Systems.

SQL | EXISTS

The EXISTS condition in SQL is used to check whether the result of a correlated nested query is empty (contains no tuples) or not. The result of EXISTS is a boolean value True or False. It can be used in a SELECT, UPDATE, INSERT or DELETE statement. Syntax: SELECT column_name(s) FROM table_name WHERE EXISTS (SELECT… Read More »

Data Warehousing

Background A Database Management System (DBMS) stores data in the form of tables, uses ER model and the goal is ACID properties. For example a DBMS of college has tables for students, faculty, etc. A Data Warehouse is separate from DBMS, it stores huge amount of data, which is typically collected from multiple heterogeneous source… Read More »

Data Mining

In general terms, “Mining” is the process of extraction of some valuable material from the earth e.g. coal mining, diamond mining etc. In the context of computer science, “Data Mining” refers to the extraction of useful information from a bulk of data or data warehouses. One can see that the term itself is a little… Read More »

SQL Interview Questions

What is SQL? SQL stands for Structured Query Language. It is a language used to interact with the database, i.e to create a database, to create a table in the database, to retrieve data or update a table in the database etc. SQL is an ANSI(American National Standards Institute) standard. Using SQL, we can do… Read More »

SQL | Functions (Aggregate and Scalar Functions)

For doing operations on data sql has many built-in functions, they are categorised in two categories and further sub-categorised in different seven functions under each category. The categories are: Aggregate functions: These functions are used to do operations from the values of the column and a single value is returned. AVG() COUNT() FIRST() LAST() MAX()… Read More »

SQL | Date functions

In SQL, dates are complicated for newbies, since while working with database, the format of the date in table must be matched with the input date in order to insert. In various scenarios instead of date, datetime (time is also involved with date) is used. In MySql the default date functions are: NOW(): Returns the… Read More »

SQL | Views

Views in SQL are kind of virtual tables. A view also has rows and columns as they are in a real table in the database. We can create a view by selecting fields from one or more tables present in the database. A View can either have all the rows of a table or specific… Read More »

SQL | GROUP BY

The GROUP BY Statement in SQL is used to arrange identical data into groups with the help of some functions. i.e if a particular column has same values in different rows then it will arrange these rows in a group. Important Points: GROUP BY clause is used with the SELECT statement. In the query, GROUP… Read More »

SQL | Comments

As is any programming languages comments matter a lot in SQL also. In this set we will learn about writing comments in any SQL snippet. Comments can be written in the following three formats: Single line comments. Multi line comments In line comments