Comments on: Oracle vs MySQL AB https://quoderat.megginson.com/2005/10/11/oracle-vs-mysql-ab/ Open information and technology. Thu, 16 Nov 2006 04:57:39 +0000 hourly 1 http://wordpress.com/ By: Mike https://quoderat.megginson.com/2005/10/11/oracle-vs-mysql-ab/#comment-322 Thu, 16 Nov 2006 04:57:39 +0000 http://www.megginson.com/blogs/quoderat/?p=65#comment-322 jeff – what you are looking for is called triggers, and is a ‘new’ feature in mysql 5. triggers enable you to execute code upon a certain condition. you may also be vaguely referring to foreign key constraints. a foreign key is a key in one table (the linked table) that points to the primary key of another table (the foreign table). This means that if the contents of the foreign table change, then by the foreign key relationship, the linked table is pointing to somewhat different information.

foreign key example:

an employee database:

employee table
department table

the employee table would hold employee specific data such as salary, and other employee info for all company employees.

the department table would hold data specific to the company’s departments

th employee table might have a key called department_id, which could point to the primary key of the department table (perhaps called department_id, id, etc)

lets say we adjust the name of a department – now all employees in that department will have a different department name showing by their name in a report of employees and their departments.

lets say we change the department_id key value for some employees to a different department_id value – now a report which lists the employees in that department will be affected accordingly.

this is foreign keys. a consequence of foreign key constraints is that you cannot delete a specific key in the foreign table if any rows in the linked table point to that specific key.

triggers are a whole different story, and they dont necessarily impose any constraints on the data of tables you use them on, as there isnt a real relationship between them. you could use a trigger, for example, to update the salary of everyone affected in a specific department, if a minimum salary amount stored in the departments table is increased, and you would otherwise have employees whos salary is below the department minimum. if you have a foreign key relationship between tables, this kind of a situation might have to be updated with a trigger, as foreign key constraints will not update data in another table.

these are just crude examples, as triggers have much more useful purpose, i just cant think of a practical example right now, and most databases have far more complex databases than just an employee and a department table, but hopefully this helps.

]]>
By: jeff https://quoderat.megginson.com/2005/10/11/oracle-vs-mysql-ab/#comment-321 Tue, 19 Sep 2006 12:21:34 +0000 http://www.megginson.com/blogs/quoderat/?p=65#comment-321 hello there,
i am trying to reproduce a data server that a company uses to present information to its customers via the web. No problem. What they are using right now is Microsoft Access, connecting via ODBC to a server on line. The cool thing that they can do is have several tables linked together. Like if a certain field is updated in one table, it updates the same info automatically in another table. So, i want to reproduce this in MySQL, but i can’t seem to find out how. Is there a way to pull this off on the server side ? or does that have to be done on the client side ?
thanks for any tips.

]]>
By: david https://quoderat.megginson.com/2005/10/11/oracle-vs-mysql-ab/#comment-320 Wed, 12 Oct 2005 12:19:14 +0000 http://www.megginson.com/blogs/quoderat/?p=65#comment-320 There’s no need for the ODBC or JDBC driver itself to be GPL, though — it’s just a client that communicates over the network with the database server. Following that logic, only GPL’d browsers would be allowed to connect with a GPL’d web server.

]]>
By: Markus https://quoderat.megginson.com/2005/10/11/oracle-vs-mysql-ab/#comment-319 Wed, 12 Oct 2005 07:43:55 +0000 http://www.megginson.com/blogs/quoderat/?p=65#comment-319 If they go completly GPL, what will happen will all those thousands of commercial projects that have licensed MySQL to be used i proprietary products? If you use the C library or the JDBC driver in you code you have to have a MySQL commercial license to keep your product closed source. These projects will have to kick out MySQL or go Open Source.

]]>
By: John Cowan https://quoderat.megginson.com/2005/10/11/oracle-vs-mysql-ab/#comment-318 Tue, 11 Oct 2005 18:44:58 +0000 http://www.megginson.com/blogs/quoderat/?p=65#comment-318 I think it shows that dual licensing is dangerous if you’re using other people’s code in the core of your own.

]]>