> For the complete documentation index, see [llms.txt](https://smuddgge.gitbook.io/squishy-database/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://smuddgge.gitbook.io/squishy-database/creating-a-record.md).

# Creating a Record

Examples of Record Creation

This class represents the record that will be stored in the database. It is also the class type that will be returned when getting records back from the database.

```java
/**
 * <h1>Represents a customer</h1>
 */
public class Customer extends Record {

    @RecordFieldAnnotation(type = RecordFieldType.PRIMARY)
    public String uuid;

    public String name;

    /**
     * This field will not get saved to the database.
     */
    @RecordFieldIgnoreAnnotation
    public Object flag;
}
```

```java
/**
 * <h1>Represents a purchase</h1>
 */
public class Purchase extends Record {

    @RecordFieldAnnotation(type = RecordFieldType.PRIMARY)
    public String uuid;

    @RecordFieldAnnotation(type = RecordFieldType.FOREIGN)
    @ForeignKeyAnnotation(table = "Customer", field = "uuid")
    public String customer;
}
```
