java仿QQ源代码_JAVA_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > JAVA > java仿QQ源代码

java仿QQ源代码

 2013/10/31 16:12:11  DR-YangLong  程序员俱乐部  我要评论(0)
  • 摘要:一个用到SWING和socket通讯的仿QQ小项目,做的还不完善,主要的都弄了,可以拿去简单学习下。附数据库文件和源码文件。数据库使用的是oracle,脚本,用户名密码均是qq:---------------------------------------------------------ExportfileforuserQQ----CreatedbyDream.YangLongon2013-10-31,13:25:48------------------------------------
  • 标签:Java 代码 QQ
一个用到SWING和socket通讯的仿QQ小项目,做的还不完善,主要的都弄了,可以拿去简单学习下。附数据库文件和源码文件。
数据库使用的是oracle,脚本,用户名密码均是qq:
class="sql" name="code">
-------------------------------------------------------
-- Export file for user QQ                           --
-- Created by Dream.YangLong on 2013-10-31, 13:25:48 --
-------------------------------------------------------

spool QQ.log

prompt
prompt Creating table USERS
prompt ====================
prompt
create table QQ.USERS
(
  QQNUM      NUMBER(10) not null,
  QQNAME     VARCHAR2(40),
  QQPASS     VARCHAR2(40),
  QQDESC     VARCHAR2(200),
  QQSEX      NUMBER(1),
  QQBIRTHDAY DATE,
  OFPIC      BLOB,
  OLPIC      BLOB,
  MESPIC     BLOB
)
tablespace USERS
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );
alter table QQ.USERS
  add constraint PK_USERS primary key (QQNUM)
  using index 
  tablespace USERS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );

prompt
prompt Creating table FRIENDS
prompt ======================
prompt
create table QQ.FRIENDS
(
  FRIID  NUMBER(10) not null,
  QQNUM  NUMBER(10),
  FRINUM NUMBER(10)
)
tablespace USERS
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );
alter table QQ.FRIENDS
  add constraint PK_FRIENDS primary key (FRIID)
  using index 
  tablespace USERS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );
alter table QQ.FRIENDS
  add constraint FK_FRI_USER foreign key (FRINUM)
  references QQ.USERS (QQNUM);
alter table QQ.FRIENDS
  add constraint FK_FRI_USERS foreign key (QQNUM)
  references QQ.USERS (QQNUM);

prompt
prompt Creating table LOGIN_TYPE
prompt =========================
prompt
create table QQ.LOGIN_TYPE
(
  TYPEID   NUMBER(2) not null,
  TYPENAME VARCHAR2(40),
  TYPEDESC VARCHAR2(200)
)
tablespace USERS
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );
alter table QQ.LOGIN_TYPE
  add constraint PK_LOGIN_TYPE primary key (TYPEID)
  using index 
  tablespace USERS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );

prompt
prompt Creating table LOGIN
prompt ====================
prompt
create table QQ.LOGIN
(
  QQNUM   NUMBER(10),
  TYPEID  NUMBER(2),
  LOGIP   VARCHAR2(15),
  LOGTIME DATE
)
tablespace USERS
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );
alter table QQ.LOGIN
  add constraint FK_LOG_TY foreign key (TYPEID)
  references QQ.LOGIN_TYPE (TYPEID);
alter table QQ.LOGIN
  add constraint FK_LOG_USER foreign key (QQNUM)
  references QQ.USERS (QQNUM);

prompt
prompt Creating table MES
prompt ==================
prompt
create table QQ.MES
(
  QQNUM   NUMBER(10),
  FRINUM  NUMBER(10),
  MES     VARCHAR2(300),
  MESDATE DATE
)
tablespace USERS
  pctfree 10
  initrans 1
  maxtrans 255;

prompt
prompt Creating sequence SQ_FRI
prompt ========================
prompt
create sequence QQ.SQ_FRI
minvalue 1
maxvalue 999999999999999999999999999
start with 101
increment by 1
cache 20;

prompt
prompt Creating sequence SQ_QQNUM
prompt ==========================
prompt
create sequence QQ.SQ_QQNUM
minvalue 1
maxvalue 999999999999999999999999999
start with 1080
increment by 1
cache 20;

prompt
prompt Creating function FC_REGIST
prompt ===========================
prompt
CREATE OR REPLACE FUNCTION QQ.fc_regist(v_qqname VARCHAR2,v_qqpass VARCHAR2,v_qqdesc varchar2,v_qqsex NUMBER,v_qqbirthday DATE) RETURN NUMBER
IS
v_qqnum NUMBER(10);
BEGIN
  SELECT sq_qqnum.nextval INTO v_qqnum FROM dual;
  INSERT INTO USERS(qqnum,qqname,qqpass,qqdesc,QQSEX,qqbirthday) VALUES(v_qqnum,v_qqname,v_qqpass,v_qqdesc,v_qqsex,v_qqbirthday);
  RETURN v_qqnum;
  END fc_regist;
/


spool off

  • QQ.7z (244.9 KB)
  • 下载次数: 0
发表评论
用户名: 匿名