Tải bản đầy đủ

Tìm hiểu CSDL Neo 4J

CREATE
//PHUONG TIEN TRUYEN THONG
//PHIM
(canhdong:Movie:Media {Ten:'Canh Dong Hoang Vang', NoiDung:'Tinh yeu doi lua.', genre:'TinhCam', ThoiGian:103, Giai:'2 Oscars'}),
(canhsat:Movie:Media {Ten:'Canh Sat Hinh Su', NoiDung:'Cuoc chien chong ma tuy', genre:'HinhSu', ThoiGian:108}),
(tuyquyen:Movie:Media {Ten:'Tuy Quyen', genre:'VoThuat', ThoiGian:130, Giai:'1 Oscar'}),
(thanhlong:Movie:Media {Ten:'Thanh Long', genre:'Hai', ThoiGian:114, Giai:'1 Oscar'}),
(tieungao:Movie:Media {Ten:'Tieu Ngao Giang Ho', genre:'KiemHiep', ThoiGian:101, Giai:'2 Oscars'}),
(luongsonba:Movie:Media {Ten:'Luong Son Ba Truc Anh Dai', genre:'LangMan', ThoiGian:131, Giai:'1 Oscar'}),
(locdinhky:Movie:Media {Ten:'Loc Dinh Ky', genre:'HanhDong', ThoiGian:143}),
//CHUONG TRINH TIVI
(banbe:TV_Show:Media {Ten:'Ban Be Cua Toi', ThoiGianTap:'22 min', SoTap:'10', genre:'Hai'}),
(vanphong:TV_Show:Media {Ten:'Van Phong Trong', ThoiGianTap:'22 min', SoTap:'9', genre:'KhoaHoc'}),
(cuocsong:TV_Show:Media {Ten:'Cuoc Song Tren Sao Hoa', ThoiGianTap:'60 min', SoTap:'5', genre:'VienTuong'}),
//TEN
(duong:User {name:'Duong', Ho:'Hoang', Tuoi:24, NoiSinh:'Thanh Hoa'}),
(cong:User {name:'Cong', Ho:'Pham', Tuoi:36, NoiSinh:'Thanh Hoa'}),
(thuan:User {name:'Thuan', Ho:'Le', Tuoi:15, NoiSinh:'Ha Noi'}),
(nam:User {name:'Nam', Ho:'Le', Tuoi:25, NoiSinh:'Ho Chi Minh'}),
(thanh:User {name:'Thanh', Ho:'Tran',Tuoi:35, NoiSinh:'Thanh Hoa'}),
(ha:User {name:'Ha', Ho:'Pham', Tuoi:34, NoiSinh:'Ha Noi'}),

(hung:User {name:'Hung', Ho:'Hoang', Tuoi:22}),


(tham:User {name:'Tham', Ho:'Le', Tuoi:17, NoiSinh:'Thanh Hoa'}),
(tam:User {name:'Tam', Ho:'Tran', Tuoi:42, NoiSinh:'Thanh Hoa'}),
//QUEN BIET
(duong)-[:BIET]->(thanh),
(duong)-[:BIET]->(ha),
(cong)-[:BIET]->(tham),
(cong)-[:BIET]->(duong),
(thuan)-[:BIET]->(cong),
(thuan)-[:BIET]->(nam),
(nam)-[:BIET]->(cong),
(thanh)-[:BIET]->(nam),
(thanh)-[:BIET]->(cong),
(thanh)-[:BIET]->(ha),
(hung)-[:BIET]->(thanh),
(hung)-[:BIET]->(tham),
(tham)-[:BIET]->(tam),
(tham)-[:BIET]->(duong),
//BI CHAN
(duong)-[:BICHAN {LyDo:'Qua Nhieu Thu Rac'}]->(hung),
(duong)-[:BICHAN]->(nam),
(cong)-[:BICHAN]->(thuan),
(nam)-[:BICHAN]->(ha),


(hung)-[:BICHAN {LyDo:'Qua Nhieu Thu Rac'}]->(ha),
//DA XEM
(duong)-[:DAXEM {Ngay:'2015-5-01'}]->(canhsat),
(duong)-[:DAXEM {Ngay:'2015-2-05'}]->(canhdong),
(cong)-[:DAXEM {Ngay:'2015-10-10'}]->(canhsat),
(cong)-[:DAXEM {Ngay:'2015-1-20'}]->(canhdong),
(cong)-[:DAXEM {Ngay:'2015-10-25'}]->(tieungao),
(cong)-[:DAXEM {Ngay:'2015-2-01'}]->(thanhlong),
(cong)-[:DAXEM {Ngay:'2015-2-15'}]->(locdinhky),
(cong)-[:DAXEM {Ngay:'2015-2-01'}]->(tuyquyen),
(cong)-[:DAXEM {Ngay:'2015-2-15'}]->(luongsonba),
(thuan)-[:DAXEM {Ngay:'2015-05-08'}]->(tieungao),
(thuan)-[:DAXEM {Ngay:'2015-09-26'}]->(canhsat),


(thuan)-[:DAXEM {Ngay:'2015-11-29'}]->(canhdong),
(nam)-[:DAXEM {Ngay:'2015-2-10'}]->(tieungao),
(nam)-[:DAXEM {Ngay:'2015-2-11'}]->(thanhlong),
(nam)-[:DAXEM {Ngay:'2015-2-12'}]->(canhdong),
(nam)-[:DAXEM {Ngay:'2015-2-29'}]->(tuyquyen),
(thanh)-[:DAXEM {Ngay:'2015-06-14'}]->(luongsonba),
(ha)-[:DAXEM {Ngay:'2015-07-11'}]->(luongsonba),
(ha)-[:DAXEM {Ngay:'2015-08-18'}]->(locdinhky),
(tam)-[:DAXEM {Ngay:'2015-08-19'}]->(locdinhky),


//DANG KY
(duong)-[:DANGKY]->(banbe),
(duong)-[:DANGKY]->(vanphong),
(nam)-[:DANGKY]->(banbe),
(thuan)-[:DANGKY]->(banbe),
(thuan)-[:DANGKY]->(cuocsong),
(ha)-[:DANGKY]->(vanphong),
(ha)-[:DANGKY]->(cuocsong),
(thanh)-[:DANGKY]->(vanphong),
(tam)-[:DANGKY]->(vanphong),
//BINH LUAN
(duong)-[:BINHLUAN {Ngay:'2015-2-05', binhluan:'Phim qua ro. Khong thich xem ty nao'}]->(canhdong),
(cong)-[:BINHLUAN {Ngay:'2015-10-10', binhluan:'Hay. Thuc te'}]->(canhsat),
(cong)-[:BINHLUAN {Ngay:'2015-1-20', binhluan:'Toi thich xem. Hay'}]->(canhdong),
(cong)-[:BINHLUAN {Ngay:'2015-2-01', binhluan:'Noi dung hay!'}]->(thanhlong),
(thuan)-[:BINHLUAN {Ngay:'2015-05-08', binhluan:'Phim tuyet voi, cam on Dao dien'}]->(tieungao),
(thuan)-[:BINHLUAN {Ngay:'2015-09-26', binhluan:'Dung thuc te dang dien ra'}]->(canhsat),
(thuan)-[:BINHLUAN {Ngay:'2015-2-05', binhluan:'Y nghia'}]->(cuocsong),
(nam)-[:BINHLUAN {Ngay:'2015-2-11', binhluan:'Hay'}]->(thanhlong),
(nam)-[:BINHLUAN {Ngay:'2015-2-12', binhluan:'Noi dung hay'}]->(canhdong),
(thanh)-[:BINHLUAN {Ngay:'2015-06-14', binhluan:'Phim hay'}]->(luongsonba),
(ha)-[:BINHLUAN {Ngay:'2015-08-18', binhluan:'Phim ket thuc khong hay.'}]->(locdinhky),


//DANH GIA
(duong)-[:DANHGIA {Ngay:'2015-2-05', Diem:10}]->(canhdong),
(duong)-[:DANHGIA {Ngay:'2015-2-01', Diem:9}]->(canhsat),
(cong)-[:DANHGIA {Ngay:'2015-1-20', Diem:6}]->(canhdong),
(cong)-[:DANHGIA {Ngay:'2015-1-25', Diem:8}]->(tieungao),
(thuan)-[:DANHGIA {Ngay:'2015-1-29', Diem:7}]->(banbe),
(thuan)-[:DANHGIA {Ngay:'2015-09-27', Diem:6}]->(canhsat),
(thuan)-[:DANHGIA {Ngay:'2015-1-29', Diem:8}]->(canhdong),
(nam)-[:DANHGIA {Ngay:'2015-2-10', Diem:5}]->(tieungao),
(nam)-[:DANHGIA {Ngay:'2015-2-10', Diem:4}]->(banbe),
(nam)-[:DANHGIA {Ngay:'2015-2-12', Diem:7}]->(canhdong),
(thanh)-[:DANHGIA {Ngay:'2015-06-14', Diem:9}]->(luongsonba),
(ha)-[:DANHGIA {Ngay:'2015-08-18', Diem:8}]->(locdinhky)



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay

×