Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

Create and sync a non-normalised version of a normalised mysql database

$
0
0

I have a highly normalised mysql database that receives imported feed data regularly and is optimised for writing

Schema

This schema is proving very difficult when it comes to use with Doctrine ORM which is a major component when it comes to building the "read" part of the system.

What I really require is some mechanism to create a different schema that would essentially denormalise the BookieEvent, BookieMarket and BookieOutcome tables into the Event, Market and Outcome tables.

I am open to suggestion as to how best to approach this and am surprised a solution isn't immediately obvious. Some initial thoughts:

  • I can rule out DB Views as these aren't Doctrine friendly.
  • Triggers could be a possible way to go but would prefer a more abstract method if possible
  • Some kind of cron job taking copies and transforms every 2-3 minutes into another db? (not ideal as data amounts are high and data must be fresh)
  • Some kind of mysql replication but with a way to alter the schema?
  • An off-the-shelf db migration solution that can be cronned?

If I were to create 3 Views: Event, Market and Outcome, could these be replicated/cron-synced to another db easily? (As tables in their own right)


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>