U
U
user.2019-01-11 14:59:18
Database design
user., 2019-01-11 14:59:18

What is the easiest way to store this data in a relational database (SqlLite)?

Good afternoon,
There is a fairly large amount of data in which several values ​​\u200b\u200bare often separated by commas, ideally, each value should correspond to a column, writing them separated by commas in one column in a relational database is very bad practice ... BUT what if these values ​​can be from 1 to 100?
How to solve this problem?
Below is an example of data (you need to save everything that comes after the colon after cve, prod, published_datetime to the database):

CVE : CVE-2018-0001
prod : cpe:/o:juniper:junos:12.1x46:d10; cpe:/o:juniper:junos:12.1x46:d15; cpe:/o:juniper:junos:12.1x46:d20; cpe:/o:juniper:junos:12.1x46:d25; cpe:/o:juniper:junos:12.1x46:d30; cpe:/o:juniper:junos:12.1x46:d35; cpe:/o:juniper:junos:12.1x46:d40; cpe:/o:juniper:junos:12.1x46:d45; cpe:/o:juniper:junos:12.1x46:d50; cpe:/o:juniper:junos:12.1x46:d55; cpe:/o:juniper:junos:12.1x46:d60; cpe:/o:juniper:junos:12.1x46:d65; cpe:/o:juniper:junos:12.3; cpe:/o:juniper:junos:12.3:r1; cpe:/o:juniper:junos:12.3:r10; cpe:/o:juniper:junos:12.3:r2; cpe:/o:juniper:junos:12.3:r3; cpe:/o:juniper:junos:12.3:r4; cpe:/o:juniper:junos:12.3:r5; cpe:/o:juniper:junos:12.3:r6; cpe:/o:juniper:junos:12.3:r7; cpe:/o:juniper:junos:12.3:r8; cpe:/o:juniper:junos:12.3:r9; cpe:/o:juniper:junos:12.3x48:d10; cpe:/o:juniper:junos:12.3x48:d15; cpe:/o:juniper:junos:12.3x48:d20; cpe:/o:juniper:junos:12.3x48:d25; cpe:/o:juniper:junos:12.3x48:d30; cpe:/o:juniper:junos:14.1; cpe:/o:juniper:junos:14.1:r1; cpe:/o:juniper:junos:14.1:r2; cpe:/o:juniper:junos:14.1:r3; cpe:/o:juniper:junos:14.1:r4; cpe:/o:juniper:junos:14.1:r8; cpe:/o:juniper:junos:14.1:r9; cpe:/o:juniper:junos:14.1x53; cpe:/o:juniper:junos:14.1x53:d10; cpe:/o:juniper:junos:14.1x53:d15; cpe:/o:juniper:junos:14.1x53:d16; cpe:/o:juniper:junos:14.1x53:d25; cpe:/o:juniper:junos:14.1x53:d26; cpe:/o:juniper:junos:14.1x53:d27; cpe:/o:juniper:junos:14.1x53:d35; cpe:/o:juniper:junos:14.1x53:d50; cpe:/o:juniper:junos:14.2:r1; cpe:/o:juniper:junos:14.2:r2; cpe:/o:juniper:junos:14.2:r3; cpe:/o:juniper:junos:14.2:r4; cpe:/o:juniper:junos:14.2:r5; cpe:/o:juniper:junos:14.2:r7; cpe:/o:juniper:junos:14.2:r8; cpe:/o:juniper:junos:15.1:r1; cpe:/o:juniper:junos:15.1:r2; cpe:/o:juniper:junos:15.1x49:d10; cpe:/o:juniper:junos:15.1x49:d20; cpe:/o:juniper:junos:15.1x49:d30; cpe:/o:juniper:junos:15.1x53:d20; cpe:/o:juniper:junos:15.1x53:d21; cpe:/o:juniper:junos:15.1x53:d25; cpe:/o:juniper:junos:15.1x53:d30; cpe:/o:juniper:junos:15.1x53:d32; cpe:/o:juniper:junos:15.1x53:d33; cpe:/o:juniper:junos:15.1x53:d34; cpe:/o:juniper:junos:15.1x53:d60; cpe:/o:juniper:junos:15.1x53:d61; cpe:/o:juniper:junos:15.1x53:d62; cpe:/o:juniper:junos:15.1x53:d63
published_datetime : 2018-01-10T17:29:00.930-05:00
last_modified_datetime : 2018-02-22T21:29:02.140-05:00
score : 7.5
access_vector : NETWORK
access_complexity : LOW
authentication : NONE
confidentiality_impact : PARTIAL
integrity_impact : PARTIAL
availability_impact : PARTIAL
generated_on_datetime : 2018-01-30T17:21:59.327-05:00
cwe_id : CWE-416
referenc : BID http://www.securityfocus.com/bid/103092; SECTRACK http://www.securitytracker.com/id/1040180; CONFIRM https://kb.juniper.net/JSA10828
summary : A remote, unauthenticated attacker may be able to execute code by exploiting a use-after-free defect found in older versions of PHP through injection of crafted data via specific PHP URLs within the context of the J-Web process. Affected releases are Juniper Networks Junos OS: 12.1X46 versions prior to 12.1X46-D67; 12.3 versions prior to 12.3R12-S5; 12.3X48 versions prior to 12.3X48-D35; 14.1 versions prior to 14.1R8-S5, 14.1R9; 14.1X53 versions prior to 14.1X53-D44, 14.1X53-D50; 14.2 versions prior to 14.2R7-S7, 14.2R8; 15.1 versions prior to 15.1R3; 15.1X49 versions prior to 15.1X49-D30; 15.1X53 versions prior to 15.1X53-D70.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Kuznetsov, 2019-01-17
@max-kuznetsov

In relational model it is necessary to do some tables. One - for the root entity. And one for each set of values; the records of these tables must refer to the root table. Those. in your case there will be a CVE root table and two additional prod and referenc referring to CVE.id.
summary, as I understand it, contains just text. But if you need to parse this value, there will be a third additional table.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question