Molecules are built by chaining attributes together with the builder pattern. Here are some groups of different attribute types and their use with links to their manual pages:

Attribute basics, return types, arity, cardinality (tests)

val persons: List[(String, Int)] =

Mandatory/Tacit/Optional attributes (tests)  // all required values              ("mandatory value") // age is required but not returned ("tacit value")$.get // optional age returned            ("optional value")

Map attributes - mapped attribute values (tests) === (
    "en" -> "Dmitri Shostakovich",
    "de" -> "Dmitri Schostakowitsch",
    "fr" -> "Dmitri Chostakovitch",
    "es" -> "Dmitri Shostakóvich"

Expressions - filter attribute values with expressions (tests)

Person.age(42)                  // equality"John")    // fulltext search
Person.age.!=(42)               // negation
Person.age.<(42)                // comparison
Person.age(nil)                 // nil (null)"John" or "Jonas")  // OR-logic

Aggregates - aggregate attribute values (tests)

// rand, sample, count, countDistinct, sum, avg, median, variance, stddev

Parameterize - re-use molecules and let Datomic cache queries and optimize performance (tests: 1 input, 2 inputs, 3 inputs)

val person = m(

// Re-use `person` input molecule
val Johan  = person("John", 33).get.head
val Lisa   = person("Lisa", 27).get.head