Exchange rates are now shared across companies, so you can’t simply apply the logic from AX2009. An analogous solution exists, though. Legal entity is mapped to Ledger (table), which has DefaultExchangeRateType (field). That maps Ledger to ExchangeRateCurrencyPair records and each ExchangeRateCurrencyPair has date-effective ExchangeRate records.
It’s difficult to get it all right (date-effective data, triangulation etc.) and you even shouldn’t duplicate this logic in your application. If you need to read data from database, you will benefit a lot from using ExchangeRateEffectiveView (view). Other options exist, such as LedgerExchangeRateService web service or .NET Interop to X++.
Definitely read Shared Currencies and Exchange Rates for Microsoft Dynamics AX 2012, it contains a lot of information about the data model and APIs.
To state it explicitly: any direct access to AX database is discouraged, because it bypasses everything handled by AX application layer (especially security) and you can’t reuse any AX business logic (including expansion of surrogate keys, for example).