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

数据库设计工具的使用(实用)使用数据库设计工具,以下sql语句全部可以自动生成:/*==============================================================*//*DBMSname:MySQL5.0*//*Createdon:2017/5/270:57:18

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

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

/*==============================================================*/
/* 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.net/157565.html原文链接:https://javaforall.net

赞 (0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号