virtuoso ์ผ ์์(Ubuntu ํธ)
๋ฐฐํฌ ํ๊ฒฝ
ํ๊ฒฝ ๊ตฌ์ถ
์ค์น
$ sudo apt update
$ sudo apt install virtuoso-opensource -y
ํ๋ฉด์์ default ์ฌ์ฉ์์ default password๋ฅผ ๋ณ๊ฒฝํ๋๋๋ ์ง๋ฌธ์ ์ด๋ฒ์๋ ๋ณ๊ฒฝํ์ง ์๊ณ OKvirtuoso
์ค์น ์๋ฃ
๋ช ๋ น์ ์ถ๊ฐ
virtuoso-t
virtuoso ์์
/etc/virtuoso-opensource-6.1
์ดํ๋virtuoso์ด๋ค.ini ์์-f
๋ foreground
์์ ์ํ๋๋ ์ต์
์
๋๋ค. -d
๋๋ฒ๊ทธ ์ ๋ณด๋ฅผ ํ์ํ๋ ์ต์
$ cd /etc/virtuoso-opensource-6.1
$ sudo virtuoso-t -df
๋์ ํ์ธ
๋ธ๋ผ์ฐ์ ์์ ์ก์ธ์ค
http://<server_IP>:8890

Virtuoso Conductor ๋ก๊ทธ์ธ
Conductor
๋งํฌ ํด๋ฆญuser name
๋ฐ password
์ ์
๋ ฅํ๋ ๊ณณ์ด ์์ผ๋ฏ๋ก ๊ธฐ๋ณธ ์ฌ์ฉ์ ์ด๋ฆ, ๋น๋ฐ๋ฒํธ๋ฅผ ์
๋ ฅํ๊ณ ๋ก๊ทธ์ธ ์๋ฃ
๋ธ๋ผ์ฐ์ ์์ SPARQL ์ง์ ์ ์ถ

CUI์์ SPARQL ์ง์ ์ ์ถ
isql-vt
๋ช
๋ น์ผ๋ก SPARQL ์ฟผ๋ฆฌ๋ฅผ ์ํธ ์์ฉ์ผ๋ก ๋ด๋ณด๋ผ ์ ์์$ isql-vt 1111 dba dba
SQL> SPARQL SELECT * WHERE {?s ?p ?o};
๋ก์ปฌ SPARQL Endpoint ๊ตฌ์ถ
๋ธ๋ผ์ฐ์ ์์ RDF(Turtle) ํ์ผ ๊ฐ์ ธ์ค๊ธฐ


utf-8
์ธ์ง ํ์ธhttp://localhost:8890/TEST/
์ด๋ฆ์ผ๋ก ๊ทธ๋ํ IRI
์ ๋ก๋ ์ฌ๋ถ ํ์ธ
SPARQL ์ฟผ๋ฆฌ๋ฅผ ๋์ ธ ์ง์ ํ Graph IRI๋ฅผ ์ ๋ก๋ํ ์ ์๋์ง ํ์ธํ์ญ์์ค.
๋ธ๋ผ์ฐ์ ์์ ์ง์ ์ ์ถ ์
http://localhost:8890/TEST/
๋ฅผ ์
๋ ฅํ ๋ค์ ์ง์๋ฅผ ์
๋ ฅํ์ญ์์ค.
CUI์์ ์ง์ ์ ์ถ ์
FROM <Graph URI>
# isql-vt 1111 dba dba
SQL> SPARQL SELECT * FROM <http://localhost:8890/DAV> WHERE {?s ?p ?o};
SPARQL ์ฟผ๋ฆฌ๋ฅผ ์ฌ์ฉํ์ฌ ๋ฐ์ดํฐ ์ ๋ฐ์ดํธ
SPARQL ์ง์๋ฅผ ์ ๋ฐ์ดํธํ ์ ์๋๋ก ์ค์
ํ์ฉ ์ค์ ์ ๋ฐ์ดํธ
์ด๊ธฐ ์ํ๋ SPARQL๋ก UPDATE, INSERT, DELETE ๊ณ์ด์ ์ฒ๋ฆฌํ ์ ์์ผ๋ฉฐ ์คํ ํ์๋ ๊ถํ์ด ์๋ ๊ฒ์ผ๋ก ๊ฐ์ฃผ๋ฉ๋๋ค.
Virtuoso 42000 Error SR186:SECURITY: No permission to execute procedure DB.DBA.SPARQL_INSERT_DICT_CONTENT~~ไปฅไธ็ฅ~~
์
๋ฐ์ดํธ ์์คํ
์ ์ฒ๋ฆฌํ๋ ค๋ฉด ์
๋ฐ์ดํธ ๊ถํ์ ๋ํ ๊ถํ์ ์ค์ ํด์ผ ํฉ๋๋ค.์ด ์ค์ ์ ๋ธ๋ผ์ฐ์ ์์ ์ฝ๊ฒ ์์ฑํ ์ ์์ต๋๋ค.
edit

Account roles
์SPARQL_UPDATE
๋ฅผSelected field
(์ค๋ฅธ์ชฝ)์ผ๋ก ๊ฐ์ ธ์ค๊ธฐ
์ ๋ฐ์ดํธ ์์คํ ์ฒ๋ฆฌ๋ฅผ ์๋ํด ๋ณด์ญ์์ค.
SQL> sparql select distinct * FROM <http://localhost:8890/TEST/> where {?s ?p ?o .};
s p o
LONG VARCHAR LONG VARCHAR LONG VARCHAR
_______________________________________________________________________________
http://example.org/#green-goblin http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://xmlns.com/foaf/0.1/Person
http://example.org/#spiderman http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://xmlns.com/foaf/0.1/Person
http://example.org/#green-goblin http://www.perceive.net/schemas/relationship/enemyOf http://example.org/#spiderman
http://example.org/#spiderman http://www.perceive.net/schemas/relationship/enemyOf http://example.org/#green-goblin
http://example.org/#green-goblin http://xmlns.com/foaf/0.1/name Green Goblin
http://example.org/#spiderman http://xmlns.com/foaf/0.1/name Spiderman
http://example.org/#spiderman http://xmlns.com/foaf/0.1/name โXโuโ|โโโrโuโ{-โโโpโโโ{
SQL> SPARQL INSERT{ GRAPH <http://localhost:8890/TEST/> { <http://example.org/#spiderman> foaf:name "ๅฐ็ใใใฎไฝฟ่
"}}
T;
Done. -- 5 msec.
SQL> sparql select distinct * FROM <http://localhost:8890/TEST/> where {?s ?p ?o .};
s p o
LONG VARCHAR LONG VARCHAR LONG VARCHAR
_______________________________________________________________________________
http://example.org/#green-goblin http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://xmlns.com/foaf/0.1/Person
http://example.org/#spiderman http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://xmlns.com/foaf/0.1/Person
http://example.org/#green-goblin http://www.perceive.net/schemas/relationship/enemyOf http://example.org/#spiderman
http://example.org/#spiderman http://www.perceive.net/schemas/relationship/enemyOf http://example.org/#green-goblin
http://example.org/#green-goblin http://xmlns.com/foaf/0.1/name Green Goblin
http://example.org/#spiderman http://xmlns.com/foaf/0.1/name Spiderman
http://example.org/#spiderman http://xmlns.com/foaf/0.1/name โXโuโ|โโโrโuโ{-โโโpโโโ{
http://example.org/#spiderman http://xmlns.com/foaf/0.1/name ๅฐ็ใใใฎไฝฟ่
8 Rows. -- 1 msec.
SQL> DELETE{ GRAPH <http://localhost:8890/TEST/> { <http://example.org/#spiderman> foaf:name "ๅฐ็ใใใฎไฝฟ่
"}};
SQL> SPARQL DELETE{ GRAPH <http://localhost:8890/TEST/> { <http://example.org/#spiderman> foaf:name "ๅฐ็ใใใฎไฝฟ่
"}};
Done. -- 3 msec.
SQL> sparql select distinct * FROM <http://localhost:8890/TEST/> where {?s ?p ?o .};
s p o
LONG VARCHAR LONG VARCHAR LONG VARCHAR
_______________________________________________________________________________
http://example.org/#green-goblin http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://xmlns.com/foaf/0.1/Person
http://example.org/#spiderman http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://xmlns.com/foaf/0.1/Person
http://example.org/#green-goblin http://www.perceive.net/schemas/relationship/enemyOf http://example.org/#spiderman
http://example.org/#spiderman http://www.perceive.net/schemas/relationship/enemyOf http://example.org/#green-goblin
http://example.org/#green-goblin http://xmlns.com/foaf/0.1/name Green Goblin
http://example.org/#spiderman http://xmlns.com/foaf/0.1/name Spiderman
http://example.org/#spiderman http://xmlns.com/foaf/0.1/name โXโuโ|โโโrโuโ{-โโโpโโโ{
7 Rows. -- 1 msec.
SQL>
๋๋ ๋
์ด์ virtuoso6์์ SPARQL Endpoint๋ฅผ ๋ง๋ค๊ณ SPARQL ์กฐํ์์ SPARQL Endpoint๋ฅผ ๊ฒ์ํ๊ณ ์ญ์ ํ ์ ์์ต๋๋ค.
์ฌ์ค, ๋๋ CentOS์์virtuoso์ ๋ฒ์ 7์ ์ด๋ํ๊ณ ์ถ์์ง๋ง ์ ๊ตฌ์ถํ์ง ๋ชปํด์ ์ค๋์ ํฌ๊ธฐํ๋ค. ๊ทธ๋ฐ๋ฐ ๋ฐฉ๊ธ ํด ๋ดค๋๋ฐ ์์กฐ๋กญ๊ฒ ์ด๋ํ๊ธฐ ๋๋ฌธ์ ๊ฐ๊น์ด ์์ผ ๋ด์ ๊ทธ ์ ์ฐจ๋ฅผ ์ ๋ฆฌํ๊ณ ์ถ์๋ค.
Reference
์ด ๋ฌธ์ ์ ๊ดํ์ฌ(virtuoso ์ผ ์์(Ubuntu ํธ)), ์ฐ๋ฆฌ๋ ์ด๊ณณ์์ ๋ ๋ง์ ์๋ฃ๋ฅผ ๋ฐ๊ฒฌํ๊ณ ๋งํฌ๋ฅผ ํด๋ฆญํ์ฌ ๋ณด์๋ค https://qiita.com/Yuki-Inamoto/items/77d04832ccc266322df3ํ ์คํธ๋ฅผ ์์ ๋กญ๊ฒ ๊ณต์ ํ๊ฑฐ๋ ๋ณต์ฌํ ์ ์์ต๋๋ค.ํ์ง๋ง ์ด ๋ฌธ์์ URL์ ์ฐธ์กฐ URL๋ก ๋จ๊ฒจ ๋์ญ์์ค.
์ฐ์ํ ๊ฐ๋ฐ์ ์ฝํ
์ธ ๋ฐ๊ฒฌ์ ์ ๋
(Collection and Share based on the CC Protocol.)
์ข์ ์นํ์ด์ง ์ฆ๊ฒจ์ฐพ๊ธฐ
๊ฐ๋ฐ์ ์ฐ์ ์ฌ์ดํธ ์์ง
๊ฐ๋ฐ์๊ฐ ์์์ผ ํ ํ์ ์ฌ์ดํธ 100์ ์ถ์ฒ ์ฐ๋ฆฌ๋ ๋น์ ์ ์ํด 100๊ฐ์ ์์ฃผ ์ฌ์ฉํ๋ ๊ฐ๋ฐ์ ํ์ต ์ฌ์ดํธ๋ฅผ ์ ๋ฆฌํ์ต๋๋ค