However, sometimes I get errors when it’s trying to create views with references to another databases that it’s not created yet. How can I disable this checking?
SET FOREIGN_KEY_CHECKS = 0 doesn’t help…
However, sometimes I get errors when it’s trying to create views with references to another databases that it’s not created yet. How can I disable this checking?
SET FOREIGN_KEY_CHECKS = 0 doesn’t help…
You cannot disable this.
Just ignore the errors, or export ALL databases.
Just ignore the errors, or export ALL databases.
If I export (dump) with “–all-databases” instead of “–database DatabaseName”, I imagine that I will have same problem, right? Or the dump first create tables and then create views? My mysql have more than 150 gigas and every check it takes some hours and I can’t analize the content of .sql files.
No, not necessary.
I can’t analize the content of .sql files.
You must. Or as alternative you should know your DB like the back of your hand
About to know the database, you are right. However, for this project, there is no DBA. In fact, we are all developers, and I am trying to help while we receive a colleague to help the team.
Thank you very much.
About to know the database, you are right. However, for this project, there is no DBA. In fact, we are all developers, and I am trying to help while we receive a colleague to help the team.
Thank you very much.
DBA is a less professional qualification, so you must be able to do it.
Hi Mohd. SQL is the language to speak with any database system. PL-SQL is a more advanced language than SQL, only available in ORACLE. ORACLE and MySQL (among others) are database servers / systems.
Try to edit config and restart the server
It means you haven’t done it
without details this can’t be solved.
– I’m going to over simplify my tables for this example
– I have two tables “origin” and “current”
they may have some fields in common
sometimes i have the id field, wich is great, and sometimes i need to use alternative field/s to match both tables.
– I need to try every posible match and also the “no match” option
– I need to give priority to the better matching mechanism
So:
– I’ve made a union query to get every posible matching and use a “score” field:
select “1” as score, some-fields
from origin join current on origin.id = current.id
union
select “2” as score, some-fields
from origin join current on origin.field_x = current.field_y and blah blah
…
union
select “99” as score, some-fields
from origin
left join current on current.id = “non existing value”
order by origin.id, score
– And now i need to keep the first (lower score) records and remove every other one in the result
i must keep every “1” score row and also every “2” score row in case that i don’t have a “1” score row for that id… the same goes for every row if it has the lowest score for that id
Any ideas?
– I’m going to over simplify my tables for this example
– I have two tables “origin” and “current”
they may have some fields in common
sometimes i have the id field, wich is great, and sometimes i need to use alternative field/s to match both tables.
– I need to try every posible match and also the “no match” option
– I need to give priority to the better matching mechanism
So:
– I’ve made a union query to get every posible matching and use a “score” field:
select “1” as score, some-fields
from origin join current on origin.id = current.id
union
select “2” as score, some-fields
from origin join current on origin.field_x = current.field_y and blah blah
…
union
select “99” as score, some-fields
from origin
left join current on current.id = “non existing value”
order by origin.id, score
– And now i need to keep the first (lower score) records and remove every other one in the result
i must keep every “1” score row and also every “2” score row in case that i don’t have a “1” score row for that id… the same goes for every row if it has the lowest score for that id
Any ideas?
It was a bad idea doing this task this way.
– I’m going to over simplify my tables for this example
– I have two tables “origin” and “current”
they may have some fields in common
sometimes i have the id field, wich is great, and sometimes i need to use alternative field/s to match both tables.
– I need to try every posible match and also the “no match” option
– I need to give priority to the better matching mechanism
So:
– I’ve made a union query to get every posible matching and use a “score” field:
select “1” as score, some-fields
from origin join current on origin.id = current.id
union
select “2” as score, some-fields
from origin join current on origin.field_x = current.field_y and blah blah
…
union
select “99” as score, some-fields
from origin
left join current on current.id = “non existing value”
order by origin.id, score
– And now i need to keep the first (lower score) records and remove every other one in the result
i must keep every “1” score row and also every “2” score row in case that i don’t have a “1” score row for that id… the same goes for every row if it has the lowest score for that id
Any ideas?
Just write one left join.
From origin left join current on … Mandatory matching conditions here….
And add this ranking of match in WHERE
From origin left join current on … Mandatory matching conditions here….
And add this ranking of match in WHERE
Or probably use window functions and filter by them
Is a requeriment 🙁
From origin left join current on … Mandatory matching conditions here….
And add this ranking of match in WHERE
i don’t understand how to add the ranking here
it cna’t be req as this is how you do this, not what you do
How are you going to search video “files” ?
LinkedIn – tags based searches
Instagram – videos and pictures
write a big CASE expression calculating rank, add order by some basic fields and the rang,
use a cursor running over this query and choosing one or several records in a group by the rang.
LinkedIn – tags based searches
Instagram – videos and pictures
So, in a DB you will store path to video and its TAGS and other attributes, NOT the video itself.
Then ANY DBMS will be able to handle this data
use a cursor running over this query and choosing one or several records in a group by the rang.
Thank you, i’ll check that cursor approach
Or you can try this https://dev.mysql.com/doc/refman/8.0/en/window-functions.html