Are all kinds of procedural code stored on server side, once created? How are they stored?

只愿长相守 提交于 2019-12-02 21:46:11

问题


  1. Are all kinds of procedural code (stored procedure, functions, views and triggers) stored on database or database management system server, once created, regardless of how they are created (for example, typing their definitions interactively in a command-line client of the database management system)? I am asking this because

    • in the command-line client of a RDBMS (such as postgresql, mysql, server sql), when typing a query statement, the query statement isn't stored any where.
    • in an interactive command-line REPL for a general purpose programming language, when typing the definition of a function or procedure, the function or procedure will not exist after closing the session of the REPL.
  2. How are procedures, functions and triggers and views stored?

    Are they stored per table, per database or per database management system server?

    If they are stored per database, are they stored in a separate table from the tables that store the actual data and are in the same database? For example, in every database, besides those tables which store the actual data, is there a table which stores the stored procedures of the database, a table the functions of the database, a table the views of the database, and a table the triggers of the database?

    Similar questions if they are stored per table, or per database management system server.

Thanks.

来源:https://stackoverflow.com/questions/48113934/are-all-kinds-of-procedural-code-stored-on-server-side-once-created-how-are-th

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!