What Is RDBMS
What Is RDBMS
What Is RDBMS
RDBMS stands for Relational Database Management System. RDBMS is the basis for SQL, and
for all modern database systems like MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft
Access.
What is table ?
The data in RDBMS is stored in database objects called tables. The table is a collection of
related data entries and it consists of columns and rows.
Remember, a table is the most common and simplest form of data storage in a relational
database. Following is the example of a CUSTOMERS table:
+----+----------+-----+-----------+----------+
| ID | NAME | AGE | ADDRESS | SALARY |
+----+----------+-----+-----------+----------+
| 1 | Ramesh | 32 | Ahmedabad | 2000.00 |
| 2 | Khilan | 25 | Delhi | 1500.00 |
| 3 | kaushik | 23 | Kota | 2000.00 |
| 4 | Chaitali | 25 | Mumbai | 6500.00 |
| 5 | Hardik | 27 | Bhopal | 8500.00 |
| 6 | Komal | 22 | MP | 4500.00 |
| 7 | Muffy | 24 | Indore | 10000.00 |
+----+----------+-----+-----------+----------+
What is field?
Every table is broken up into smaller entities called fields. The fields in the CUSTOMERS table
consist of ID, NAME, AGE, ADDRESS and SALARY.
A field is a column in a table that is designed to maintain specific information about every record
in the table.
What is column?
A column is a vertical entity in a table that contains all information associated with a specific
field in a table.
For example, a column in the CUSTOMERS table is ADDRESS which represents location
description and would consist of the following:
+-----------+
| ADDRESS |
+-----------+
| Ahmedabad |
| Delhi |
| Kota |
| Mumbai |
| Bhopal |
| MP |
| Indore |
+----+------+
It is very important to understand that a NULL value is different than a zero value or a field that
contains spaces. A field with a NULL value is one that has been left blank during record
creation.
SQL Constraints:
Constraints are the rules enforced on data columns on table. These are used to limit the type of
data that can go into a table. This ensures the accuracy and reliability of the data in the database.
Contraints could be column level or table level. Column level constraints are applied only to one
column where as table level constraints are applied to the whole table.
Data Integrity:
The following categories of the data integrity exist with each RDBMS:
Database Normalization
Database normalization is the process of efficiently organizing data in a database. There are two
reasons of the normalization process:
1. Eliminating redundant data, for example, storing the same data in more than one tables.
2. Ensuring data dependencies make sense.
Both of these are worthy goals as they reduce the amount of space a database consumes and
ensure that data is logically stored. Normalization consists of a series of guidelines that help
guide you in creating a good database structure.
Normalization guidelines are divided into normal forms; think of form as the format or the way a
database structure is laid out. The aim of normal forms is to organize the database structure so
that it complies with the rules of first normal form, then second normal form, and finally third
normal form.
SQL data type is an attribute that specifies type of data of any object. Each column, variable and
expression has related data type in SQL.
You would use these data types while creating your tables. You would choose a particular data
type for a table column based on your requirement.
SQL Server offers six categories of data types for your use:
tinyint 0 255
bit 0 1
Note: Here datetime has 3.33 milliseconds accuracy where as smalldatetime has 1 minute
accuracy.
Maximum length of 231 bytes (SQL Server 2005 only). ( Variable length
varbinary(max)
Binary data)
Stores XML data. You can store xml instances in a column or a variable
xml
(SQL Server 2005 only).
Operators are used to specify conditions in an SQL statement and to serve as conjunctions for
multiple conditions in a statement.
Arithmetic operators
Comparison operators
Logical operators
Show Examples
Show Examples
Operator Description
ALL The ALL operator is used to compare a value to all values in another value set.
The ANY operator is used to compare a value to any applicable value in the list
ANY
according to the condition.
The BETWEEN operator is used to search for values that are within a set of values,
BETWEEN
given the minimum value and the maximum value.
The EXISTS operator is used to search for the presence of a row in a specified
EXISTS
table that meets certain criteria.
The IN operator is used to compare a value to a list of literal values that have
IN
been specified.
The LIKE operator is used to compare a value to similar values using wildcard
LIKE
operators.
The NOT operator reverses the meaning of the logical operator with which it is
NOT
used. Eg. NOT EXISTS, NOT BETWEEN, NOT IN etc. This is negate operator.
IS NULL The NULL operator is used to compare a value with a NULL value.
The UNIQUE operator searches every row of a specified table for uniqueness (no
UNIQUE
duplicates).
SQL tutorial gives unique learning on Structured Query Language and it helps to make
practice on SQL commands which provides immediate results. SQL is a language of database, it
includes database creation, deletion, fetching rows and modifying rows etc.
SQL is an ANSI (American National Standards Institute) standard but there are many different
versions of the SQL language.
What is SQL?
SQL is structured Query Language which is a computer language for storing, manipulating and
retrieving data stored in relational database.
SQL is the standard language for Relation Database System. All relational database management
systems like MySQL, MS Access, Oracle, Sybase, Informix, postgres and SQL Server uses SQL
as standard database language.
Why SQL?
Allow users to access data in relational database management systems.
Allow users to define the data in database and manipulate that data.
Allow to embed within other languages using SQL modules, libraries & pre-compilers.
History:
1970 -- Dr. E.F. "Ted" of IBM is known as the father of relational databases. He
described a relational model for databases.
1978 -- IBM worked to develop Codd's ideas and released a product named System/R.
1986 -- IBM developed the first prototype of relational database and standardized by
ANSI. The first relational database was released by Relational Software and its later
becoming Oracle.
SQL Process:
When you are executing an SQL command for any RDBMS, the system determines the best way
to carry out your request and SQL engine figures out how to interpret the task.
There are various components included in the process. These components are Query Dispatcher,
Optimization engines, Classic Query Engine and SQL query engine etc. Classic query engine
handles all non-SQL queries but SQL query engine won't handle logical files.
DROP Deletes an entire table, a view of a table or other object in the database.