Abstract: Embodiments of a method for creating a graph database which is arranged to store or process data in the form of graph tuples comprising n-parts, are described. In an embodiment, each tuple-part is encoded into a unique part identifier (hereinafter called a UPI), each UPI comprises a tag at a fixed position within the UPI. The tag indicates the datatype of the encoded tuple-part. The content data for the tuple-part is encoded in a code that is configured to reflect the ranking or order of the content data, corresponding to each datatype, relative to other tuples in a set of tuples. For content data that comprises a character-string, the code comprises a hashcode; and for content data that comprises or includes a numeric value, the code comprises an immediate value that directly stores the numeric value without encoding.