Barium carbonate is a chemical compound . Its chemical formula is BaCO3 . Barium carbonate ( BaCO3 ) , also known as witherite , is a chemical compound used in rat poison , bricks , ceramic glazes and cement .