package Ġcom . example . android . database exp oter . db . dao Ċ Ċ import Ġandroid . arch . lifecycle . LiveData Ċ import Ġandroid . arch . persistence . room . Dao Ċ import Ġandroid . arch . persistence . room . Insert Ċ import Ġandroid . arch . persistence . room . On Conflict Strategy Ċ import Ġandroid . arch . persistence . room . Query Ċ import Ġcom . example . android . database exp oter . db . entity . First Table Entity Ċ import Ġcom . example . android . database exp oter . db . entity . Second Table Entity Ċ Ċ @ Dao Ċ interface ĠSecond Table Dao Ġ{ ĊĠĠĠ Ġ@ Insert ĊĠĠĠ Ġfun Ġinsert List ( data : ĠList < Second Table Entity >) ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġfirst T abel ") ĊĠĠĠ Ġfun ĠgetAll Data (): ĠLive Data < List < Second Table Entity >> ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġfun Ġinsert ( second Table Entity : ĠSecond Table Entity ) Ċ }