Skip to content

DB and datamodel

Axel Comte edited this page Sep 30, 2026 · 4 revisions

MCD

@startuml
hide circle

entity "Utilisateur" as user {
  * id_utilisateur : INT
  --
  pseudo : VARCHAR
  email : VARCHAR
  mot_de_passe : VARCHAR
}

entity "Artiste" as artiste {
  * id_spotify_artiste : VARCHAR
  --
  nom : VARCHAR
}

entity "Album" as album {
  * id_spotify_album : VARCHAR
  --
  titre : VARCHAR
  pochette_url : VARCHAR
  date_sortie : DATE
}

class "Évalue_Écoute" as interaction <<Association porteuse de données>> {
  note : DECIMAL(2,1)
  est_favori : BOOLEAN
}

user "0..*" -- "0..*" user : Suit
artiste "1" -- "1..*" album : A composé
user "0..*" -- "0..*" album 
(user, album) -- interaction

@enduml
image

MLD

@startuml
hide circle

entity "Utilisateur" as user {
  * id_utilisateur : INT <<PK>>
  --
  pseudo : VARCHAR
  email : VARCHAR
  mot_de_passe : VARCHAR
}

entity "Artiste" as artiste {
  * id_spotify_artiste : VARCHAR <<PK>>
  --
  nom : VARCHAR
}

entity "Album" as album {
  * id_spotify_album : VARCHAR <<PK>>
  --
  titre : VARCHAR
  pochette_url : VARCHAR
  date_sortie : DATE
  id_spotify_artiste : VARCHAR <<FK>>
}

entity "Evalue_Ecoute" as interaction {
  * id_utilisateur : INT <<PK, FK>>
  * id_spotify_album : VARCHAR <<PK, FK>>
  --
  note : DECIMAL(2,1)
  est_favori : BOOLEAN
}

entity "Suivi" as suivi {
  * id_suiveur : INT <<PK, FK>>
  * id_suivi : INT <<PK, FK>>
}

artiste "1" -down- "1..*" album : A composé >

user "1" -- "0..*" interaction : Évalue / Écoute >
album "1" -- "0..*" interaction : Concerne >

user "1" -- "0..*" suivi : S'abonne >
user "1" -- "0..*" suivi : Est suivi >

@enduml
image

Clone this wiki locally