What method should i use to store high ammount of data on SQL?

50
October 25, 2019, at 3:50 PM
I want to store game Inventory information into sql.

The data I want to store is:

  • Slot ID (from 0 to 608);

  • Item ID (from 0 to 66000);

How should I store this information without struggling?

I can think about 2 ideas:

  • ... about " ; " separators, and everything goes into 1 column

  • Or new Table for each user (UserID+Inv) where I can store like this:

Slot ID   | Item ID
000       | 3001
001       | 0
002       | 65001

This being said, I still want to know what's the method I should really use. I get that data using C#, and I will play around with it using PHP.

Answer 1

The third method is probably the best method . . . a single table with three columns:

User  Id  |Slot ID   | Item ID
    XXX   | 000       | 3001
    XXX   | 001       | 0
    XXX   | 002       | 65001

That is, the user id is stored in the table, with a separate row for each combination.

READ ALSO
Derive new column of weekly unique users alongside daily unique users in MySQL

Derive new column of weekly unique users alongside daily unique users in MySQL

I have a table where I have daily unique users in the month of JanuaryI am trying to derive a new column (in the same table) that shows total weekly unique users

27
Laravel PDOException(code: 0) failed loading cafile stream

Laravel PDOException(code: 0) failed loading cafile stream

I get this error when I try to perform a DB operation from the public siteThis is from a server that connects remotely to a dedicated database server

34
The cursor of pymysql fail to exercute SQL language

The cursor of pymysql fail to exercute SQL language

I would like to use pymysql to update the data in mysql databaseBut I don't know what's going wrong with my code

42
escape ticks in golang sql statement [duplicate]

escape ticks in golang sql statement [duplicate]

This question already has an answer here:

24