SQL Tutorial - Tables
$count++; if($count == 1) { include "../mobilemenu.php"; } if ($count == 2) { include "../sharemediasubfolder.php"; } ?>
A relational database comprises of objects called TABLES. TABLES can have relations between them.
A TABLE consists of ROWS and COLUMN.
A TABLE COLUMN will define the name of the column, data type of the column, any other attributes like size etc.
A TABLE ROW will have a single row of Data on the table.
For Example:
Consider a TABLE called CUSTOMER to Store Customer Information.
COLUMNS Can be: FIRSTNAME, LASTNAME, ADDRESS, PHONENUMBER
ROWS will contain a TUPLE of (FIRSTNAME, LASTNAME, ADDRESS, PHONENUMBER)
Sample ROW: ("Rambo", "Robert", "Princess Street, Anakapalli", "111100000")
Sample ROW2: ("Mugambo", "Satraj", "Prince Street, NASA Post, MARS", "88886666")
and so on....
On viewing the TABLE it will look like below:
ROWCOUNT is the number of rows in a given table.
For the CUSTOMER TABLE, the ROWCOUNT is 2, as we have only two rows.
We will use tables extensively in our tutorial to perform various operations on them.