Asked 7 years ago
27 Jan 2017
Views 1326
sandip

sandip posted

MySQL vs SQLite

what is difference between MySQL and SQLite ?
i want to know difference in query schema , database schema , store procedure etc ..
if you try to import a database from SQLite to MySQL or MySQL to SQLite what are the change i should do ?
Rasi

Rasi
answered Nov 30 '-1 00:00

in SQLite have all column 64-bit signed by default , you dont need to say when you create table but Mysql Need it mention column is signed or not ?
SQLite query

CREATE TABLE `jos_banner` (
   `name` TEXT  NOT NULL DEFAULT '')

here name is 64-bit signed by default

CREATE TABLE `jos_banner` (
   `name` varchar(255)  unsigned  NOT NULL DEFAULT '')


which name make unsigned
Mitul Dabhi

Mitul Dabhi
answered Nov 30 '-1 00:00

i think we cant compare MySQL and SQLite because it both have differ use .
MySQL mostly used with mid-large web application and SQLite is mostly used as small level Application or OS
SQLite is used as alternative of file system , it used to avoid file operation


MySQL pair good with PHP at website Development , SQLite pair with mobile Application , Android

SQLite dont support store procedure . and MySQL do support stored procedure .

Example of MySQL support stored procedure

CREATE PROCEDURE sp1 (x VARCHAR(5))
BEGIN
  DECLARE xname VARCHAR(5) DEFAULT 'bob';
  DECLARE newname VARCHAR(5);
  DECLARE xid INT;

  SELECT xname, id INTO newname, xid
    FROM table1 WHERE xname = xname;
  SELECT newname;
END;


you cant write this type of long program in SQLite


if you want to transform MySQL query to SQLite , check question : MySql Query to SQLite Query

Data Type
SQLite database Supporting following Data Type:
NULL , INTEGER , REAL , TEXT , BLOB

and MySQL Database Supporting following Data Type:
NUMERIC , STRING , DATE AND TIME


Post Answer