DB를 한방에 만들어보자~
2010-12-21 11:27:05

플젝 마무리 고고씽~

CREATE DATABASE IF NOT EXISTS ?

USE ?

CREATE TABLE deliciousUser( DeliciousID VARCHAR(50) NULL, DeliciousTags TEXT NULL, PRIMARY KEY (DeliciousID))DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

CREATE TABLE facebookUser( facebookid VARCHAR(50) NULL, NAME VARCHAR(50) NULL, firstname VARCHAR(50) NULL, lastname VARCHAR(50) NULL, middlename VARCHAR(50) NULL, link VARCHAR(500) NULL, about TEXT NULL, gender CHAR(20) NULL, locale VARCHAR(500) NULL, updatedTime CHAR(50) NULL, picture VARCHAR(500) NULL, website VARCHAR(500) NULL, username VARCHAR(50) NULL, location VARCHAR(500) NULL, birthday CHAR(30) NULL, personalinfo TEXT NULL, personalinterests TEXT NULL, fancount VARCHAR(50) NULL, category VARCHAR(500) NULL, affilation VARCHAR(500) NULL, id VARCHAR(50) NULL, PRIMARY KEY (facebookid))DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

CREATE TABLE FollowingRelation( Source VARCHAR(50) NOT NULL, Target VARCHAR(50) NOT NULL, PRIMARY KEY (Target,Source))DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

CREATE TABLE Mention( MentionID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, TweetID BIGINT UNSIGNED NOT NULL, Source VARCHAR(50) NOT NULL, Target VARCHAR(50) NOT NULL, PRIMARY KEY (MentionID), UNIQUE KEY `Mention_unique` (`Source`,`Target`,`TweetID`))DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

CREATE TABLE Retweet( ReteetID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, Retweetee VARCHAR(50) NOT NULL, Retweeter VARCHAR(50) NOT NULL, TweetID BIGINT UNSIGNED NOT NULL, PRIMARY KEY (ReteetID), UNIQUE KEY `Retweet_unique` (`TweetID`))DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

CREATE TABLE Tweet( TweetID BIGINT UNSIGNED NULL AUTO_INCREMENT, TweetText VARCHAR(200) NULL, ScreenName VARCHAR(50) NOT NULL, CreatedAt CHAR(50) NULL, PRIMARY KEY (`TweetID`), UNIQUE KEY `Tweet_unique` (`TweetText`,`ScreenName`,`CreatedAt`))DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

CREATE TABLE TwitterUser( ScreenName VARCHAR(50) NULL, TwitterInnerID BIGINT UNSIGNED NULL, location VARCHAR(500) NULL, description VARCHAR(200) NULL, profileImageUrl VARCHAR(500) NULL, url VARCHAR(500) NULL, followersCount BIGINT UNSIGNED NULL, createdAt CHAR(50) NULL, latesttext VARCHAR(200) NULL, source_url VARCHAR(500) NULL, term_top_10 TEXT NULL, PRIMARY KEY (`ScreenName`))DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

CREATE TABLE unity_profiles( unity_profileID BIGINT UNSIGNED NULL AUTO_INCREMENT, TwitterScreenName VARCHAR(50) NOT NULL, facebookid VARCHAR(50) NULL, DeliciousID VARCHAR(50) NULL, PRIMARY KEY (`unity_profileID`))DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

CREATE TABLE WeightBetweenUsers( target VARCHAR(50) NOT NULL, Source VARCHAR(50) NOT NULL, termbasedsimilarity DOUBLE NULL, structuralsimilarity DOUBLE NULL, MentionScore DOUBLE NULL, retweetScore DOUBLE NULL, Intimacy DOUBLE NULL, tieStrength DOUBLE NULL, PRIMARY KEY (target,Source))DEFAULT CHARSET=utf8 COLLATE=utf\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\08_unicode_ci

ALTER TABLE FollowingRelation ADD FOREIGN KEY FollowingSource (Source) REFERENCES TwitterUser(ScreenName)

ALTER TABLE FollowingRelation ADD FOREIGN KEY R_3 (Target) REFERENCES TwitterUser(ScreenName)

ALTER TABLE Mention ADD FOREIGN KEY R_16 (TweetID) REFERENCES Tweet(TweetID)

ALTER TABLE Mention ADD FOREIGN KEY R_17 (Source) REFERENCES TwitterUser(ScreenName)

ALTER TABLE Mention ADD FOREIGN KEY R_25 (Target) REFERENCES TwitterUser(ScreenName)

ALTER TABLE Retweet ADD FOREIGN KEY R_10 (Retweeter) REFERENCES TwitterUser(ScreenName)

ALTER TABLE Retweet ADD FOREIGN KEY R_15 (TweetID) REFERENCES Tweet(TweetID)

ALTER TABLE Retweet ADD FOREIGN KEY R_26 (Retweetee) REFERENCES TwitterUser(ScreenName)

ALTER TABLE Tweet ADD FOREIGN KEY R_1 (ScreenName) REFERENCES TwitterUser(ScreenName)

ALTER TABLE unity_profiles ADD FOREIGN KEY R_22 (TwitterScreenName) REFERENCES TwitterUser(ScreenName)

ALTER TABLE unity_profiles ADD FOREIGN KEY R_23 (facebookid) REFERENCES facebookUser(facebookid)

ALTER TABLE unity_profiles ADD FOREIGN KEY R_24 (DeliciousID) REFERENCES deliciousUser(DeliciousID)

ALTER TABLE WeightBetweenUsers ADD FOREIGN KEY R_19 (target) REFERENCES TwitterUser(ScreenName)

ALTER TABLE WeightBetweenUsers ADD FOREIGN KEY R_20 (Source) REFERENCES TwitterUser(ScreenName)

붙어 넣으면 돌아가는 ㅋㅋ

▼ more
수정중~~~~
2010-12-21 00:34:22

ㅁㄴㅇㄹ

▼ more
통합 SNS 정보 작성
2010-12-20 17:23:37

1. 구글 소셜은?

FacebookID, DeliciousID 가능..

고유번호 혹은 ID로 넘어온다.

URL : http://socialgraph.apis.google.com/lookup?q=http://www.twitter.com/{0}&fme=1&edi=1&edo=1&pretty=1&jme=1

2. ID나 고유 번호로 Facebook, Delicious 정보를 얻을 수 있는가?

Facebook 정보 얻기 :

- https://graph.facebook.com/[ScreenName]?access_token=[access_Token]

- Error 메세지..

{

"error": {

"type": "OAuthException",

"message": "(#803) Some of the aliases you requested do not exist: sephiroce"

}

}

Delicious 정보 얻기 :

- http://feeds.delicious.com/v2/json/dheydon?count=100

- "t":[ 에서 부터 "],"dt": 까지 를 정규식으로 가져온다.

split을 해서 하나하나를 그냥 ,로 저장...

- Error 메세지.. 아무 것도 안온다.

3. 가공해서 사용

FOAF

- 가공 :

- DB에 있는 것을 이 양식으로 가공해서 보여 줄 수 있는 xml을 웹 서버를 띄워서 보여줄 수 있도록 해야한다.

응희형 UI

- 바로 DB : Unity_Profiles에서 찾는다. => Join 으로 나중에 내가 바꾼다.

▼ more
논문 마무리 작업(1)
2010-12-20 14:38:14

1. 리뷰 해주신 것 정리 및 전송

2. 소스 리팩토링은 선택.

▼ more