MySQL Operators


MYSQL Operators are divided into four main categories as given below:
(1) Arithmetic Operator:

Addition +
Subtraction -
Multiplication *
Division /
Modulus %

(2) Comparison Operator :

Equal to =
Not equal to !=
Less then
Less then or equal to <=
Greater then
Greater then or equal to >=

(3) Logical Operator:

Logical NOT NOT
Logical AND AND
Logical OR OR
Logical XOR XOR

(4) Bitwise Operators:

Bitwise Shift Not ~
Bitwise Shift AND &
Bitwise Shift OR |
Bitwise Shift XOR ^
Bitwise Shift Right >> 
Bitwise Shift Left << 
     

MySQL Table Types and Storage Engine


When you create table using Create Table statement it is also possible to specify type of the table using TYPE attribute as shown below:
CREATE TABLE TableName
(
ColumnName DataType,
ColumnName DataType
) TYPE = TableType

Following are the various Types of MYSQL tables that you can specify at the time of creating new Database Table.
(1) MyISAM
(2) ISAM
(3) HEAP
(4) InnoDB
(5) BDB

Lets understand all the Table types in detail:
(1) MyISAM:
While creating Table if you don’t specify the type of the Database Table then by default its type is set to MYISAM.
This Table Type is portable. Portable means the table created using this type in one OS can also be used in other OS.
It supports large table file more then 4GB.
It is well suited for faster access speed.
It allows you to reduce the space using compression.
It allows you to specify index on BLOB as well as TEXT type.
(2) ISAM:
This Table Type is similar to the MyISAM table type in the way it also supports fixed size as well as dynamic size table.
But it is different from MYISAM table type in following way:
(1) It can support table files up to 4GB but not grater then 4GB.
(2) It is not portable. Means table created using this type in one OS can not use in other OS.
(3) It does not allow faster accessing and compression.
(4) Since maximum key length in this table type is 256 it does not allows you to specify index on BLOB and TEXT type.
(3) HEAP:
This table type is widely used for temporary tables because it supports incredible speed.
It is in-memory table which uses hashed indices.
It does not allow BLOB and TEXT type as MYISAM and ISAM type.
(4) BDB:
BDB is also known as Berkeley DB.
This table type is transaction safe and widely used for transaction.
It supports very large applications with more then one users trying to insert and update the same data at the same time.
It allows you the facility of transaction using commit and rollback statement.
One important facility provided by this table type is that allows you the facility of recover data from crashes.
It is not portable because the path of the table is hardwired into the table file while creating the table.
(5) InnoDB:
This table type is also transaction safe.
It supports very large applications with more then one users trying to insert and update the same data at the same time with locking mechanism. Locking mechanism prevents users from modifying records while another user is modifying the same record at the same time.
It also allows you the facility of recovering data from crashes.
This table type is portable.
(6) MERGE:
This table type is useful for virtual table.
This table type can be created by joining more then one MyISAM table types into single table.
However you can join more then one MyISAM table if and only if all the table having same structure.

Download Projects


Download Programs