0

What is the difference Between MySQL : Tables vs Views vs Routines(Store Procedures)?

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?

What is the functional difference between these 3?

Brian Tompsett - 汤莱恩
  • 5,438
  • 68
  • 55
  • 126
Mohideen bin Mohammed
  • 16,635
  • 8
  • 97
  • 110
  • 1
    Possible duplicate of [What is the difference between a stored procedure and a view?](https://stackoverflow.com/questions/5194995/what-is-the-difference-between-a-stored-procedure-and-a-view) – Arion Jun 15 '17 at 09:56
  • i am asking about mysql schema having tables views procedures. that question have only views and procedures alone even for sql-server. kindly check the difference . is there anything wrong tell me – Mohideen bin Mohammed Jun 15 '17 at 10:00
  • A schema (database in MySQL) is just a name space to organize database objcts. It doesn't make much sense to keep one type of object in one schema. They are more useful for grouping objects that belong together. – Laurenz Albe Jun 15 '17 at 10:35

1 Answers1

4

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.

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.

VynlJunkie
  • 1,713
  • 20
  • 25