All this has been related with my work to Oracle and it's helped me gain more of an Architecture type position now so I'd recommend growing your skills within the position they're already in AND if you feel it's necessary do some personal projects in your own time. I don't feel quitting work to study an only slightly related area would necessarily help unless you have a large amount of time/money to spare.
Whoever suggested Oracle will be around for a while is also right, so there will probably always be jobs if you can compete for them. For instance in the UK I'm aware that 100s of banks and most utility companies have used Oracle in core systems. A lot of these systems remain.
As a side note, there are also some git repos that have optimizing scripts for MySQL and Postgres that may also help her learn some of the memory management differences in the other technologies. [1][2] These tools are not perfect, but may be informative.
The Oracle ecosystem is still enormous, with many lucrative enterprise customers that will never ever migrate away. Your friend might consider doubling down on her expertise and simply competing for better-paying Oracle gigs.
That said, I don't think it has to be an either/or. I think people can learn a new tech stack without abandoning an old one.
This might be your answer. She can look for ways to transition to being a cloud engineer. There is a lot of complexity there and plenty of work to be done for the foreseeable future. As a DBA she should find that switch easier to make than moving to data science.