oasis-art-project / oasis-server

Platform for the local arts
Other
2 stars 0 forks source link

Add tags to DB schema #58

Closed codeanticode closed 5 years ago

codeanticode commented 5 years ago

Tags for artists and places are missing from the corresponding models in the DB schema. They need to be added.

This old article seems a good reference about different approaches to implement tags in a SQL database:

Tags - Database schemas: http://howto.philippkeller.com/2005/04/24/Tags-Database-schemas/ Tag systems - Performance tests: http://howto.philippkeller.com/2005/06/19/Tagsystems-performance-tests/

This GitHub gist implements a tag system in Flask via SQLalchemy and association proxies:

https://gist.github.com/tachyondecay/e0fe90c074d6b6707d8f1b0b1dcc8e3a

Relevant links on many-to-many relationships and association proxies:

https://docs.sqlalchemy.org/en/13/orm/basic_relationships.html#many-to-many

https://docs.sqlalchemy.org/en/13/orm/extensions/associationproxy.html

codeanticode commented 5 years ago

Even more techniques:

Tagging multiple content-types: https://charlesleifer.com/blog/a-tour-of-tagging-schemas-many-to-many-bitmaps-and-more/

codeanticode commented 5 years ago

Using simple implementation with delimited String on all models: https://github.com/codeanticode/oasis-server/commit/4edd49c63e53cf7c1c8eaa6dfe8341ba41d71e1b