I was trying to do research on Twitter’s use of hashtags, as well as Flickr’s. However, all I found were support articles for people to place them in their posts, not the actual development side of how to store it.
I know the # will be used to “scrape” it out of a post and store it in a table if it hadn’t already been entered, but I was curious of that table was one BIG table - or segmented into categories such as “Comments”, “Tags” (for a profile or YouTube video even). Then I know they probably have a relational table that binds the hashtag one to whatever content was posted.
Does anyone know of a data model that coinsides with best practices? I just want to make sure I do it right.
Thanks in advance! Feel free to ask me other questions if I hadn’t really described it well.
There are database architecture efficiency standards called database normalization. I would advise you to take a read through these. Don’t think you need to follow every one strictly, but they’re good to keep back-pocket for situations like this where you’re trying to decide on a data structure.
Some of the database guys here might disagree with me, but I as long as each hashtag entry had the same fields for storage, I’d probably store them in a single table. If a comment hashtag differed in data fields than a tag hashtag, then it would make sense to create separate tables for them with the appropriate fields.
Very good to know. I am a designer for sure. This stuff I am trying to teach myself but all of this is very insightful. Do you recommend any courses or books that delve into those concepts? Like the use of the columns to make up the Primary key, or just using the hashtag as its PK for the hashtag table.