## Casssandra EntityStore.

### Polygene's Cassandra Keyspace

The Cassandra EntityStore can either use an existing Cassandra Keyspace, which is the default, OR create its own keyspace.

The {@code CassandraEntityStoreConfiguration#keyspaceName()} defines the name of the keyspace to use, or to be created. If not defined, then the default name is "polygene".

The {@code CassandraEntityStoreConfiguration#createIfMissing()} defines if new missing resources should be created or an Exception should be thrown if missing.

If it is created, then the {@code CassandraEntityStoreConfiguration#replicationFactor()} will define the replication factor, and the command to create the keyspace is;

`

            CREATE KEYSPACE <keyspaceName> WITH replication = {'class':'SimpleStrategy', 'replication_factor' : <replicationFactor> };

`

### Polygene's Cassandra Table

Polygene will store all entities in a single Cassandra TABLE

`

            CREATE TABLE <tableName> (
                id text,
                version text,
                appversion text,
                storeversion text,
                usecase text,
                modified timestamp,
                properties map<string,string>
                assocs map<string,string>
                manyassocs map<string,string>
                namedassocs map<string,string>
                PRIMARY KEY ( id )
            );

`