goodreads.puml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. @startuml
  2. title GoodReads Data
  3. skinparam linetype ortho
  4. !include theme.iuml
  5. entity isbn_id {
  6. isbn_id
  7. --
  8. isbn
  9. }
  10. entity isbn_cluster {
  11. cluster
  12. --
  13. isbn_id
  14. }
  15. isbn_id -|{ isbn_cluster
  16. entity raw_book {
  17. gr_book_rid
  18. --
  19. gr_book_data
  20. }
  21. entity raw_work {
  22. gr_work_rid
  23. --
  24. gr_work_data
  25. }
  26. /'
  27. entity raw_author {
  28. gr_author_rid
  29. --
  30. gr_author_data
  31. }
  32. entity raw_series {
  33. gr_series_rid
  34. --
  35. gr_series_data
  36. }
  37. '/
  38. entity raw_book_genres {
  39. gr_book_genres_rid
  40. --
  41. gr_book_genres_data
  42. }
  43. entity raw_interaction {
  44. gr_interaction_rid
  45. --
  46. gr_interaction_data
  47. }
  48. entity work_ids <<derived>> {
  49. gr_work_rid
  50. --
  51. gr_work_id
  52. }
  53. raw_work <.. work_ids
  54. raw_work ||--|| work_ids
  55. entity book_ids <<derived>> {
  56. gr_book_rid
  57. --
  58. gr_work_id
  59. # gr_book_id
  60. gr_asin
  61. gr_isbn
  62. gr_isbn13
  63. }
  64. raw_book <.. book_ids
  65. raw_book ||--|| book_ids
  66. work_ids -{ book_ids
  67. entity book_isbn <<derived>> {
  68. --
  69. gr_book_id
  70. isbn_id
  71. book_code
  72. }
  73. book_ids <.. book_isbn
  74. book_ids ||--|{ book_isbn
  75. book_isbn - isbn_id
  76. entity book_genres <<derived>> {
  77. --
  78. gr_book_rid
  79. gr_book_id
  80. genre
  81. score
  82. }
  83. raw_book_genres <.. book_genres
  84. book_ids ||-|{ book_genres
  85. entity work_title <<derived>> {
  86. gr_work_rid
  87. --
  88. gr_work_id
  89. work_itle
  90. }
  91. raw_work <.. work_title
  92. work_ids ||--o| work_title
  93. 'work_title |o-|| work_ids
  94. entity work_pub_date <<derived>> {
  95. gr_work_rid
  96. --
  97. gr_work_id
  98. pub_year
  99. pub_month
  100. pub_day
  101. pub_date
  102. }
  103. raw_work <.. work_pub_date
  104. work_pub_date |o-|| work_ids
  105. entity book_pub_date <<derived>> {
  106. gr_book_rid
  107. --
  108. gr_book_id
  109. pub_year
  110. pub_month
  111. pub_day
  112. pub_date
  113. }
  114. raw_book <.. book_pub_date
  115. book_pub_date |o-|| book_ids
  116. entity user_ids <<derived>> {
  117. gr_user_rid
  118. --
  119. gr_user_id
  120. }
  121. raw_interaction <.. user_ids
  122. entity interaction <<derived>> {
  123. gr_interaction_rid
  124. --
  125. gr_book_id
  126. gr_user_rid
  127. rating
  128. is_read
  129. date_add
  130. date_updated
  131. }
  132. raw_interaction <.. interaction
  133. raw_interaction ||--|| interaction
  134. book_ids --{ interaction
  135. interaction }-- user_ids
  136. entity rating <<derived>> {
  137. user_id : gr_user_rid
  138. book_id : cluster
  139. rating
  140. last_rating
  141. timestamp
  142. nratings
  143. }
  144. interaction <.. rating
  145. user_ids }- rating
  146. entity add_action <<derived>> {
  147. user_id : gr_user_rid
  148. book_id : cluster
  149. first_time
  150. last_time
  151. nactions
  152. }
  153. interaction <.. add_action
  154. user_ids }- add_action
  155. entity book_cluster {
  156. gr_book_id
  157. --
  158. cluster
  159. }
  160. book_ids ||-|| book_cluster
  161. @enduml
Tip!

Press p or to see the previous file or, n or to see the next file