Skip to content

Slice de la base de dades #5

@albertms10

Description

@albertms10
  • Definir l’esquema relacional de la base de dades
  • Escriure les ordres de creació de l‘esquema en PostgreSQL

https://dbdiagram.io/d/ACO-66103a4503593b6b614d8632

Image

Primera versió de l’esquema relacional
Table registres {
  id integer [primary key]
  id_teclat string
  nom string
  /**
   * @type {Record<Note, Peus[]>}
   *
   * @example - Ple
   * {
   *   C: ["2 2/3", "2", "1 1/3"],
   *   "c'": ["4", "2 2/3", "2"]
   * }
   *
   * @example - Bordó c'/cs'
   * {
   *   C: ["8"],
   *   "cs'": ["8"]
   * }
   *
   * @example - Baixons i clarins
   * {
   *   C: ["4"],
   *   "cs'": ["8"]
   * }
   *
   * @example - Corneta
   * {
   *   "g|cs'-c'''": ["8", "4", "2 2/3", "2", "1 1/3"]
   * }
   *
   * @example - Corneta
   * {
   *   "peus": ["8", "4", "2 2/3", "2", "1 1/3"],
   *   "tessitura": "g|cs'-c'''"
   * }
   */
  tessitura json
}

Table teclats_registres {
  id_teclat integer
  id_registre integer
}

Ref: teclats_registres.id_teclat > teclats.id
Ref: teclats_registres.id_registre > registres.id

Table teclats {
  id integer [primary key]
  id_orgue integer 
  extensio string
}

Ref: teclats.id_orgue > orgues.id

Table orgues {
  id integer [primary key]
  nom string
  temperament string
  diapaso string
}

Table diapasons {
  id integer [primary key]
  nota string
  frequencia double
  temperatura double
  id_registre integer
}

Ref: diapasons.id > orgues.id
Ref: diapasons.id_registre > registres.id

Table actuacions {
  id integer [primary key]
  id_orgue integer
  id_orguener integer
  type enum('a', 'b')
  descripcio string
}

Ref: actuacions.id_orgue > orgues.id
Ref: actuacions.id_orguener > orgueners.id

Table orgueners {
  id integer [primary key]
  nom string
}

Sub-issues

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

Status

In progress

Relationships

None yet

Development

No branches or pull requests

Issue actions