前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >数据库设计工具的使用(实用)

数据库设计工具的使用(实用)

作者头像
全栈程序员站长
发布2022-09-14 15:00:13
3440
发布2022-09-14 15:00:13
举报
文章被收录于专栏:全栈程序员必看

大家好,又见面了,我是你们的朋友全栈君。

使用数据设计工具,以下sql语句全部可以自动生成:

代码语言:javascript
复制
/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2017/5/27 0:57:18 */
/*==============================================================*/


drop table if exists Teacher;

drop table if exists course;

drop table if exists teach;

/*==============================================================*/
/* Table: Teacher */
/*==============================================================*/
create table Teacher ( tid int not null, teacherName varchar(20) not null, sex char(1) not null default 'm', birthday date, major varchar(30), primary key (tid) );

alter table Teacher comment '教师实体对象,存放教师信息';

/*==============================================================*/
/* Table: course */
/*==============================================================*/
create table course ( cid int not null, cname varchar(20) not null, chour int, credit numeric(2,0), primary key (cid) );

alter table course comment '课程信息';

/*==============================================================*/
/* Table: teach */
/*==============================================================*/
create table teach ( tid int not null, cid int not null, starttime datetime, primary key (tid, cid) );

alter table teach add constraint FK_teach foreign key (tid) references Teacher (tid) on delete restrict on update restrict;

alter table teach add constraint FK_teach2 foreign key (cid) references course (cid) on delete restrict on update restrict;

只要建立实体,添加实体间属性,实体间关系表也可以自动生成。如下图:

这里写图片描述
这里写图片描述

PowerDsigner的具体使用方法大家可以百度一个PDF文件或者视频学习。

PowerDesigner下载攻略: 先百度

这里写图片描述
这里写图片描述

找激活成功教程方案

这里写图片描述
这里写图片描述

按照激活成功教程文档操作即可使用。

亲测最简便上手方案。

关于数据库的设计等问题在我之前的博客中都有分享哦。

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/157565.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2022年7月1,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
数据库
云数据库为企业提供了完善的关系型数据库、非关系型数据库、分析型数据库和数据库生态工具。您可以通过产品选择和组合搭建,轻松实现高可靠、高可用性、高性能等数据库需求。云数据库服务也可大幅减少您的运维工作量,更专注于业务发展,让企业一站式享受数据上云及分布式架构的技术红利!
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档