Add 'artists'

Anna Schumaker 2023-03-22 09:22:22 -04:00
parent 7bcdebf196
commit 6ae3e5e818
1 changed files with 24 additions and 0 deletions

24
artists.md Normal file

@ -0,0 +1,24 @@
The `artists` table holds information for artist playlists. The `artists_view` joins the `artists` table with the [[playlist_properties]] table so the application can use one query to access all the relevant state for each artist.
### Columns
| Name | Type | Description |
| --------------------------------- | ------- | ------------------------------------- |
| artistid | INTEGER | The unique id of a singe artist |
| [propertyid](playlist_properties) | INTEGER | The rowid of this artist's properties |
| name | TEXT | The name of this artist |
| mbid | TEXT | The [MusicBrainz ID](https://musicbrainz.org/doc/MusicBrainz_Identifier) of this artist |
### Triggers
| Name | When | Description |
| ---------------------- | ------------ | --------------------------------------------------------------- |
| artists_insert_trigger | After insert | Create a new row in the [[playlist_properties]] table |
| artists_delete_trigger | After delete | Delete this artist's entry in the [[playlist_properties]] table |
### The `artists_view`
| Column | Description |
| --------------------------------- | -------------------------------------------------------- |
| artistid | The artistid of this artist |
| [propertyid](playlist_properties) | The rowid of the [[playlist_properties]] for this artist |
| name | The name of this artist |
| mbid | The MusicBrainz ID of this artist |
| [active](playlist_properties) | The active state of this artist |