WHAT IS DATABASE?

DATABASE 

Database is a collection of entity.

ENTITY

Entity is a collection of field and record.

TYPE OF DATABASE

1. LOCAL DB
   ex:-single pc

2.GLOBAL DB
  ex:-web DB(share when host).

DATABASE STRUCTURE

      Structure of DB is tabular format.
 
 

DBMS(DATABASE MANAGEMENT SYSTEM)

KEY

KEY is nothing but it is a special kind of field for managing a database.
 
In above student_name,department,id,city,marks and age are called KEY.

TYPES OF KEY

1. Primary key
2. Unique key
3. Foreign key

1. PRIMARY KEY

       PROPERTIES OF PRIMARY KEY:-
        1. Not blank
         2. Not repeat

2.UNIQUE KEY

    PROPERTIES OF UNIQUE KEY:-
     1. Blank
     2. But not repeat

3. FOREIGN KEY

FOREIGN KEY is a referential key is used to communication between different table(entity).
 NORMALIZATION FORM
NF is a technique is used to reduced the complexity of DB and it is used to decomposition technique.

If table is large then table is divided into multiple tables this technique is called Foreign Key.This table is converted into multiple table to reduce the complexity in the database.

ex:-If user filled the form then user detail store in database their is more than 20 field like name,age,roll no. then table is divided into two or three table to reduce the complexity in the database.
                                              COMPLEXITY                                              
                                                         |
                                                  REDUCE
                                                         |
                                     NORMALIZATION FORM
                                                         |
                                          DECOMPOSITION
                                                         |
                                             FOREIGN KEY


 TERMS


 
  In above diagram student_name,marks,city,age,department and id are fields(attribute) in the DB.

TYPES OF FIELDS

1. Single value
  ex:- Roll No.

2. Multiple value
  ex:-name-First middle last name

3. Null value
  ex:-mobile no.

4. Default value
  ex:-state or country
   

No comments:

Post a Comment