postgres和mysql之间的差异 [英] Differences between postgres and mysql

查看:78
本文介绍了postgres和mysql之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我问的原因是我一直在家里和工作中使用postgres,但我的新

网站主机只有mysql :(


我想要的要知道我将使用数据库编程php / perl网页有什么样的差异。


我目前在postgres中使用序列并理解这一点

mysql会有所不同,所以你能告诉我它的区别是什么吗?如果还有其他的差异我应该注意。


提前致谢


问候


Mark Cubitt

----- ----------------------(播出结束)----------------------- ----

提示7:别忘了增加免费空间地图设置

解决方案

< blockquote>

On 18/02/2004 11:50 Mark Cubitt写道:

我问的原因是我一直在家里和工作中使用postgres,但我的
新的
web主机只有h作为mysql :(

我想知道我将使用数据库编程php / perl网页会有什么样的差异。

我目前使用postgres中的序列,并了解这将是不同的
在mysql中,所以你能告诉我有什么区别,如果有其他的差异我应该注意。




我认为MySQL有自动增量列。至于剩余的

差异,我无法提供完整的清单,但据我所知:


- 只有InnoDB支持交易表格

- InnoDB表格仅支持外键

- 无子查询

- 无存储过程

- 没有触发器或约束

- 垃圾/不存在的范围检查

- 没有视图

- 不要指望遵守SQL标准


毫无疑问,其他人将能够更正/扩展此列表。我没有使用

MySQL大约4年,总是_detested_它。令人高兴的是,在迁移到Linux上时,我发现了PostgreSQL,我从未接触过MySQl。


HTH


-

Paul Thomas

+ ------------------------- ----- + -------------------------------------------- - +

| Thomas Micro Systems Limited |较小的软件解决方案

业务|

|计算机顾问|
http://www.thomas-micro -systems-ltd.co.uk |

+ ---------------------------- - + + ---------------------------------------------


---------------------------(广播结束)------- --------------------

提示5:您检查了我们广泛的常见问题解答吗?

http://www.postgresql.org/docs/faqs/FAQ.html


2004年2月18日星期三11:50,Mark Cubitt写道:

我问的原因是我一直使用postgres在家和工作,但我的新网站主机只有mysql :(

我想知道我将有什么样的差异关于
编程php / perl使用数据库的网页。


也许你最好的选择是转到 http://techdocs.postgresql.org

查看移植部分。

我目前在postgres中使用序列,并了解这在mysql中会有所不同,所以你能告诉我它的区别是什么,如果有其他差异我应该注意。




嗯...假设MySQL 3.x(可能在我认为的托管环境中)

- 没有UNION

- 没有子查询(iirc)

- 没有意见

- 没有外键

- 马虎数据分型,如果你感觉很严格,简化检查你是否感觉慷慨

- 实际上,在许多操作中默默地失败(数据验证,

外键创建等)。

- 没有触发器/程序语言

- 每个表只有一个序列(键入自动编号)

- ISAM表上没有交易

- 性能可以与多位作家迅速脱落

- 我不认为你可以使用基于交易的存储进行热备份




在它的辩护中:

- SELECT count(*)FROM foo;可以运行得更快

- 其他简单查询也表现良好


有些托管公司会以合理的价格做PG - 是吧

值得转换的痛苦?


-

Richard Huxton

Archonet Ltd


---------------------------(播出结束)------------ ---------------

提示3:如果通过Usenet发布/阅读,请发送适当的

subscribe-nomail命令 ma*******@postgresql.org ,以便您的

消息可以干净地进入邮件列表


在2004年2月18日星期三06:50,Mark Cubitt写道:

我问的原因是我总是在家里和工作中使用postgres,但我的新
网络主机只有mysql :(

我想知道我将会有什么样的差异关于使用数据库编程php / perl网页。

我目前在postgres中使用序列并明白这将在mysql中有所不同,所以你能告诉我它有什么不同吗?如果还有其他差异我应该注意for。




有一个小小的声音告诉我这是一个巨魔,但万一没有,请看

a看看 http://techdocs.postgresql.org/#convertfrom 有几个

关于从mysql转换为postgresql的文章...不完全是什么

你在做什么但可能有一些有价值的信息。您可能还想看看

查看 http ://openacs.org/philosophy/why-not-mysql.html ,这是一个

过时的比较,突破了几个没有mysql的区域

作为postgresql健壮。否则我想我会建议你问一下

mysql社区他们如何解决你的应用程序可能需要的任何缺失的postgresql功能。好吧,实际上我建议找一个新的托管公司() http://techdocs.postgresql.org/hosting.php )但是

除非我认为你必须转向mysql社区

for有关他们数据库的信息。


Robert Treat

-

构建更亮灯:Linux Apache {middleware} PostgreSQL

---------------------------(广播结束)----------- ----------------

提示2:您可以使用取消注册命令一次性取消所有列表

(发送& ;取消注册YourEmailAddressHere以 ma*******@postgresql.org


the reason I ask is I have always used postgres at home and work, but my new
web host only has mysql :(

I want to know what sort of differences I will have in regards to
programming php/perl webpages using the database.

I current use sequences in postgres and understand this will be different in
mysql, so can you tell me what the difference will be and if there are any
other differences I should look out for.

Thanks in advance

Regards

Mark Cubitt
---------------------------(end of broadcast)---------------------------
TIP 7: don''t forget to increase your free space map settings

解决方案


On 18/02/2004 11:50 Mark Cubitt wrote:

the reason I ask is I have always used postgres at home and work, but my
new
web host only has mysql :(

I want to know what sort of differences I will have in regards to
programming php/perl webpages using the database.

I current use sequences in postgres and understand this will be different
in
mysql, so can you tell me what the difference will be and if there are
any
other differences I should look out for.



I think MySQL has auto-increment columns instead. As for the rest of the
differences, I couldn''t supply a full list but from what I know:

- transactions are only supported on InnoDB tables
- foreign keys only supported on InnoDB tables
- no sub-queries
- no stored procedures
- no triggers or constraints
- crap/non-existent range checking
- no views
- don''t expect adherence to SQL standards

No doubt others will be able to correct/expand this list. I haven''t used
MySQL for about 4 years and always _detested_ it. Happily, on migrating to
Linux, I discovered PostgreSQL and I''ve not touched MySQl since :)

HTH

--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants |
http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+---------------------------------------------+

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


On Wednesday 18 February 2004 11:50, Mark Cubitt wrote:

the reason I ask is I have always used postgres at home and work, but my
new web host only has mysql :(

I want to know what sort of differences I will have in regards to
programming php/perl webpages using the database.
Perhaps your best bet is to go over to http://techdocs.postgresql.org and
check out the porting sections.
I current use sequences in postgres and understand this will be different
in mysql, so can you tell me what the difference will be and if there are
any other differences I should look out for.



Hmm... assuming MySQL 3.x (likely in a hosted environment I''d have thought)
- no UNION
- no sub-queries (iirc)
- no views
- no foreign-keys
- sloppy datatyping if you''re feeling strict, simplified checking if you''re
feeling generous
- actually, silently fails on a number of operations (data validation,
foreign key creation etc).
- no triggers/procedural languages
- only one sequence per table (typed as autonumber)
- no transactions on ISAM tables
- performance can fall off rapidly with multiple writers
- I don''t think you can do a hot backup with the transaction-based storage
libraries

In it''s defence:
- SELECT count(*) FROM foo; can run much faster
- Other simple queries also perform well

There are hosting companies who will do PG for a reasonable price - is it
worth the pain of switching?

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly


On Wed, 2004-02-18 at 06:50, Mark Cubitt wrote:

the reason I ask is I have always used postgres at home and work, but my new
web host only has mysql :(

I want to know what sort of differences I will have in regards to
programming php/perl webpages using the database.

I current use sequences in postgres and understand this will be different in
mysql, so can you tell me what the difference will be and if there are any
other differences I should look out for.



There''s a little voice telling me this is a troll, but in case not, take
a look at http://techdocs.postgresql.org/#convertfrom which has several
article on converting from mysql to postgresql... not exactly what
you''re doing but might have some valuable info. You might also want to
look at http://openacs.org/philosophy/why-not-mysql.html, which is an
outdated comparison that breaks out several areas where mysql is not as
robust as postgresql. Otherwise I guess I would recommend you ask the
mysql community how they work around any missing postgresql features you
might need for your apps. Well, actually I would recommend finding a
new hosting company (http://techdocs.postgresql.org/hosting.php) but
barring that I think your going to have to turn to the mysql community
for information about their database.

Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)


这篇关于postgres和mysql之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆