发布网友 发布时间:2022-04-21 05:49
共3个回答
懂视网 时间:2022-05-02 14:41
E-R图如下:
本项目使用MYSQL创建一个数据库game_db,其中包括四张表,分别是用户登录信息表(accountinfo),用户详细信息表(individual_info),用户分数表(gamescoreinfo),房间信息表(house):
accountinfo表:
属性名称 |
数据类型 |
属性描述 |
UserID |
int |
用户ID |
GameID |
int |
游戏ID |
Account |
Varchar(45) |
玩家名 |
Password |
Varchar(45) |
密码 |
MemberOrder |
Int |
会员等级 |
Individual_info表:
属性名称 |
数据类型 |
属性描述 |
UserID |
int |
用户ID |
Really_name |
Varchar(45) |
真实姓名 |
Sex |
Varchar(10) |
性别 |
|
Varchar(45) |
QQ号 |
Phone |
Varcher(45) |
电话号码 |
|
Varchar(45) |
邮箱地址 |
Gamescoreinfo表:
属性名称 |
数据类型 |
属性描述 |
GameID |
int |
游戏ID |
HouseID |
Int |
房间ID |
Score |
Int |
游戏分数 |
WinCount |
Varchar(45) |
胜利局数 |
LostCount |
Varchar(45) |
输局数 |
DrawCount |
Varchar(45) |
和局数 |
RunCount |
Varchar(45) |
逃跑局数 |
house表:
属性名称 |
数据类型 |
属性描述 |
HouseID |
Int |
房间ID |
housename |
Varchar(45) |
房间号 |
EnterTime |
Varchar(45) |
进入时间 |
LeaveTime |
Varchar(45) |
离开时间 |
建库,表和插入数据SQL语句:
CREATE SCHEMA `game_db` ;
CREATE TABLE `game_db`.`accountsinfo` (
`UserID` INT NOT NULL AUTO_INCREMENT,
`GameID` INT NOT NULL,
`Account` VARCHAR(45) BINARY NOT NULL,
`Password` VARCHAR(45) BINARY NULL DEFAULT 0,
`Sex` VARCHAR(10) NOT NULL DEFAULT ‘nan‘,
`MemberOrder` INT NOT NULL,
UNIQUE INDEX `Account_UNIQUE` (`Account` ASC));
SELECT * FROM game_db.accountsinfo;
INSERT INTO `game_db`.`accountsinfo` (`UserID`, `GameID`, `Account`, `Password`, `MemberOrder`) VALUES (‘1‘, ‘1‘, ‘LiMing‘, ‘123‘, ‘1‘);
INSERT INTO `game_db`.`accountsinfo` (`UserID`, `GameID`, `Account`, `Password`, `MemberOrder`) VALUES (‘2‘, ‘2‘, ‘Bob‘, ‘111‘, ‘2‘);
INSERT INTO `game_db`.`accountsinfo` (`UserID`, `GameID`, `Account`, `Password`, `MemberOrder`) VALUES (‘3‘, ‘3‘, ‘qinagzai‘, ‘222‘, ‘5‘);
INSERT INTO `game_db`.`accountsinfo` (`UserID`, `GameID`, `Account`, `Password`, `MemberOrder`) VALUES (‘4‘, ‘4‘, ‘jier‘, ‘333‘, ‘4‘);
INSERT INTO `game_db`.`accountsinfo` (`UserID`, `GameID`, `Account`, `Password`, `MemberOrder`, `AccountsInfocol`) VALUES (‘5‘, ‘5‘, ‘lucy‘, ‘1234‘, ‘7‘, ‘1‘);
CREATE TABLE `game_db`.`individual_info` (
`UserID` INT NOT NULL,
`Really_name` VARCHAR(45) NOT NULL,
`Sex` VARCHAR(10) NOT NULL,
`QQ` VARCHAR(45) NOT NULL,
`Phone` VARCHAR(45) NOT NULL,
`Email` VARCHAR(45) NOT NULL,
PRIMARY KEY (`UserID`));
SELECT * FROM game_db.individual_info;
INSERT INTO `game_db`.`individual_info` (`UserID`, `Really_name`, `QQ`, `Sex`,`Phone`, `Email`) VALUES (‘1‘, ‘AA‘, ‘12345677‘,`nan`, ‘13177789865‘, ‘89669913@qq.com‘);
INSERT INTO `game_db`.`individual_info` (`UserID`, `Really_name`, `QQ`, `Sex`,`Phone`, `Email`) VALUES (‘2‘, ‘BB‘, ‘1223453‘, `nan`, ‘17738724089‘, ‘12423453@qq.com‘);
INSERT INTO `game_db`.`individual_info` (`UserID`, `Really_name`, `QQ`, `Sex`,`Phone`, `Email`) VALUES (‘3‘, ‘CC‘, ‘45665654‘, `nan`, ‘17890762354‘, ‘866753472@qq.com‘);
INSERT INTO `game_db`.`individual_info` (`UserID`, `Really_name`, `QQ`, `Sex`,`Phone`, `Email`) VALUES (‘4‘, ‘DD‘, ‘344245345‘, `nan`, ‘13798082376‘, ‘7576573@163.com‘);
INSERT INTO `game_db`.`individual_info` (`UserID`, `Really_name`, `QQ`,`Sex`, `Phone`, `Email`) VALUES (‘5‘, ‘EE‘, ‘5645665‘, `nan`, ‘197662762‘, ‘86964369@qq.com‘);
CREATE TABLE `game_db`.`gamescoreinfo` (
`GameID` INT NOT NULL AUTO_INCREMENT,
`Score` INT NOT NULL DEFAULT 0,
`WinCount` VARCHAR(45) NOT NULL DEFAULT 0,
`LostCount` VARCHAR(45) NOT NULL DEFAULT 0,
`DrawCount` VARCHAR(45) NOT NULL DEFAULT 0,
`RunCount` VARCHAR(45) NOT NULL DEFAULT 0,
PRIMARY KEY (`GameID`));
SELECT * FROM game_db.gamescoreinfo;
INSERT INTO `game_db`.`gamescoreinfo` (`GameID`, `Score`, `WinCount`, `LostCount`, `DrawCount`, `RunCount`) VALUES (‘1‘, ‘7‘, ‘3‘, ‘2‘, ‘4‘);
INSERT INTO `game_db`.`gamescoreinfo` (`GameID`, `Score`, `WinCount`, `LostCount`, `DrawCount`, `RunCount`) VALUES (‘2‘, ‘7‘, ‘3‘, ‘2‘, ‘4‘);
INSERT INTO `game_db`.`gamescoreinfo` (`GameID`, `Score`, `WinCount`, `LostCount`, `DrawCount`, `RunCount`) VALUES (‘3‘, ‘7‘, ‘3‘, ‘2‘, ‘4‘);
INSERT INTO `game_db`.`gamescoreinfo` (`GameID`, `Score`, `WinCount`, `LostCount`, `DrawCount`, `RunCount`) VALUES (‘4‘, ‘7‘, ‘3‘, ‘2‘, ‘4‘);
INSERT INTO `game_db`.`gamescoreinfo` (`GameID`,`Score`, `WinCount`, `LostCount`, `DrawCount`, `RunCount`) VALUES (‘5‘, ‘7‘, ‘3‘, ‘2‘, ‘4‘);
CREATE TABLE `game_db`.`house` (
`HouseID` INT NOT NULL AUTO_INCREMENT,
`houseID` VARCHAR(45) NOT NULL,
`EnterTime` VARCHAR(45) NOT NULL DEFAULT 0,
`LeaveTime` VARCHAR(45) NOT NULL,
PRIMARY KEY (`HouseID`));
SELECT * FROM game_db.house;
INSERT INTO `game_db`.`house` (`UserID`, `houseID`, `EnterTime`, `LeaveTime`) VALUES (‘1‘, ‘1‘, ‘12‘, ‘345‘);
欢迎大家批评指正
团队项目----德州扑克数据库设计之改进版
标签:错误 img null lsp 改进 www. member 时间 设计
热心网友 时间:2022-05-02 11:49
NO.1 雷区取水项目介绍:在一个直径 5 米 的深潭中间有一盆水,你要在仅用一根绳子,不接触水面的情况下取到全体队员的救命宝物,想一想可能吗?团队的智慧可以把它变成事实。项目目的:提高队员组织、沟通和协作的能力和技巧,团队的领导艺术和技巧,人力资源的合理分配和运用,行动之前的讨论和计划对于事情的成败起重要作用,培养人处理事情良好的计划性和条理性,培养队员集体荣誉感,为团队勇于奉献的精神。热心网友 时间:2022-05-02 13:24
高空挑战类拓展项目游戏:绝壁攀岩、空中抓杠、天梯、断桥、高空 V 走、晃桥、高空索桥、高空击球