How reliable are mySQL stored procedures? - mysql

This not a go/no go question. I've used all kinds of 4GLs (PL/SQL, T-SQL, PGSQL etc.) for database back-end coding and find very useful to establish data layer "closest" to database engine.
Now MySQL stored procedures got my attention and very interested in coding in this brand new 4GL platform.
I would like to start using it in one of my proof of concept projects. What you folks think about MySQL stored procedures? Crucial question is; Is it reliable? How "Oracle Corporation" supports MySQL stored procedures (i.e. documentation, forums etc.)?
Thanks

Support started in v5.0, it's currently in v5.1 (v5.5 is in the pipe). If they weren't reliable, they'd have been removed.
I don't know what you mean by "how Oracle supports it" - the syntax is different, rarely (if ever) will you be able to port an Oracle stored procedure directly to MySQL without alteration.

A mySQL stored procedure will be as reliable as you make it. If you write it to do everything you need then it will be fine. If you don't it wont.
As #OMG states they began supporting in version 5.0.
What do you mean when you ask how Oracle supports it?

Related

How to migrate from Oracle 10g databse to MySql 8 database

We are currently using Oracle 10G database for the backend support of our application. We need to migrate the entire Oracle database schema into MySQL database, including all existing tables, views, procedures, triggers and sequences etc.
Can anyone kindly help me to guide the steps of migration, without hampering any schema definitions, keys and constraints etc.??
Also I came to know that MySQL does not support 'sequences'. In that case how can we convert the sequences which are present in Oracle database?
Please don't just mention any tool name, because I found few tools online but those are really lengthy and cumbersome processes to follow. Kindly mention step-wise, so that it's understandable easily.
I used Sql Developer IDE earlier, but it supports the reverse way migration, that is, from MySql to Oracle, not the one I need. Hence, I could not use it.
There is an Oracle Doc ID 1477151.1 for that case.
Though you asked to not mention any tool name, in that document Oracle advises to use MySQL Migration Wizard and provide some script examples for manual migration in case if automatisaton won't work.
Check those out. I hope that'll help
UPD: Again, I'm aware of you asking not to mention any tool, but here's another excerpt from that doc where even Oracle clearly says you have to use a third-party tool
Migration of Stored Procedures, Functions, Packages, Triggers, Views, Sequences must be performed using third party tools and needs manual effort. This document highlights method to perform data migration.
There are a host of third party tools, some of which are open source. For example:
http://www.sqlines.com/oracle-to-mysql
http://kettle.pentaho.com/
http://www.convert-in.com/ora2sql.htm
http://www.ispirer.com/products/oracle-to-mysql-migration

SQL database questions [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
So I have a couple questions that I would like to have cleared up for me. I have searched all over the internet for a month trying to find an answer to these questions. I really want to learn SQL and understand how the language interacts with its database. So here are a couple questions that I have had.
My understanding is that there is MySQL and other software applications that help you interact with your database. What are some other applications that could let me interact with my database?
If I am using MySQL where is the data being stored? On my computer or on a database somewhere else?
Where can I go to get a free SQL server and interact with it using an oracle application to interact with my database?
Can I store files and images in an SQL server?
So, lets say I have an SQL database and it has TONS of traffic running through it. What would I do to split the servers up, but still have then interact with each other? Would I create a database that tells where to send that data?
I know that Oracle, Microsoft, etc. have free SQL servers. Can somebody point me in the right direction? I am not exactly sure where to go to actually put my tables and such on a database. I do have the application however.
I have tons of other questions, but I will search as hard as I can for those. Thanks you for your response in the advance.
My understanding is that there is MySQL and other software applications that help you interact with your database. What are some other applications that could let me interact with my database?
MySQL , SQL Server , Oracle are softwares to be precise
Relational Database management systems RDBMS, they Manage (Store, retrieve ,
modify) data for you.
If I am using MySQL where is the data being stored? On my computer or on a database somewhere else?
Data will be stored in a database, database is really a file on your computer's
file system but you will not directly work with the actual physical
file, you will only work with the RDBMS and the RDBMS will manage that
file for you.
Where can I go to get a free SQL server and interact with it using an oracle application to interact with my database?
SQL Server Express is a free version.
Can I store files and images in an SQL server?
Yes in SQL Server you have the ability of storing files/documents using a feature
called FILESTREAM.
So, lets say I have an SQL database and it has TONS of traffic running through it. What would I do to split the servers up, but still have then interact with each other? Would I create a database that tells where to send that data?
For load balancing SQL Server has a feature called Replication
I know that Oracle, Microsoft, etc. have free SQL servers. Can somebody point me in the right direction? I am not exactly sure where to go to actually put my tables and such on a database.
Download link for Microsoft® SQL Server® 2012 Express
1) I think you might be getting the actual database software and the user interfaces confused for example MySQL is a piece of database software that manages the data stores retrieves it etc. phpMyAdmin is a GUI that you can use to interface with MySQL rather that writing SQL queries. There are other variants of SQL like SQL*Plus and i'm sure there are phpMyAdmin equivalents for all of them however I have only ever used them with the command line. Another alternative is something like MongoDB which is a noSQL database.
2) The data is stored wherever the database is installed. You could run it on a local server. LAMP (linux), WAMP(windows) or MAMP(mac) is the easiest way to get this set up. again look on youtube 100s of tutorials on this
3) http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html I havent fully looked into this I must admit
I wont bother carrying on because M.Ali has posted a very good answers to the rest of the questions
Let's see if I can help you with this:
My understanding is that there is MySQL and other software applications that help you interact with your database. What are some other applications that could let me interact with my database?
MySQL, SQL-Server and others are Relational Database Management Systems (RDBMS for short); they are database software that help you store your data, following the relational model (columns are fields, rows are data-tuples, etcétera). RDBMSs handle the task of storing, updating and retrieving the data, but they are not, by themselves, "applications". An application (as I understand it) is a program designed to interact with a user, and sits between the user and the data stored in the database. So, this is a little schematic of what is going on
Database Application User
-------- ----------- ----
Stores data Receives user input/output Interacts with the app
and sends / updates / reads
data to/from the database
If I am using MySQL where is the data being stored? On my computer or on a database somewhere else?
It's stored in the computer where it's installed (in the simplest configuration). Each RDBMS may handle the data storage differently, but the bottom line is that the RDBMS "worries" about the data storage, and let's you handle the data with a "simple" and "consistent" language (most cases, using the particular SQL "dialect" of the RDBMS)
Where can I go to get a free SQL server and interact with it using an oracle application to interact with my database?
What do you mean by "Oracle application"? Oracle, as far as I know, is a RDBMS. If you want to get the free SQL-Server, go to the Microsoft Site and download it.
Can I store files and images in an SQL server?
Yes
So, lets say I have an SQL database and it has TONS of traffic running through it. What would I do to split the servers up, but still have then interact with each other? Would I create a database that tells where to send that data?
Many RDBMSs have tools to handle this (partitions, replication, etcetera). Read the documentation.
I know that Oracle, Microsoft, etc. have free SQL servers. Can somebody point me in the right direction? I am not exactly sure where to go to actually put my tables and such on a database. I do have the application however.
Google around. MySQL is free, PostgreSQL is free. SQL server has a free version. Also, Google around for a good SQL tutorial (I'd recommend you to learn how to use MySQL, because it's one of the easiest ones).
You should narrow your research. If you want a free, fully featured RDBMS, I'd recommend you use MySQL or PostgreSQL (I don't use SQL server, but that's just me). Also, if you want to develop applications, you should learn how to develop with other languages. Most (if not all) languages have libraries designed to interact with databases.
I would start here: http://www.w3schools.com/sql/sql_intro.asp. W3Schools does a decent job explaining the basics. From there you could branch out to http://www.tutorialspoint.com/sql/sql-rdbms-concepts.htm. A Google search from there would suffice to answer any other questions you may have.
MySQL, Oracle, and SQL Server are some that are used to create SQL databases.
MySql can be stored locally or on a host (godaddy).
MySql is free. I believe you have to pay to use the others.
Yes.
When you get to that point, you'll want to either hire someone, or work on databases and web traffic till you understand a good amount.
I would check with Godaddy, or some other web hosting site, and they can provide free advice.

How do you test a SQL statements across multiple Database types?

Does anyone know of a quick and easy test to see if a query is properly formatted for both MySQL & MSSQL. Perhaps other database types as well, such as SQL Server? I only have access to MySQL at this time.
Info: I'm working on an Open Source project called JJWDesign Google Maps for SugarCRM. Some of the queries use the SugarCRM classes; others I have to write custom. For example, some are special distance calculations against the geocode information stored in the tables.
http://www.sugarforge.org/projects/jjwgooglemaps/
More importantly, while there is an accepted syntax, each flavour of database has it's own specific functions, features and things you can do.
The best you can do is to make do with the most basic of features. Oracle has different functions for datetime compared to mysql compared to db2. While I would love to assist in a 'free as in beer' project, you really will need to check each function to see if it is the same across all major vendors. General functions most often are, so abs() will be fairly consistent, but others simply won't.
You're talking about a SQL parser so by definition it either isn't going to be quick and easy or it will do only the simplest checking.
Each RDBMS has its own flavour of SQL too so you'd really be limited to testing whether it was ANSI SQL.

Need a tool to convert postgres database to mysql

I found the mysql migration toolkit which will migrate the tables.But is there something which will convert the functions as well.
Almost certainly not.
If your functions are in the SQL language only, it should probably be doable. But any of the many other languages supported by PostgreSQL (pl/pgsql, perl, python etc) are completely different, and contain much functionality that's simply not supported on MySQL.
most likely not. the stored procedure and function language differs greatly between postgresql and mysql. such an application would be costly to develop.
There are several data migration tools available on Google to convert database. I use dbload for example.

PL/Ruby equivalent in MySQL

PL/Ruby is a loadable procedural language for Postgres that lets you use Ruby to write user defined functions for the database.
Anyone know of an equivalent way of writing user defined functions for MySQL in Ruby?
Starting from version 5 (I think) Mysql supports stored procedures, but the syntax is restricted to SQL:2003 which is somewhat similar to PL/SQL.
Other languages aren't supported and I'm not aware of any projects offering ruby support. Last time I checked the PL/Ruby extensions to postgres were still a bit wonky as well, though.
Mysql as far as I am aware only supports MySQLs own stored procedure language.
I'm a postgresql fan too, and this is something that has always frustrated me about MySQL when I have had no choice but to use it. :(