2018-07-15 02:20:11 |
Kristina Hoeppner |
description |
Currently we have
- artefact_tag
- collection_tag
- view_tag
- usr_tag
tables and if we want to have new tagging, say for groups we would need to add another table
It might be easier to combine all these tables so that we can do easier queries, like what are all the tags for an owner. Rather than having to do a bunch of table joins and checking what things are owned by what view/artefact etc we can just query the one table.
I'm thinking of having one table with the fields
id, tag, resourcetype, resourceid, ownertype, ownerid, editedby, ctime, mtime
where resourcetype is either 'view', 'artefact' etc
and resourceid is the id of that type
Where ownertype can be 'user', 'group', institution'
and ownerid can be the id number or shortname
And editedby can be the ID of the current user interacting with the tag - useful for group/institution tags
ctime = created time
mtime = modified time |
Currently we have
- artefact_tag
- collection_tag
- view_tag
- usr_tag
tables and if we want to have new tagging, say for groups we would need to add another table
It might be easier to combine all these tables so that we can do easier queries, like what are all the tags for an owner. Rather than having to do a bunch of table joins and checking what things are owned by what view/artefact etc we can just query the one table.
I'm thinking of having one table with the fields
id, tag, resourcetype, resourceid, ownertype, ownerid, editedby, ctime, mtime
where resourcetype is either 'view', 'artefact' etc
and resourceid is the id of that type
Where ownertype can be 'user', 'group', institution'
and ownerid can be the id number or shortname
And editedby can be the ID of the current user interacting with the tag - useful for group/institution tags
ctime = created time
mtime = modified time
This is to support a number of new tag features for Mahara 18.10.
Sponsored by PHBern. |
|