https://stackoverflow.com/questions/36433975/can-i-accurately-unserialize-data-just-using-mysql
Just trying to figure out why this was migrated? I only want to use database functions to do the task. Is this more on topic for SO?
Original question:
https://stackoverflow.com/questions/36433975/can-i-accurately-unserialize-data-just-using-mysql
Just trying to figure out why this was migrated? I only want to use database functions to do the task. Is this more on topic for SO?
Original question:
You will have to wait for answers from the individuals that migrated your question to hear their reasoning, but personally I would not have migrated this question.
I don't think we should be migrating anything except exceptionally good questions that are obviously off-topic for Database Administrators, and obviously on-topic at the target site. Otherwise, we should just comment, vote (including to close) as normal.
The migration will automatically be rejected from Stack Overflow if it ends up being closed there (as anything except a duplicate) or deleted (including by the author). It would still remain closed here, however, until it is edited (to improve it), then reviewed for reopening. Which is probably what should have happened in the first place, without migration.
Update: the question has been deleted on Stack Overflow, so it's now back here, currently closed as off-topic, awaiting improvement:
https://dba.stackexchange.com/questions/134423/can-i-accurately-unserialize-data-just-using-mysql
Related:
What is migration and how does it work? (FAQ)
- Don't migrate crap!
- Avoid migrating answered questions.
- Don't migrate for the sake of migration.
- Be familiar with the destination site.
- If you're not sure, don't migrate it.
I was one of the voters. To be honest, I was going to vote the question as "unclear what you're asking" because you were expecting database folks to have domain knowledge about what a PHP serialized array looks like and you didn't include any SQL statements, table definitions or anything.
I saw 3 people before me already voted to migrate, and no-one cast another vote (me not being a MySQL guy) and assumed they knew the specifics about the question and felt like maybe they knew more details and thought it was a better fit on SO.
So to summarize, I would've voted to close anyway and changed my mind about the reason because of the earlier votes. Had I closed as unclear I would've probably asked for clarification at the same time, but as I said, the question appeared about PHP and there were already 3 votes to migrate.
Why close the question and ask for clarification at the same time? The question can always be reopened if it gets clarified and if it's closed we don't get answers chasing a moving target or answers that are invalidated when the question changes, which is basically wasting the answerer's time.
It seems to me that the php aspects of your question were more emphasized over the MySQL aspects of your question. That is likely one factor that motivated the migration.
It also seems like your question is unclear and/or too broad. The simple answer is: yes you can send data to a database from php and that data can be inserted into normalized tables. Since that question seems to have an obvious answer since many php applications store normalized data into MySQL databases you're probably trying to ask something else....
If you are trying to ask about ORM then I think SO is the place to do that since that responsibility is handled outside of the database. If you want to invent some sort of new implementation that puts the ORM logic in the database then that is way too big of a task for us to help you with here. You would also need to heavily justify why you wanted to take that approach IMO.
I voted to migrate that to StackOverflow since serialization is typically performed at the application layer, which allows the CPU-intensive operation to be distributed across many clients instead of it being performed at the server. Doing this work at the server is somewhat likely to result in performance issues.
I felt StackOverflow would result in a better set of answers for your situation.
When you posted the question here, you did not mention anything about requiring MySQL to do the work (other than the title, which I misread). I don't have a problem with it being migrated back here. Perhaps someone here will provide a great answer.
Reading the question, it seems unclear. I don't know what I would have voted if I had seen it, probably to "close as unclear" or make a comment for you (the OP) to clarify it.
Second, you mention that "I only want to use database functions to do the task.". But that was not in the original question. Serializing and unserializing PHP objects sounds like a job for PHP, not MySQL. Had you added that part in the question in the first place, would very probably had avoided the migration.
But errors happen, no procedure is error-free. What can be done now? I think you can flag it for (SO) mod attention, and it could re-migrated back. If that's not possible (not sure really), you could delete from SO and repost it here. I suggest you edit and clarify it in any case.
I was deciding between "unclear" and "off-topic". Seeing that the gist of the question was about implementing some logic using a programming language (literally "Can I accurately transpose a php serialized array") I thought it might have a chance on SO, provided that more details would be added. The question is certainly not about database administration.