Integrated Curation Data Model: Storyline Data

Digerati
Tutor (토론 | 기여) 사용자의 2019년 5월 21일 (화) 08:50 판

(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
이동: 둘러보기, 검색

Database Schema

※ Storyline Data는 Factcual Data와 다른 이름을 갖는 독립적 Data Set입니다. Storyline Data의 Edge Table은 Node Table로부터 자동 변환합니다.

Node Table Schema

create table yyyData (
	id nvarchar(40) not null,
	class nvarchar(16) null,
	upperNode nvarchar(40) null,
	nextNode nvarchar(40) null,
	label nvarchar(80) null,
	infoUrl nvarchar(256) null,
	iconUrl nvarchar(256) null,
	primary key(id)
)

Edge Table Schema

create table yyyLinks (
	source  nvarchar(40)  not null,
	target  nvarchar(40) not null,
	relation nvarchar(40) not null,
	attribute nvarchar(40) null,
	primary key (source, target, relation )
)

Object Properties

* hasTopic
* hasEpisode
* hasFactualComponent
* isPreviousInSequence
* isNextInSequence

SQL Script

Insert Storyline Node Data

insert into yyyData (id, class, upperNode, nextNode, label, infoUrl, iconUrl )
select id, class, upperNode, nextNode, label, infoUrl, iconUrl from yyyData$

Generate Storyline Link Data

-- hasTopic
insert into yyyLinks (source, target, relation )
select upperNode, id, 'hasTopic' from yyyData$
where class='Topic' and upperNode is Not Null 

-- hasEpisode
insert into yyyLinks (source, target, relation )
select upperNode, id, 'hasEpisode' from yyyData$
where class='Episode' and upperNode is Not Null

-- isPeviousInSequence
insert into yyyLinks (source, target, relation )
select id, nextNode, 'isPreviousInSequence' from yyyData$
where nextNode is Not Null

Data Service Tools

StoryMenu.py

Storyline.py