Skip to main content

Featured

Constraints

NOT NULL CONSTRAINT -    Ensures that a column cannot have a null value. DEFAULT CONSTRAINT -    Provides a default value for a column when none is specified  UNIQUE CONSTRAINT -   Ensures that all values in columns are different  CHECK CONSTRAINT -   Makes sure that all values in a column satisfy certain criteria  PRIMARY KEY CONSTRAINT -   Used to uniquely identify a row in the table  FOREIGN KEY CONSTRAINT -   Used to ensure referential integrity of the data  Primary Key - is used uniquely to identify each row in a table . It can consist of one or more columns on a table . When Multiple columns are used on a table it is called composite key.  Foreign Key - Foreign key is a column or columns that references a column most often primary key of another table . The purpose of foreign key is to maintain referential integrity of the data. Pg admin  Data base - training - right click on training - query click  Always add semi colen to run the query  Int - integer  varchar - variable charact

SQL

 SQL - Full form is Structured Query Language . It is a computerised language used for storing , manipulating and retrieving data. It was invented by IBM. 

It helps to control access , data manipulation and business insights . 

Data can be stored in 2 ways - 

1. In Table 

2. Meta data - information about structure of data . It helps retrieve the data faster . 

SQL works on Relational Databases - It means collected of related tables.

Components of Table :

1. Attributes - It is the column of table which contains same type of value for all the records .

2. Cells - Intersection of these rows and columns is called cells.  It contains its unique single value .

3. Records - It is the row of data 



Comments

Popular Posts