简体   繁体   English

MySQL:表vs视图vs例程

[英]MySQL: Tables vs Views vs Routines

What is the difference Between MySQL : Tables vs Views vs Routines(Store Procedures)? MySQL:表,视图与例程(存储过程)之间有什么区别?

I am familiar with tables. 我熟悉表格。 heard about views and routines . 听说过意见和惯例。 for both name itself says , it can allow to view data's is it? 顾名思义,它可以允许查看数据吗?

In MySQL I am having these 3 under schemas... Does these 3 are available in other SQL too like POSTGRES? 在MySQL中,我在架构下使用了这3个...在其他SQL中也可以使用这3个,例如POSTGRES?

What is the functional difference between these 3? 这3个功能之间有什么区别?

In a nutshell. 简而言之。

A table has physical storage of data. 表具有数据的物理存储。

A view is an sql query that can be queried like a table but does not have any physical storage as such. 视图是一个SQL查询,可以像表一样查询,但没有任何物理存储。

A procedure is a programmable sub-routine that can perform any number of actions permissible to the database base and the executing user. 过程是可编程子例程,可以执行数据库库和执行用户所允许的任何数量的动作。

These definitions can vary depending on the db solution that you are using. 这些定义可能会有所不同,具体取决于您所使用的数据库解决方案。 I suggest reading the relevant documentation. 我建议阅读相关文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM