Home

Forums

Web development

 

 

 

 
     
 
dna88 Web development and Technology Forum
 
Profile   Register   Memberlist   Usergroups   FAQ   Search  Log in
Is there anything like PL/SQL programming in MySQL?

 
Post new topic   Reply to topic    dna88 Forum Index -> Databases Discussion Forum
Author Message
tanveer
User
User


Joined: 21 Jun 2004
Posts: 85
Location: Dhaka,Bangladesh

Post Post subject: Is there anything like PL/SQL programming in MySQL? Reply with quote

Hi there,
I was recently working in a project (online library) with PHP and MySQL and was just wondering is there anything like PL/SQL programming in MySQL as there is in Oracle.
I am doing all the coding stuff with PHP.
Thu Aug 19, 04 9:57 pm
Back to top
tanveer View user's profile Send private message
quantum
Site Admin
Site Admin


Joined: 07 Mar 2004
Posts: 1048
Location: Dhaka, Bangladesh

Post Post subject: Mysql with PL/SQL programming Reply with quote

The latest stable version of mysql is 4.02. And mysql 4.02 does not have pl/sql programming as in oracle. However, the upcoming Mysql 5.0 will have this pl/sql programming feature in it.


Stored Procedures and Triggers-->pl/sql (from mysql manual)

Stored procedures are being implemented in our version 5.0 development tree. See section 2.3.4 Installing from the Development Source Tree.

This effort is based on SQL-99, which has a basic syntax similar (but not identical) to Oracle PL/SQL. In addition to this, we are implementing the SQL-99 framework to hook in external languages.

A stored procedure is a set of SQL commands that can be compiled and stored in the server. Once this has been done, clients don't need to keep re-issuing the entire query but can refer to the stored procedure. This provides better overall performance because the query has to be parsed only once, and less information needs to be sent between the server and the client. You can also raise the conceptual level by having libraries of functions in the server. However, stored procedures of course do increase the load on the database server system, as more of the work is done on the server side and less on the client (application) side.

Triggers are scheduled for implementation in MySQL version 5.1. A trigger is effectively a type of stored procedure, one that is invoked when a particular event occurs. For example, you could set up a stored procedure that is triggered each time a record is deleted from a transactional table and that stored procedure automatically deletes the corresponding customer from a customer table when all their transactions are deleted.
_________________

Dust fills my eyes / Clouds roll by / and I roll with them / Centuries cry / Orders fly / and I fall again
Afford best design, implement best solution. Outsource your web design.
Fri Aug 20, 04 1:03 am
Back to top
quantum View user's profile Send private message Visit poster's website AIM Address
tanveer
User
User


Joined: 21 Jun 2004
Posts: 85
Location: Dhaka,Bangladesh

Post Post subject: Reply with quote

Hi,
Thankz Very much for ur reply.
Gentle smile
Fri Aug 20, 04 6:16 am
Back to top
tanveer View user's profile Send private message
quantum
Site Admin
Site Admin


Joined: 07 Mar 2004
Posts: 1048
Location: Dhaka, Bangladesh

Post Post subject: Mysql pl/sql programming Reply with quote

You are most welcome, my friend.
_________________

Dust fills my eyes / Clouds roll by / and I roll with them / Centuries cry / Orders fly / and I fall again
Afford best design, implement best solution. Outsource your web design.
Fri Aug 20, 04 8:30 am
Back to top
quantum View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    dna88 Forum Index -> Databases Discussion Forum All times are GMT - 7 Hours
Page 1 of 1

 

Partners and Resources

Bangladesh hosting company

Bangladesh web design

Driven by phpBB © phpBB Group