Home > Database > Mysql Tutorial > 一张系统日志表

一张系统日志表

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:22:00
Original
1534 people have browsed it

一张系统日志表 最近考虑给我的web系统记录日志的方式。于是就搞了一张这样的表出来。先来张图。 日志表就是上面这个样子,下面的语句: [html] drop table log; /*==============================================================*/ /* Table: log */ /*==

一张系统日志表

 

            最近考虑给我的web系统记录日志的方式。于是就搞了一张这样的表出来。先来张图。

 

一张系统日志表

 

 

 

        日志表就是上面这个样子,下面的语句:

[html] 
    drop table log;  
  
/*==============================================================*/  
/* Table: log                                                   */  
/*==============================================================*/  
create table log   
(  
   SEQ                  int                            not null,  
   URL                  varchar(1024)                  not null,  
   USER_NAME            varchar(128)                   not null,  
   USER_ID              varchar(32)                    not null,  
   PARAMIN              varchar(1024)                  null,  
   ACCESS_TIME          timestamp                      not null,  
   "DESC"               varchar(512)                   null,  
   constraint PK_LOG primary key clustered (SEQ)  
);  
  
comment on table log is '记录系统操作信息';  
  
comment on column log.SEQ is '主键,自增';  
Copy after login

 

毕竟这是用户操作日志。通过url可以很好的指出用户是在干什么事情。

我见过这样的记录日志的方式:

 

一张系统日志表

 

 

 

             创建人,创建时间,修改人,修改时间应该就是要记录此表中某条记录的创建或修改。按照同样的逻辑,系统中的所有的表都要加这些个字段。O,MY GOD!

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template