Changes

Jump to: navigation, search

Difference MySQL PostGreSQL

108 bytes added, 11:31, 19 June 2014
no edit summary
{{Under construction | This page is under construction}}
 
== Introduction ==__NOEDITSECTION__
{{IMSMANG}} version 6.0 is building on a PostgreSQL database management system, whereas previous {{IMSMANG}} versions were built on a MySQL database. Both systems are relational database systems and using SQL, the Structured Query Language, as means for interacting with it. However, there are some differences between the MySQL and PosrgreSQL syntax. It is not possible to list all differences here, but the main ones encountered in the {{IMSMANG}} world are highlighted below.
CREATE OR REPLACE VIEW my_view AS
SELECT ...
FROM `imsmaenum`, ...WHERE `imsmaenum`.`enumvalue ` = 'progress report';
</pre>
WHERE imsmaenum.enumvalue = 'Progress Report';
</pre>
 
{{Note | The single quote '''`''' present in the MySQL queries is an artifact of the tool Navicat from which these queries have been extracted.}}
Similarly, in MySQL it is possible to define column names with a mix of upper and lower case as well as blanks and other special characters without any trouble. In PostgreSQL, this is also possible, but in this case the column name '''must''' be enclosed in double quotes. For example, the following create view statement:<br />
<pre>
CREATE VIEW my_view AS
SELECT `hazreducdeviceinfo`.`hazreduc_guid ` AS `hazreduc_guid`,`ordnance`.`model ` AS `Device Type`FROM `hazreducdeviceinfo`;
</pre>
1,068
edits

Navigation menu