Edit Article

The most efficient way to access data from a database is to use stored procedures. Fortunately most applications have stored procedures that follow the same basic operations and design. For large tables or a large number of tables, writing these stored procedures can be very cumbersome and prone to typographical errors. These types of stored procedures are prime candidates for automatic stored procedure generation.

Steps

  1. 1
    Read Database schema using Information_schema views.
  2. 2
    Identify Primary key & Foreign key columns using referential relation.
  3. 3
    Categorize columns using their data type like datetime, varchar, int, boolean, image, null etc...
  4. 4
    Set stored procedure name - Table name followed by Operation name or vice a versa.
  5. 5
    Ask for parameter naming convention.
  6. 6
    Combine this and generate stored procedure.

Article Info

Categories: Stub | MySQL

Thanks to all authors for creating a page that has been read 843 times.

Did this article help you?
Yes No