DAT 560G: Database Design and SQL

SpringBoot+Vue+MySQL 高校学科竞赛平台 完整可运行版(源码+文档) 本项目基于SpringBoot+Vue+MySQL构建高校学科竞赛管理平台,覆盖学生、教师、领队教师、管理员四大角色,实现竞赛发布、报名、刷题、评分、公示等全流程闭环管理。系统架构清晰,技术主流,配套完整源码、数据库脚本、万字论文、开题报告、答辩PPT及部署文档,支持一键运行,适用于毕业设计、课程设计及院系二次开发,真正实现“开箱即用”。 阅读详情

DAT 560G: Database Design and SQL

Fall 2024, Mini A

Assignment #3: SQL Part 2

Instructions

1. This is an individual assignment. You may not discuss your approach to solving these questions with anyone (or Generative AI), other than the instructor or TA.

2. Please include only your Student ID on the submission.

3. The only allowed material is:

a. Class notes

b. Content posted on the LMS

c. Textbook

4. You are not permitted to use other online resources.

5. There will be TA office hours. See the course schedule.

Background

The North American Disasters Database is a comprehensive repository designed to document and analyze various disasters that have occurred across North America. From natural calamities such as hurricanes, earthquakes, and wildfires to human-made incidents like industrial accidents and environmental crises, this database aims to provide a detailed record of significant events that have impacted North America.

Types relation contains the following information about each type of disaster in the database:

• Type of each disaster. This is the primary key.

• Natural indicates whether this type of disaster is natural or caused by people (man-made)

• Mode: what causes this type of disaster

• Size: the typical size of the disaster, in square miles

• Frequency: Every how many years the event can be expected.

Types (Type, Natural, Mode, Size, Frequency)

Places relation describes the cities where disasters may occur. It captures information about the cities and states where disasters occur, including geographic, demographic, and economic data. NOT all cities have disasters. It includes the following attributes.

• City: Name of the city. This is the primary key.

• State: Name of the state.

• Region: Name of the region within the US.

• Size: Geographic size of the city in square miles.

• Population: Number of people living in the city.

• Income: Average income of the residents in the city, in dollars.

• Homeowners: Percentage of houses that are owned by the occupants rather than rented.

• Budget: The city's annual budget.

• FoundingDate: The date when the city was founded.

• ManagerFirstName: The first name of the emergency manager in the city.

• ManagerLastName: The lastname of the emergency manager in the city.

• Gender: Gender of the emergency manager.

• Salary: Annual salary of the emergency manager.

• StartingDate: The date when the emergency manager started their position.

Places (City, State, Region, Size, Population, Income, Homeowners, Budget, FoundingDate,

ManagerFirstName, ManagerLastName, Gender, Salary, StartingDate, Environmental, Quality)

Teams relation records details about the response teams, including their budget, size, and the demographics of their members. There can be more than one response team for a city. If a city has disasters, then it must have at least one team. Some of the cities that do not have disasters may not have any response teams.

• Team: Unique identifier for the response team.

• City: Name of the city where the response team is based. This is a foreign key, to the places relation

• Organization: The organization to which the response team belongs.

• Budget: The annual budget of the response team, in dollars

• FirstDate: The date when the response team was first established.

• Employees: The number of employees in the response team.

• ManagerFirstName: The first name of the manager of the response team.

• ManagerLastName: The lastname of the manager of the response team.

• Gender: Gender of the manager.

• Salary: Annual salary of the manager in dollars.

• Female: Percent of the team that is female.

• Minority: Percent of the team that is minorities.

• ServiceArea: This is the part of the city that this team serves. Can have values of either: All, North, South, East, West.

Teams (Team, City, Organization, Budget, FirstDate, Employees, ManagerFirstName, ManagerLastName, Gender, Salary, Female, Minority, ServiceArea)

TeamSkills relation lists the specific skills possessed by these teams, providing insight into their capabilities. Not all teams need to have skills. Some teams can have several skills. Different teams will have different numbers of skills.

• Team: Unique identifier for the response team. This is a foreign key.

• Skill: Specific skill possessed by the response team. This is part of the multi-attribute key

TeamSkills (Team, Skill)

Disasters relation documents the details of each disaster event, including the type, location, response team involved, and the impact in terms of duration, casualties, property damage, and the number of responders. It includes the following information:

• Type: The type of disaster. Foreign Key that refers to the Type in the CauseTypes table.

• City: Name of the city where the disaster occurred. This is a foreign Key referring to Places.

• Team: Unique identifier for the response team that responded to the disaster. Foreign key referring to Teams relation.

• Name: A unique name or identifier for the disaster. This is part of the multi-attribute key.

• Date: The date when the disaster occurred.

• Year: The year when the disaster occurred.

• Month: The month when the disaster occurred.

• Duration: The duration of the disaster, in hours.

• Casualties: The number of casualties resulting from the disaster.

• PropertyDamage: The estimated property damage caused by the disaster, in US dollars.

• Responders: The number of responders involved in addressing the disaster.

Disasters (Type, City, Team, Name, Date, Duration, Casualties, PropertyDamage, Responders, Year, Month)

Relations

Types (Type, Natural, Mode, Size, Frequency)

Places (City, State, Region, Size, Population, Income, Homeowners, Budget, FoundingDate,

ManagerFirstName, ManagerLastName, Gender, Salary, StartingDate, Environmental, Quality)

Teams (Team, City,    Organization,   Budget,    FirstDate,   Employees,    ManagerFirstName,

ManagerLastName, Gender, Salary, Female, Minority, ServiceArea)

TeamSkills (Team, Skill)

Disasters (Type, City, Team,  Name, Date,  Duration, Casualties, PropertyDamage, Responders,

Year, Month)

Assignment

Each of these questions is 10 points. Submit answers to these online on Canvas, by 6 am the day of the lab. They are automatically graded.

1)   Find all cities that have more than 2 disasters. List the cities that have the most disasters first down to those who only have the fewest.

2) List all of the skills related to teams that responded to Dam failures after 2010. Please only list the skill once.

3)   In order to compare gender differences in manager salaries, please list the average salary for team managers by gender. Only include teams with average budgets greater than $5 million for teams established after 2010, and not in the state of California. Do not include teams with null values for their team manager’sgender.

4) In order to find an experienced team manager with spills,find all managers who have experience with 2 or more disasters with an oil spill, train spill, or truck spill. Include the manager’sfirst and lastname, team, and the number of disasters the manager has overseen. Sort the list with the most experienced first.

5) List the cities in this database that have NOT been affected by disasters.

6) Find the types of disasters with six or fewer occurrences in this database.

Each of these questions is 5 points. Submit answers to these on Canvas before the next lab session. They will be graded by TAs.

For each question, submit your SQL code and a screenshot of the results. If the results are too long, partial results are fine. Include relevant attributes for each result, to explain that the result is correct. Do NOT include many unnecessary attributes. Do NOT use SELECT *.

7) Find the cities with less than 5 disasters. Include the population, state, region, and number of disasters.

8)   Is there a city that has a population over 900,000 and has had both natural as well as man-made disasters? List it then. In your query results, make sure each row contains a unique city/Natural- type combination. Also list the city name and population.

9) Are there any pairs of teams that have responded to the same type of disaster and the same city? List team pairings only once and include the city name in your results.

10) Find teams with less than 150 employees and more than 70 females. List the team, the number of disasters, and the average number of responders.

11) Find cities with more than two disasters, populations greater than 500,000, and disaster recovery teams led by female managers. List the name of the city only once in your results.

12) Please identify how many disasters happened in each city ofCalifornia that occurred in October or January, had populations LESS THAN 500,000, and casualties above 900. Include the city, number of casualties, the population, and the date of the disaster in your answer.

13) Find the minimum population and the average budget for states with less than five disasters. List the state, number of disasters, minimum population, and average budget—order by state name.

14) How much time did you spend on this assignment?

WRF后处理:python cartopy绘制土地利用/土地分类图//python绘制WRF下垫面类型(以北极为例) 下垫面类型对于WRF的地表过程十分重要,而在我们研究WRF的地表过程之前,需要对输入的土地利用类型进行一些绘制,以便后续的修改。LU_MODIS21函数定义了绘制的土地类型、标签与对应色标,我们使用时,直接引用LU_MODIS21()即可返回。其实很简单,只要将你拥有的土地类型数据提取出来,将原本函数中的labels和C切片,重新定义色标再绘制即可。在这里,我将以北极地区为例,绘制北极地区的WRF下垫面数据,我使用的MODIS21这类。 阅读详情

相关推荐

【UV打印机】PrintExp打印软件教程(六)-高级模式(马达)

输入高级模式密码进入高级模式高级模式界面有操作栏、控制栏、参数栏及参数界面操作栏名称功能说明文件加载数据从板卡加载参数保存将参数保存到主板退出退出高级模式固件导入固件导入配套版本下的固件配置*xpcfx导出固件导出当前使用的固件配置*xpcfx导入波形文件导入对应的波形文件*waf操作初始化系统继续初始化动作复位X轴复位回原点控制栏可进行小车运动、闪喷操作(此闪喷为点击进行闪喷,不受平台位置限制),无清洗功能。

Print World的专栏 3114

DAT 560G: Database Design and SQL Fall 2024 #3SQL

SQLPartTypeCityTeamsrelationTeamCityTeamSkillsrelationTeamSkillTypeCityTeamNameRelations(TypeCityTeamCityTeam, Skill)(TypeCityTeamfirst downtothosewhoonlyhavethefewest2)Listalloftheskillsrelated。

wx___codinghelp的博客 852

bert-ini:一种基于bert的实体对齐交互模型

本次分享一项来自IJCAI-20的实体对齐工作,该工作提出了一种不同于以往的采用图结构信息进行实体对齐的技术方案,该方案取得了当时的最好效果;不仅如此,模型本身的对齐效率在该项工作中也被考虑,实际工作中非常具备借鉴意义。

qq_33331424的博客 3155

DAT 560G: Database Design and SQL Spring 2025 #4: SQL Part 3SQL

Java Python DAT 560G: Database Design and SQLSpring 2025, Mini AAssignment #4: SQL Part 3Instructions1. This is an individual assignment. You may not discuss your approach to solving these questions with anyone, other than the instructor or TA.2. Please in

thintodoitok的博客 621

从命名玄学看单片机江湖:STC、STM32与ESP32的型号密码与设计哲学

本文解析了STC、STM32和ESP32三大主流单片机系列的型号命名规则,揭示了其背后的设计哲学与市场策略。通过详细解读STC89C52、STM32F103C8T6等具体型号,帮助开发者理解芯片核心特性、性能等级及适用场景,为嵌入式系统选型提供实用指南。

g5h6i的博客 765

【爬虫】Python实现爬取淘宝商品信息(超详细)

项目基于Python的第三方库Selenium模拟浏览器运行、PyQuery解析和操作HTML文档,获取淘宝平台中某类商品的详细信息(商品标题、价格、销量、商铺名称、地区、商品详情页链接、商铺链接等),并基于第三方库openpyxl建立、存储于Excel表格中。# 全局变量count = 1 # 写入Excel商品计数# 启动ChromeDriver服务# 关闭自动测试状态显示 // 会导致浏览器报:请停用开发者模式# 把chrome设为selenium驱动的浏览器代理;# 窗口最大化。

qq_46315152的博客 4万+

DAT 560G: Database Design and SQL Spring 2025 #3: SQL Part 2

Java Python DAT 560G: Database Design and SQLSpring 2025, Mini AAssignment #3: SQL Part 2Instructions1. This is an individual assignment. You may not discuss your approach to solving these questions with anyone, other than the instructor or TA.2. Please in

thintodoitok的博客 595

火星遥感数据的获取与处理工具安装详解

有关火星遥感影像数据的那些事...

FengYingLuo的博客 5577

177.Agent-LangGraph-MCP的构成说明

MCP架构通过MCP主机、客户端与服务器的协同,实现工具、资源与提示词的统一管理。MCP服务器提供Tools、Resources、Prompts能力,MCP客户端则负责发现、调用与读取,使Agent可按需获取上下文。其核心在于将工具从Agent中抽离,封装为可复用的服务,提升灵活性与可维护性,推动AI应用高效协作。

计算机王的博客 315

092、Python在芯片验证中的应用:从脚本小子到验证架构师

Python在芯片验证中的高效应用 本文通过实际案例展示了Python在芯片验证中的关键作用。凌晨三点的调试场景揭示了传统方法的局限,Python脚本能在20分钟内分析80GB波形数据定位FIFO指针问题。文章重点介绍了两个核心工具: 智能日志分析系统:通过正则表达式和上下文分析,自动分类百万行验证日志中的错误,生成可视化报告,效率远超传统grep方法。 寄存器模型生成器:将Excel表格自动转换为UVM寄存器模型代码,将原本需要两周的手工工作缩短至两小时,同时保证零错误。 文章还展示了Python与Sys

z534437748的博客 74

【ARM Trace32(劳特巴赫) 使用介绍 10 -- Trace32 scan dump 详细介绍】

将图 1-2 中扫描单元按照扫描移位模式连接起来,就构成了扫描测试中的基本结构,这里介绍下全扫描。全扫描就是多个扫描单元相连接,上一单元的扫描输出,连接到目前单元的扫描输入,目前单元的扫描输出连接到下一单元的扫描输入,以此类推,构成一条移位寄存器链,如图1-3 所示:图 1-3 全扫描这样的扫描结构,可通过一个串行输入端,将期望的数据存入移位寄存器链并观察运行结果。

CodingCos的博客 2034

Docker Compose:搭建本地多服务开发环境

从一个 Java API、PostgreSQL 和 Redis 开始,配置服务名、端口、环境变量、健康检查、数据卷和依赖关系。理解 Compose 文件如何被解析、项目如何隔离,以及哪些数据不能依赖“重建容器”保留,能够把个人开发环境整理成团队可复用的启动入口。

m0_62221377的博客 478

9.27华为OD机试真题 新系统 - 均衡调度 (Java/Py/C/C++/Js/Go)

9.26华为OD机试真题 新系统 - 均衡调度 (Java/Py/C/C++/Js/Go)

算法大师! 531

AI全栈实战 | 3.9-01 爬虫入门:requests 加 BeautifulSoup 三分钟跑通,但 90% 的人栽在这 4 个“礼貌“问题上

⚠️:本文内容仅用于。请遵守目标站点的服务条款与相关法律法规,不得对目标服务造成负担,不得采集、传播个人隐私数据。技术是中性的,边界在你手里。爬虫的入门技术(requests 发请求 + BeautifulSoup 解析)三分钟就能学会。真正区分"会用爬虫"和"会做爬虫的人"的,是这篇我们跑通"请求→解析→存储"的最小闭环,然后重点把"合规与礼貌"这根弦给你绷上。

源码获取 | 运行部署 | 定制二开修改,如果回复不及时请耐心等待,请见谅。 442

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

spring boot 4集成SQLLite,及其SQLLite的建库

spring boot 4集成SQLLite,及其SQLLite的建库

weixin_41463944的博客 237

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

【基于 WebSocket 的多用户网页五子棋】—— 数据管理模块

但行好事,莫问前程

qq_42996461的博客 260

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

OpenClaw 深度调查:把 AI 助手做成你自己的控制平面

对 openclaw/openclaw 的完整技术尽调:Gateway 架构、Agent 运行时、工具与沙箱、30 个消息通道、181 个插件、安全信任边界、工程代价与采用建议。17 章 / 10 张图,全部数字标注口径,数据截至 2026-10-31。

厚积薄发 349

IDEA 简介:从零认识 IntelliJ IDEA

IDEA 全称,是由 JetBrains 公司开发的一款主流 Java 集成开发环境(IDE)。它集代码编辑、编译、调试、测试、版本控制、构建管理等功能于一体,被大量 Java 开发者视为日常开发的首选工具。所谓 IDE(Integrated Development Environment,集成开发环境),就是把写代码所需的各类工具整合到同一个界面中。相比只用文本编辑器加命令行编译,IDE 能显著减少重复操作,让开发者把精力集中在业务逻辑上。

ztI10的博客 185

TransactionInactiveError:await 之后事务已经不活跃了

TransactionInactiveError 出现于 IndexedDB 事务已结束(非 active 状态)时调用 put、get 等操作。常见于 await 后或 setTimeout 中执行请求,因任务已完成,事务已提交或进入 finished 状态。请求必须在创建事务的同一任务中挂起,否则无效。解决方法:在 onsuccess 回调内同步发起后续操作,或提前将所有请求挂入事务。避免在异步上下文中使用事务操作,确保请求在事务活跃期内完成。

qq_40822000的博客 159

Docker部署linkding:HTTPS与数据备份

部署私人书签库,除了让页面能够打开,还需要考虑几个实际问题:重建容器后数据是否保留、登录和保存是否正常、升级前怎样备份,以及出现 502 或 CSRF 错误时从哪里检查。本文使用 Docker Compose 部署 linkding,采用默认 SQLite 数据库,通过 Caddy 提供 HTTPS,并完成账户创建、数据持久化验证和备份。如果重建后账户或书签消失,应先检查是否换了项目目录、改了挂载路径,或者启动了另一套实例,不要急着重新初始化。遇到权限问题,应根据日志确认具体目录和运行用户,再调整权限。

tedcloud123的博客 194

云计算课程小组PPT汇报任务书

36人分为6组,每组6人;形式:生活案例调研 + 理论解读;汇报时长7‑9min;PPT建议10‑14页。

Michelle8023的博客 227

企业官网源码与数据资产交接:四项权利、五组自动检查

企业官网源码交接不仅要看压缩包,还要核域名、云资源、构建脚本、数据库恢复、权限与密钥。

sweetofmine1的博客 187

软件项目交付时,源代码之外还应该交付哪些技术资料?

软件项目交付时,除可运行程序外,还应核对源代码、数据库结构、接口文档、部署运维、测试验收和账号资产。本文从实际交付环节拆解完整资料清单,并说明合同如何约定交付范围、知识产权与维护边界。

chengduyoushu的博客 308

Java 项目实战:交友项目后台系统——网关统一鉴权与 B 端管理后台

本次改造通过引入SpringCloud Gateway实现网关统一鉴权与路由,新建mf-admin管理端复用C端域服务(Dubbo调用),实现管理员登录与用户管理四件查询。核心套路:网关白名单+双体系JWT(同工具不同payload)、管理端零直连业务库、分页形态区分(MySQL自动count/Mongo手动count)、浏览器端独立聚合。踩坑12条,附自检清单与后续改造方向,可复用于多角色后台系统。

Wang的专栏 70

大表 ALTER TABLE 怎么做?NineData OnlineDDL 配置与执行实践

介绍NineData OnlineDDL大表变更实践,涵盖执行策略、切表控制、拷贝批次与可视化进度追踪。

dbasenewbie的博客 295

Axum 初步入门学习笔记

)自定义错误实现后,可以直接作为Result的ErrAxum 是一个构建在 Tokio、Tower、Hyper 之上的 Rust Web 框架,核心能力是:Router 路由、Extractor 提取器、Tower 中间件、IntoResponse 响应机制、State 共享状态。那张分层架构图是“地图”不是“说明书”:它帮你建立全局观,但 Service、Repository、数据库、Redis、MQ 都是你自己在 Handler 内部调用的业务/基础设施层,不是 Axum 自带的。

weixin_43219667的博客 206
上一篇: EMCH792 – Optimal State Estimation
下一篇: Computer Science A67
vx___codinghelp
博客等级 码龄2年 778粉丝 101原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值