数据库:便签应用案例

create database if not exists note charset =utf8 collate utf8_bin;

Use note;

2.1便签表

——编号  标题   内容   是否私密

——背景颜色    是否提醒   提醒时间

创建时间    修改时间  所属分组

create table if not exists memo(

     id int primary key auto_increment comment'标签编号',

     title varchar (30) comment'标签标题',

     content varchar(100) not null comment'标签内容',

     is_select bit(1)  comment'是否私密,0非私密,1私密',

    background enum('红','黄','蓝','绿')comment '背景颜色',

     is_call enum('是','否') comment'是否提醒',

     call_time datetime comment'提醒时间',

     create_time datetime comment'创建时间',

     modify_time timestamp comment '修改时间',

    Groups  int comment'分组编号');

 

2.2便签组模型

——便签组

  ——编号   组名称    创建时间    修改时间

create table if not exists memo_group(

    id int primary key auto_increment comment'分组编号',

    group_name varchar(10) not null comment'分组名称',

     create_time datetime comment'创建时间',

     modify_time timestamp comment '修改时间'),

Foreign key id references memo(groups)

);

 

2.3便签分享模型

便签分享

  ——编号     标签编号    分享备注   分享时间

 

create table if not exists memo_share(

    id int primary key auto_increment comment'分享编号',

    memo_id  int  not null comment'标签编号',

    share_mark varchar(30) comment'分享备注',

    Share_time timestamp comment '分享时间',

Foreign key  memo_id references memo(id)

);

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值