# Create and Delete

## Create Record

Create a new Record.

```javascript
db.create('tag',data)
```

### Parameters

<table><thead><tr><th>Name</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>tag</td><td>The new Record's tag</td><td>String</td><td>true</td></tr><tr><td>data</td><td>The data to save</td><td>Any (match the chosen file extension)</td><td>true</td></tr></tbody></table>

## Delete Record

Delete a record, found by it's tag.

```javascript
db.delete('tag')
```

### Parameters

<table><thead><tr><th>Name</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>tag</td><td>The tag of the Record to delete</td><td>String</td><td>true</td></tr></tbody></table>

### Delete Old Records

Will delete Records older than the time provided.

```javascript
db.deleteMany.byAge({ time: { ms:5, seconds:5, minutes:5, hours:5, days:0} })
```

### Parameters

<table><thead><tr><th>Name</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>time.ms</td><td>Milliseconds</td><td>Number</td><td>false</td></tr><tr><td>time.seconds</td><td>Seconds</td><td>Number</td><td>false</td></tr><tr><td>time.minutes</td><td>Minutes</td><td>Number</td><td>false</td></tr><tr><td>time.hour</td><td>Hours</td><td>Number</td><td>false</td></tr><tr><td>time.days</td><td>Days</td><td>Number</td><td>false</td></tr></tbody></table>
