SO, what RDF database do I use for the situation with the product attribute, did I initially think about using EAV?

I have a similar problem as described in How to create a product table for many types of products, where each product has many parameters

I am convinced that I am now using RDF. just because of one of the comments made by Bill Karwin in response to the above question

but i already have the database in mysql and the code in php.

1) Which RDF database should I use?

2) Do I connect the approach? that i have class table inheritance in mysql database and only weird product attributes in RDF? I don’t think I should move everything to the RDF database, as these are just products and a wide range of possible attributes and values ​​that give me a problem.

3) what php resources, articles that I should look at will help me better in creating this?

4) a large number of articles or resources that will help me better understand RDF in the context of the above-described task of creating something that is better to store all kinds of attributes and values ​​of products will be greatly appreciated. I try to work better when I have a conceptual understanding of what is happening.

Keep in mind that I am completely new to this, and my programming knowledge and databases are average at best.

+3
3

, RDF - , , RDBMS, . RDF .

, (, ..).

, , , 0-1.

, .

.

create table product (
  product_id int primary key,
  // core data here
)

create table product_meta (
  product_id int,
  property_id int,
  value varchar(255)
)

create table properties (
  property_id  int primary key,
  namespace varchar(255),
  local_name varchar(255)
)

, -:

create table product_meta_reference (
  product_id int,
  property_id int, 
  reference int
)

.

, , , :

create table user_meta (
  user_id int,
  property_id int,
  value varchar(255)
)

, , .

+2

1 3). PHP MySQL, ARC 2 ( : , , ) RAP, , MySql

ARC 2

2) , , RDF . , RDF SPARQL, .

+1

RDF PHP, , , , , , .

RDBMS, RDF, :

  • use one sequence for all surrogate identifiers, this way you get unique identifiers, which is a requirement for RDF
  • use base tables for required properties and extension tables with subject + property + values ​​columns for additional data

You do not need to use the RDF engine to store your data in RDF format.

Compared to EAV, RDF is a more expressive paradigm for modeling dynamic data.

0
source

Source: https://habr.com/ru/post/1740850/


All Articles