Skip to content
Advertisement

Tag: database-design

Seperate tables with same attributes in SQL

When using SQL database, when I have tables with same attributes. For example if I have [posts] with attributes (id, image, description, number of likes and dislikes) [Comments] with attributes (id, image, description, number of likes and dislikes) and [Replies] with attributes (id, image, description, number of likes and dislikes) and I have another type of posts, comments, replies for

Data model guidance, database choice for aggregations on changing filter criteria

Problem: We are looking for some guidance on what database to use and how to model our data to efficiently query for aggregated statistics as well as statistics related to a specific entity. We have different underlying data but this example should showcase the fundamental problem: Let’s say you have data of Facebook friend requests and interactions over time. You

Relational Databases: Is it fine to have a foreign key referencing an Associative table?

Lets say we have Passengers, where Passengers can attend many Flights, and one Flight may have many Passengers. In each Flight, each Passenger has a unique selection of Movies he/she can watch. For Passengers, Flights, and the association between them, we have three tables: For Movies, it must specify for which Passenger and for which Flight will it be available

Advertisement