Identifying codes in graphs have been widely studied since their introduction by Karpovsky, Chakrabarty and Levitin in 1998. In particular, there are a lot of results regarding the binary hypercubes, that is, the Hamming graphs K n 2 . In 2008, Gravier et al. started investigating identification in K 2 q . Goddard and Wash, in 2013, studied identifying codes in the general Hamming graphs K n q . They stated, for instance, that γ ID (K n q ) ≤ q n−1 for any q and n ≥ 3. Moreover, they conjectured that γ ID (K 3 q ) = q 2 . In this article, we show that γ ID (K 3 q ) ≤ q 2 − q/4 when q is a power of four, disproving the conjecture. Our approach is based on the recursive use of suitable designs. Goddard and Wash also gave the following lower boundThe conventional methods used for obtaining lower bounds on identifying codes do not help here. Hence, we provide a different technique building on the approach of Goddard and Wash. Moreover, we improve the above mentioned bound γ ID (K n q ) ≤ q n−1 to γ ID (K n q ) ≤ q n−k for n = 3 q k −1 q−1 when q is a prime power. For this bound, we utilize suitable linear codes over finite fields and a class of closely related codes, namely, the self-locating-dominating codes. In addition, we show that the self-locating-dominating codes satisfy the result γ SLD (K 3 q ) = q 2 related to the above conjecture. Figure 1: Optimal identifying, self-identifying and self-locating-dominating codes in G. Definition 3. A code C ⊆ V is called self-identifying in G if the code C is identifying in G and for all u ∈ V and U ⊆ V such that |U | ≥ 2 we have I(C; u) = I(C; U ).A self-identifying code C in a finite graph G with the smallest cardinality is called optimal and the number of codewords in an optimal self-identifying code is denoted by γ SID (G).