canonical divisor and different ideal Let $X=\operatorname{Spec } O_K$ where $K$ is a number field. On one side we have the notion of canonical class $\mathcal K_X$ that is the divisor class associated to the sheaf $\Omega^1_{X|\mathbb Z}=\mathcal O^\vee_X$. But on the other hand one can define the different divisor $\mathfrak D_K$ associated to the different ideal $\delta_K$.
What is the relationship between the divisors $\mathfrak D_K$ and $\mathcal K_X$? Are they the same?
As far as I know $\mathfrak D_K$ should be the "right" arithmetic generalisation of the canonical divisor if one looks at the arithmetic Riemann-Roch theorem.
 A: Question: "What is the relationship between the divisors $D_K$ and $K_X$? Are they the same?"
Answer: If $K \subseteq L$ are number fields there is a relation between the discriminant $\delta_{L/K}$ and the different $D_{L/K}$: There is an equality of ideals
$$\delta_{L/K}=N_{L/K}(D_{L/K})$$
(Neukirch, Thm 2.9, page 201 "Algebraic number theory"). The different $D_{L/K}$ is the annihilator ideal $ann(\Omega)$ (here $\Omega:=\Omega^1_{\mathcal{O}_L/\mathcal{O}_K})$), of the module of relative  Kahler differentials. The Discriminant $\delta_{L/K}$ is the ideal generated by the $d(\alpha_i)$ of all bases of $L/K$ contained in $\mathcal{O}_L$. If $A:=\mathcal{O}_L$ and $C:=Spec(A)$ it follows $dim(C)=1$ hence $C$ may be viewed as an "affine curve". The relative module of differentials $\Omega^1$ is not an invertible sheaf in general hence you may not use the correspondence between "invertible sheaves" and "divisors" as done in Hartshorne. When it is invertible you let $\omega_C$ be the corresponding divisor. There is as mentioned in the comments above an exact sequence
$$0 \rightarrow D_{L/K} \rightarrow \mathcal{O}_L \rightarrow \Omega^1 \rightarrow 0,$$
hence in the locally trivial case you get in the Grothendieck group $K_0(A)$ an equality $[D_{L/K}]=1-[\Omega^1]$.
Note: There is for a local complete intersection scheme over a field a definition of the canonical bundle: The canonical bundle $\omega^o_X$ of of a local complete intersection and closed sub-scheme $X \subseteq \mathbb{P}^n_k$ over a field $k$ is defined as $ \omega^o_X:=\omega_{\mathbb{P}^n_k} \otimes \wedge^r (I/I^2)$ where $r:=codim(X)$ and $I$ is the ideal sheaf of $X$. It follows (HH.Prop.III.7.11) that $\omega^o_X$ is an invertible sheaf and $K_X$ is the corresponding divisor in the case when $X$ is integral. Hence you get a "canonical bundle" and corresponding "canonical divisor" when $X$ is singular. By HH.Prop.III.7.2 the sheaf $\omega^o_X$ is unique, hence you get a canonical divisor $K_X$ when $X \subseteq \mathbb{P}^n_k$ is an integral projective scheme that is a local complete intersection. In Liu's book you find a more general construction.
When $X$ is singular $\Omega^1_X$ is no longer locally trivial and $\wedge^d\Omega^1_X$ is not an invertible sheaf. Hence you cannot use the cotangent sheaf to define a divisor.
Example: You may consider the Grothendieck group of coherent $A$-modules $K(A)$ since the module of differentials is a coherent $A$-module, and here you get an equality of classes
$$[D_{L/K}]=1-[\Omega^1].$$
