To study embeddings of tangles in knots, we use quandle cocycle invariants. Computations are carried out for the tables of knots and tangles, to investigate which tangles may or may not embed in knots in the tables.
Cocycles are constructed by polynomial expressions for Alexander quandles. As applications, non-triviality of some quandle homology groups are proved, and quandle cocycle invariants of knots are studied. In particular, for an infinite family of quandles, the non-triviality of quandle homology groups is proved for all odd dimensions.