W
W
weredy2014-12-18 10:13:08
Database
weredy, 2014-12-18 10:13:08

What database structure to implement?

To store game information, in particular the types of items and their characteristics. Provided that there are quite a lot of hackers, for example 50.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Ivanov, 2014-12-18
@Writerim

I implemented something like the following. I don’t know how it will be with your load, but the example showed itself pretty well
products
| id | description | title | ... |
fields_product
| id | id_field ( int 255 ) | id_product ( int 255 ) | value (text) |
fields
| id | ident ( varchar 255 ) | name ( varchar 255 ) | type ( int 2 ) |
fields_option
| id | id_field ( int 255 ) | value ( varchar 255 ) | default ( int 1 ) |
The fields_more table stores data for dropdown lists and checkboxes and so on.
In the fields table, the description of the fields. Field type and so on
In the fields_product table, the relationship between products and fields is itself.
* Mistakes possible - I write from memory

S
Sergey Eremin, 2014-12-18
@Sergei_Erjemin

Through a many-to-many relationship, where, in addition to keys, the relationship table contains fields with the necessary characteristics (for example, the number of items in a bundle-set, or a link to a table with additional characteristics).

G
Georgy Pichugin, 2015-01-28
@Cresh

well, the structure of the database will be relational anyway +)
and the structure of the tables is two options
if there are few types, through three tables of directories,
and if there are many, then through one table with the keys parent & child

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question