韓順平老師SNS數據庫表 http://blog.csdn.net/zxman660/article/details/7786994
- id int(11) not null primary key auto_increment,
- email varchar (128) unique not null,
- name varchar (128) not null,
- pwd varchar (128) not null,
- photo varchar (128) default 'default.gif',
- sex varchar (16) ,
- homePro int(11) ,
- homeCity int(11) ,
- birth date ,
- tel varchar (32) ,
- mobile varchar(32) ,
- oicq varchar (32) ,
- msn varchar (128) ,
- website varchar (128) ,
- techSch int(11) ,
- techSchYear int(11) ,
- juniorSch int(11) ,
- juniorYear int(11) ,
- primarySch int(11) ,
- primaryYear int(11) ,
- interest varchar (256) ,
- music varchar (256) ,
- movie varchar (256) ,
- game varchar (256) ,
- cartoon varchar(256) ,
- sport varchar (256) ,
- book varchar (256) ,
- assn varchar (256) ,
- visited int default 0 ,
- doing varchar (128) ,
- online tinyint default 0,
- registerDate datetime ,
- loginDate datetime ,
- level tinyint default 1,
- locked tinyint default 0,
- foreign key (homePro) references province(id),
- foreign key (homeCity) references city(id),
- foreign key (techSch) references techschool(id),
- foreign key (juniorSch) references junior(id),
- foreign key (primarySch) references primarySchool(id)
- create table userNet(
- id int not null primary key auto_increment,
- userId int ,
- name varchar (64) not null,
- isPrimary tinyint default 1,
- foreign key (userId) references users(id)
- id int not null primary key auto_increment,
- userId int,
- universityId int,
- uniYear int,
- userType varchar(32),
- college varchar(128),
- drom varchar(128),
- foreign key(userId) references users(id),
- foreign key(universityId) references university(id))
-
- create table userCom(
- uc_id bigint primary key identity,
- uc_userId bigint ,
- uc_name varchar (64) ,
- uc_describe varchar (256) ,
- uc_trade int ,
- uc_tradeInfo int ,
- uc_job int ,
- uc_jobInfo int ,
- uc_date varchar (16)
-
- create table friend(
- f_id bigint primary key identity,
- f_hostId bigint ,
- f_friendId bigint ,
- f_type int default 1,
- f_desc varchar(256)
-
- create table friendApply(
- fa_id bigint primary key identity,
- fa_sendId bigint ,
- fa_getId bigint ,
- fa_info varchar (256)
-
-
- create table news(
- n_id bigint primary key identity,
- n_title varchar (512) ,
- n_hostId bigint ,
- n_content varchar (512) ,
- n_type int ,
- n_date datetime default getdate()
- )
- create table newsRelation(
- nr_id bigint primary key identity,
- nr_newsId bigint ,
- nr_friendId bigint ,
- nr_status int default 1
- )
-
-
-
-
-
- drop table gossip
- create table gossip(
- g_id bigint primary key identity,
- g_sendId bigint ,
- g_getId bigint ,
- g_content varchar (640) ,
- g_indate datetime default getdate()
-
- create table visitor(
- v_id bigint primary key identity,
- v_hostId bigint ,
- v_visitorId bigint ,
- v_date datetime default getdate()
-
-
- le_id bigint primary key identity,
- le_sendID bigint ,
- le_getID bigint ,
- le_title varchar (64) ,
- le_content varchar (2048) ,
- le_indate datetime default getdate(),
- le_readed int default 1
-
-
- al_id bigint primary key identity,
- al_hostId bigint ,
- al_name varchar (64) ,
- al_photo varchar (64) default 'main.jpg',
- al_description varchar (256) ,
- al_indate datetime default getdate(),
- al_update datetime default getdate()
-
-
-
-
-
- p_id bigint primary key identity,
- p_photo varchar (64) ,
- p_albumId bigint ,
- p_description varchar (256) ,
- p_read int default 0,
- p_indate datetime default getdate()
-
- create table photoComment(
- pc_id bigint primary key identity,
- pc_photoId bigint ,
- pc_authorId bigint ,
- pc_content varchar (256) ,
- pc_indate datetime default getdate()
- create table article(
- a_id bigint primary key identity,
- a_authorId bigint ,
- a_title varchar (64) ,
- a_content varchar (2048) ,
- a_indate datetime default getdate(),
- a_read int default 0
-
- ac_id bigint primary key identity,
- ac_articleId bigint ,
- ac_authorId bigint ,
- ac_content varchar (256) ,
- ac_indate datetime default getdate()
-
-
- create table coutry(
- co_id int primary key identity,
- co_name varchar (32)
-
- create table province(
- pro_id int primary key identity,
- pro_name varchar (32) ,
- pro_coutryId int
-
- create table city(
- ci_id int primary key identity,
- ci_name varchar (32) ,
- ci_proId int
- create table town(
- to_id int primary key identity,
- to_name varchar (32) ,
- to_cityId int
-
- id int not null primary key auto_increment,
- name varchar(64) not null,
- countryId int,
- proId int,
- foreign key (countryId) references country(id),
- foreign key (proId) references province(id)
-
- id int not null primary key auto_increment,
- name varchar(64) not null,
- cityId int,
- townId int,
- foreign key (cityId) references city(id),
- foreign key (townId) references town(id)
-
- ar_id int primary key identity,
- ar_name varchar (64) ,
- ar_cityId int ,
- ar_townId int
-
- ju_id int primary key identity,
- ju_name varchar (64) ,
- ju_cityId int ,
- ju_townId int
-
- e_id int primary key identity,
- e_name varchar (16)
- lp_id int primary key identity,
- lp_name varchar (32)
-
-
- lc_id int primary key identity,
- lc_name varchar (32) ,
- lc_lpId int
-
- create table trade(
- tr_id int primary key identity,
- tr_name varchar (32)
- )
-
- ti_id int primary key identity,
- ti_name varchar (32) ,
- ti_traId int
-
- j_id int primary key identity,
- j_name varchar (32)
- )
-
- ji_id int primary key identity,
- ji_name varchar (34) ,
- ji_jobId int
-
-
- cteate table link(
- l_id int primary key identity,
- l_name varchar (64),
- l_imgName varchar (64),
- l_url varchar (128)
-
- cteate table adv(
- ad_id int primary key identity,
- ad_name varchar (64) ,
- ad_imgName varchar (64) ,
- ad_url varchar (128)
歡迎關注本站公眾號,獲取更多信息