컬럼 구조 (Columns Definition)

20개 컬럼
컬럼명 데이터 타입 Null 허용 Key 기본값 (Default) 추가 속성 (Extra) 코멘트 / 설명
id
int(11) NO - 0 - -
keyword_id
int(11) NO - NULL - -
title
varchar(500) NO - NULL - -
url
varchar(1000) NO - NULL - -
url_hash
char(32) NO - NULL - -
source
varchar(100) YES - NULL - -
published_at
datetime YES - NULL - -
raw_text
mediumtext YES - NULL - -
summary_3lines
text YES - NULL - -
importance_score
tinyint(4) YES - 3 - -
insight
text YES - NULL - -
is_mailed
tinyint(1) YES - 0 - -
created_at
timestamp YES - current_timestamp() - -
word_count
smallint(5) unsigned YES - 0 - 본문 단어수
read_count
int(10) unsigned YES - 0 - 조회수
collected_at
datetime YES - NULL - 수집 시각(=created_at 과 구분)
is_featured
tinyint(1) YES - 0 - 추천/고정 기사
tags
varchar(500) YES - NULL - 자동 태그 (콤마 구분)
keyword
varchar(100) NO - NULL - -
category
varchar(50) YES - '일반' - -

CREATE TABLE DDL

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_top_articles` AS select `a`.`id` AS `id`,`a`.`keyword_id` AS `keyword_id`,`a`.`title` AS `title`,`a`.`url` AS `url`,`a`.`url_hash` AS `url_hash`,`a`.`source` AS `source`,`a`.`published_at` AS `published_at`,`a`.`raw_text` AS `raw_text`,`a`.`summary_3lines` AS `summary_3lines`,`a`.`importance_score` AS `importance_score`,`a`.`insight` AS `insight`,`a`.`is_mailed` AS `is_mailed`,`a`.`created_at` AS `created_at`,`a`.`word_count` AS `word_count`,`a`.`read_count` AS `read_count`,`a`.`collected_at` AS `collected_at`,`a`.`is_featured` AS `is_featured`,`a`.`tags` AS `tags`,`k`.`keyword` AS `keyword`,`k`.`category` AS `category` from (`articles` `a` join `keywords` `k` on(`k`.`id` = `a`.`keyword_id`)) where `a`.`importance_score` >= 4 order by `a`.`importance_score` desc,`a`.`published_at` desc