Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@Artemix ok i figured, i was in doubt if i should have 3rd table. what columns do i put in tag and post_tag relation?
-
tokumei21316y📌 I can help explain relational db systems in a bit, but I dont want to type it all out on mobile
-
@Artemix ok i dont understand at all, i tried to implement it.
1 post can have multiple tags.
in my posts table, i dont have any tag_id because i think i dont need it
in my tag table, i have tag_id and a label.
in my post_tag table, i have a primary key composed of tag_id from tag table and post_id from posts table.
when a user in the app adds like: music, nature, photography as a tag, where does that get added? into tag or post_tag table? if it gets added to tag table, then what do i do with post_tag? and vice versa.
is tag table supposed to add all possible tags from all posts in the app?
can you help me structure this on teamviewer so i can understand it morr clearly? -
@Artemix Can you tell me where do i insert data when a new post with tags is created?
does someone know how is devrants tagging system coded? im asking about sql code. if 1 user can create multiple posts and each post can have multiple tags, how many tables do i need to have? asking bc i need to code the same thing
rant