Data type conversion in Mysql and Oracle (Default Data Type Mappings)

MySQL Data Type Oracle Data Type
BIGINT NUMBER(19, 0)
BIT RAW
BLOB BLOB, RAW
CHAR CHAR
DATE DATE
DATETIME DATE
DECIMAL FLOAT (24)
DOUBLE FLOAT (24)
DOUBLE PRECISION FLOAT (24)
ENUM VARCHAR2
FLOAT FLOAT
INT NUMBER(10, 0)
INTEGER NUMBER(10, 0)
LONGBLOB BLOB, RAW
LONGTEXT CLOB, RAW
MEDIUMBLOB BLOB, RAW
MEDIUMINT NUMBER(7, 0)
MEDIUMTEXT CLOB, RAW
NUMERIC NUMBER
REAL FLOAT (24)
SET VARCHAR2
SMALLINT NUMBER(5, 0)
TEXT VARCHAR2, CLOB
TIME DATE
TIMESTAMP DATE
TINYBLOB RAW
TINYINT NUMBER(3, 0)
TINYTEXT VARCHAR2
VARCHAR VARCHAR2, CLOB
YEAR NUMBER

Mysql database connection and back up from ssh client


Log in to your Hosting account using SSH.

step 1: At the command line, type the following command, replacing USERNAME with your username:
mysql -u USERNAME -p

 

At the Enter Password prompt, type your password. When you type the correct password, the mysql> prompt appears.

 

To display a list of databases, type the following command at the mysql> prompt:

 

To access a specific database, type the following command at the mysql> prompt, replacing DBNAME with the database that you want to access:

 

mysql> Use holycros_drupal;

 

After you access a database, you can run SQL queries, list tables, and so on. Additionally:

  • To view a list of MySQL commands, type help at the mysql> prompt.
  • To exit the mysql program, type \q at the mysql> prompt.

 

 

 

Lets look at some of the other functions you can execute via SSH. If you want, for example, to move and copy a file to a different folder you need to type the following:

mv index.html /path/to/directory/index.html ( this command will move it)

cp index.html /path/to/directory/index.html  (this command will copy it)

Copying a whole folder is done using the -r option of the cp command. This will copy the whole folder recursively for example:

 

cp -r /path/to/folder /destination/path

The mv command can also be used to rename a file. For example:

mv index.html newindex.html

Note that unlike windows, Linux files are key sensitive, so if you are going to move or edit a file you must type the exact name.

 

 

How to optimize wordpress website

We have many option for optimizing wordpress website. From these some of them are described below:

 

Catching :

We can make site fast and re bust by using catching implementation on website.

 

Query Optimization:

Reducing unrequired column on Post table:

WordPress framework has used simple table structure. All the post and page content are inserted in single table. The content of any page and post are putting next column for revised content of individual page. If we have maxmium of this unrequired column on table it makes effect on processing time of quering process. We need to remove this unrequired column on that table .

See below the query for getting all content in individual table and unrequired column of table in the post table.

To see how much the column in that table:

select count(*) from wp_posts

where wp_post is table name.

 

Find unrequired revision content on table.

select count(*) from wp_posts where post_type=’revision’

 

 

Query to remove the unrequired revision column on the table.

delete from wp_posts where post_type=’revision’

 

 

 

 

 

 

 

 

WordPress table and relationship diagram

Diagram above provides a visual overview of the WordPress database and the relations between the tables created during the WordPress standard. The Table Overview below includes additional details on the tables and columns.

There are 11 Table in WordPress Cms.

These are tables columns and relationship are on avobe figured.