Abstract. In this paper we describe a language and method for deriving ontologies and ordering databases. The ontological structures arrived at are distributive lattices with attribution operations that preserve ∨, ∧ and ⊥. The preservation of ∧ allows the attributes to model the natural join operation in databases. We start by introducing ontological frameworks and knowledge bases and define the notion of a solution of a knowledge base. The import of this definition is that it specifies under what condition all information relevant to the domain of interest is present and it allows us to prove that a knowledge base always has a smallest, or terminal, solution. Though universal or initial solutions almost always are infinite in this setting with attributes, the terminal solution is finite in many cases. We describe a method for computing terminal solutions and give some conditions for termination and non-termination. The approach is predominantly coalgebraic, using Priestl...