0% found this document useful (0 votes)
45 views13 pages

What Is Table?

The document defines key concepts in relational database management systems (RDBMS) including tables, fields, records, columns, NULL values, constraints, normalization forms (1NF, 2NF, 3NF), and SQL. Tables are collections of related data entries consisting of columns and rows. Fields make up columns which contain specific types of information for records (rows of data). Constraints and normalization help ensure data integrity and minimize redundancy. SQL is a declarative language used to define and manipulate data in RDBMS through statements like SELECT, FROM, WHERE, etc.

Uploaded by

Abhyudoy Roy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views13 pages

What Is Table?

The document defines key concepts in relational database management systems (RDBMS) including tables, fields, records, columns, NULL values, constraints, normalization forms (1NF, 2NF, 3NF), and SQL. Tables are collections of related data entries consisting of columns and rows. Fields make up columns which contain specific types of information for records (rows of data). Constraints and normalization help ensure data integrity and minimize redundancy. SQL is a declarative language used to define and manipulate data in RDBMS through statements like SELECT, FROM, WHERE, etc.

Uploaded by

Abhyudoy Roy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

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.

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.

field

What is record or row?


A record, also called a row of data, is each
individual entry that exists in a table. Following is a
single row of data or record in the CUSTOMERS
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.

What is NULL value?


A NULL value in a table is a value in a field that
appears to be blank, which means a field with a
NULL value is a field with no value.

SQL
Constraints
are the rules enforced on data columns
Constraints
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.

Following are commonly used constraints


available in SQL:
NOT NULL Constraint: Ensures that a column cannot have
NULL value.
DEFAULT Constraint: Provides a default value for a column
when none is specified.

SQL Constraints
Contd
UNIQUE Constraint: Ensures that all values in a column
are different.
PRIMARY Key: Uniquely identified each rows/records in a
database table.
FOREIGN Key: Uniquely identified a rows/records in any
another database table.
CHECK Constraint: The CHECK constraint ensures that
all values in a column satisfy certain conditions.
INDEX: Use to create and retrieve data from the database
very quickly.

Data Integrity:
The following categories of the data integrity exist with
each RDBMS:
Entity Integrity:. There are no duplicate rows in a
table
Domain Integrity: Enforces valid entries for a given
column by restricting the type, the format, or the
range of values.
Referential integrity: Rows cannot be deleted, which
are used by other records.
User-Defined Integrity: Enforces some specific
business rules that do not fall into entity, domain or
referential integrity.

atabase 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.
Normalization guidelines are divided into normal
forms; 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.

First normal form


First Rule of 1NF
You must define the data items. This means
looking at the data to be stored, organizing the
data into columns, defining what type of data each
column contains, and finally putting related
columns
intooftheir
Second
Rule
1NFown table.
The next step is ensuring that there are no
repeating groups of data.

Customer

Order

Third Rule of 1NF


The final rule of the first normal form, create a primary key for each
table which we have already created.

2NF
Second normal form states that it should meet all
the rules for 1NF and there must be no partial
dependences of any of the columns on the
primary key CUST_NAM ORDER_I ORDER_DETA SALE_DAT
CUST_ID

CUST_ID
1101
1102
1101

1101

E
anil

D
2222

IL
a

E
23/10/14

1102

amit

2201

23/10/14

1101

anil

2310

24/9/14

CUST_NAM
E
anil
amit
anil

ORDER_I ORDER_DETA
D
IL
2222
a
2201
b
2310
c

CUST_I ORDER_ SALE_DA


D
ID
TE
1101
2222 23/10/14
1102
2201 23/10/14
1101
2310
24/9/14

3NF
A table is in third normal form when the following
conditions are met:
1. It is in second normal form.
2. All nonprimary fields are dependent on the
primary
key.
CUST_I CUST_NAM
D

1101

anil

1102

amit

1101

anil

CUST_I CUST_NAM
D
E
1101

anil

1102

amit

1101

anil

DOB

STREET

CITY

23/4/198
bakers
chicago
1
12/4/197
chick pea st boston
7
12/4/197 montogemery newyor
6
st
k

DOB
23/4/198
1
12/4/197
7
12/4/197
6

ZIP

STREET

STATE ZIP
MI
PA
NY

CITY

2133
2
4135
2
2333
1

STAT
E

2133
chicag
bakers
MI
2
o
4135
chick pea st boston PA
2
2333 montogemery newyor
NY
1
st
k

SQL-

Structured Query language

Declarative Language
Declarative. The only paradigm where you
"just" declare the nature of the results that
you would like to get. Not how your computer
shall compute those results.
Lexical ordering
Order of execution
1. SELECT [ DISTINCT
]
2. FROM
3. WHERE
4. GROUP BY
5. HAVING
6. UNION
7. ORDER BY

1.
2.
3.
4.
5.

FROM
WHERE
GROUP BY
HAVING
SELECT[DISTINC
T]
6. UNION
7. ORDER BY

SQL FROM Statement

You might also like