classsite.blogg.se

Sqlite vs postgresql
Sqlite vs postgresql













sqlite vs postgresql

sqlite vs postgresql

Semantically, VARCHAR in MySQL and PG, and CHAR in MySQL and PG are the same, but in MySQL these types have a much shorter maximum length. I am missing INTEGER (alias INT) for MySQL.

SQLITE VS POSTGRESQL SERIAL

Postgres also has a BIGSERIAL type, which is the same as SERIAL but with a BIGINT type instead of an INT type. In postgres, the SERIAL datatype results in an INTEGER column, and this will about the same as MySQL's INTEGER PRIMARY KEY AUTO_INCREMENT This is roughly equivalent to BIGINT PRIMARY KEY AUTO_INCREMENT So apps may or may not be portable - at least it is no drop in replacement.įinally, for the last line in your tabl I think the SQLite phrase should read: INTEGER PRIMARY KEY AUTOINCREMENT It looks like the pg BOOLEAN type uses string literal notation. In MySQL, TRUE and FALSE map to 1 and 0 integer values. You may or may not be able to port apps depending on what they use as boolean literals. The MySQL BOOLEAN (alias BOOL, alias TINYINT(1) ) is not compatible with the pg boolean type. I would avoid it, but otherwise map it to INTEGER too. MEDIUMINT in MySQL is an odd duck (3 bytes). MySQL PostgreSQL SQLiteĬolumnname INT columnname SERIAL INTEGER PRIMARY Here is what I have so far, but I'm afraid it's not done and I need some people with more experience to help me finish any missing types. I am trying to find some way to relate column types across the the most used Databases: MySQL, PostgreSQL, and SQLite.















Sqlite vs postgresql