Category "database-design"

How to join these tables with columns that don't always match?

I have 2 tables: google_analytics and marketing_costs. How can I join these 2 columns (google_analytics['source'] with marketing['medium']) even tho they don't

How can I view the .edmx diagram on visual studio for Mac?

I want to view the edmx diagram like below an example of how it is viewed on windows visual studio I have tried looking at Microsofts documentations regarding

How can I view the .edmx diagram on visual studio for Mac?

I want to view the edmx diagram like below an example of how it is viewed on windows visual studio I have tried looking at Microsofts documentations regarding

MySQL/PHP - Web Based Game -User specific inventory table or 1 giant table? Another option?

So im making a web based game similar to Torn City, where there could potentially be millions of users. My issue is regarding user inventories. I started out cr

Database to check whether a path/ url is present

I have an application where it can have multiple thousands of urls. Let's assume the url paths are of the form, /app/v1/test1 /app/v2/test2 I want to store thes

Best practices on primary key, auto-increment, and UUID in RDBMs and SQL databases

We're designing a table for user entity. The only non-trivial requirement is that there should be a permanent URL to the user entity (for example their profile)

MySQL: Database design for procedure flow

It's something like knowledge-based system. For example: When a user go to first page, let's call it "How Can I Help You With?" There will be 4 options: In ca

Database relationship between a match and its players

I'm trying to design a database that would save matches and players in a 3v3 game. So far my models look like this : class Player(models.Model): user = mode

Is it good practice to have multiple keyspaces in Cassandra?

I've Cassandra configured on Amazon EC2 having 3 nodes(instances) in single cluster. Now what I want to do is give some space on Cassandra to my clients by crea

How can I implement a chat schema with @manyToMany using Amplify GraphQL with non private/public auth rules?

I was trying to implement a chat feature that has three models; message, user and conversation. A user can have many conversations, a conversation can have many

One-To-Many join table to avoid nullable columns [closed]

I'M wondering myself whether am I the first programmer struggling with this problem, but i can't find anything in SO about this. Point of my

How to store sets of objects that have occurred together during events?

I'm looking for an efficient way of storing sets of objects that have occurred together during events, in such a way that I can generate aggregate stats on them

How to organize variable IDs that depend on each other in MySQL

I'm creating a database for all the Magic the Gathering cards... The card table looks like this: cardID name text rarityID colorID editionID other colu

How to store tree structure in sql?

Here is my schema using sqlite, I am not sure if this is a good way to create tree structure in sql as I have to traverse many time to obtain the entire tree, a

Is there a multivalued field type available in PostgreSQL?

I want to know if it is possible to store multiple values in a field in PostgreSQL. I have a table called Token with the columns id, text and category. categor

Database design, variable number of columns [closed]

I have a simple application in which users submit data into a table. There are currently 3 fields the user can pass values to at the moment.