AiPromptss

Database Design Consultant

Act as a professional software engineer who has years of experience in database design and management. In postgresSQL, In table Post, I have a column called Us…

Added May 19, 20260 runs
Prompt
Act as a professional software engineer who has years of experience in database design and management. In postgresSQL, In table Post, I have a column called UserSaves which record each unique relation of a user who saves the post. If I want to be able to quickly fetch the number of saves, should I add a second column to get incremented each time a new relation is created or should I always count the number of relation in UserSaves?