问题背景:
2.1 The application domain for the component data sources
Envisage the situation where there are three Athletics clubs, each having a different emphasis
on various aspects of the sport of athletics. For one club, track events are the focus of attention
while for another, the field events are of particular importance. The third club takes a more
balanced view of the track and field components of Athletics. The databases used by each club
reflect the different interests of each club: however, as a requirement of a new funding initiative
the clubs need to present a unified view of the data collected for all athletes in the region.
During this project you are to model each of the three different data sources used by the individual
athletics clubs and, to allow the clubs to qualify for the new source of funding, you are
to also integrate these data sources to provide the unified data view of all athletes in the region
covered by the clubs.
问题描述:
In general terms, an athletics championship will have the following entities and relationships:
Athletes who may participate in an arbitrary number of competitions. An athlete is described
by his or her first and last name, address, his or her coaches (may be a number, e.g. for
fitness, tactics, style, etc.) and the competitions in which they compete.
Competitions which can be classified into classes (like running disciplines, throwing, jumping,
etc.). For each competition, a list of competitors and the results list are to be maintained.
While most disciplines are only for individuals there may also be disciplines for teams
only (like 100m or 400m relay). Moreover, some disciplines may consist of a number of
sub-disciplines (like decathlon or pentathlon) in which case the results and competitors
for each sub-discipline are to be stored.
Teams each of which represents exactly one club, but a club may have more than one team. For
a team, the name of the team, the constituent members, and the disciplines in which the
members participate are to be stored.• your model/schema needs to be extensible: for example, a complex discipline may consist
of an arbitrary number of sub-disciplines.以上是问题的描述,要求用SQL DDL定义数据库,请大家给点意见如何去定义SQL Statement 用 CREATE TABLE语句,我给出一点我写的语句,希望高手能给出完整的定义,稍候我会贴出我的完整定义。CREATE TABLE Athletes
(
athleteID INT NOT NULL PRIMARY KEY,
firstname VARCHAR(20) NOT NULL,
lastname VARCHAR(20) NOT NULL,
address VARCHAR(20) NOT NULL
);CREATE TABLE Coaches
(
coacheID INT NOT NULL PRIMARY KEY,
lastname VARCHAR(20) NOT NULL,
firstname VARCHAR(20) NOT NULL,
athleteID INT NOT NULL REFERENCES Athletes(athleteID)
);
2.1 The application domain for the component data sources
Envisage the situation where there are three Athletics clubs, each having a different emphasis
on various aspects of the sport of athletics. For one club, track events are the focus of attention
while for another, the field events are of particular importance. The third club takes a more
balanced view of the track and field components of Athletics. The databases used by each club
reflect the different interests of each club: however, as a requirement of a new funding initiative
the clubs need to present a unified view of the data collected for all athletes in the region.
During this project you are to model each of the three different data sources used by the individual
athletics clubs and, to allow the clubs to qualify for the new source of funding, you are
to also integrate these data sources to provide the unified data view of all athletes in the region
covered by the clubs.
问题描述:
In general terms, an athletics championship will have the following entities and relationships:
Athletes who may participate in an arbitrary number of competitions. An athlete is described
by his or her first and last name, address, his or her coaches (may be a number, e.g. for
fitness, tactics, style, etc.) and the competitions in which they compete.
Competitions which can be classified into classes (like running disciplines, throwing, jumping,
etc.). For each competition, a list of competitors and the results list are to be maintained.
While most disciplines are only for individuals there may also be disciplines for teams
only (like 100m or 400m relay). Moreover, some disciplines may consist of a number of
sub-disciplines (like decathlon or pentathlon) in which case the results and competitors
for each sub-discipline are to be stored.
Teams each of which represents exactly one club, but a club may have more than one team. For
a team, the name of the team, the constituent members, and the disciplines in which the
members participate are to be stored.• your model/schema needs to be extensible: for example, a complex discipline may consist
of an arbitrary number of sub-disciplines.以上是问题的描述,要求用SQL DDL定义数据库,请大家给点意见如何去定义SQL Statement 用 CREATE TABLE语句,我给出一点我写的语句,希望高手能给出完整的定义,稍候我会贴出我的完整定义。CREATE TABLE Athletes
(
athleteID INT NOT NULL PRIMARY KEY,
firstname VARCHAR(20) NOT NULL,
lastname VARCHAR(20) NOT NULL,
address VARCHAR(20) NOT NULL
);CREATE TABLE Coaches
(
coacheID INT NOT NULL PRIMARY KEY,
lastname VARCHAR(20) NOT NULL,
firstname VARCHAR(20) NOT NULL,
athleteID INT NOT NULL REFERENCES Athletes(athleteID)
);
解决方案 »
- 求助给分析一下最后@@cursor_rows为什么是-1呀?
- 关于select top语句的问题
- Java访问MSSQL数据库性能如何?
- 如何编写一存储过程,让他在每晚12:00自动执行。
- 在sql里我要想把时间类型为‘yyyy-mm-dd hh:mm:ss’和字符类型‘yyyy-mm-dd-hhmmss’做比较,应该怎样转换比较好?谢谢
- 循环修改字段内容
- 数据库的问题 ~~~~请教高手 50分献上
- SQL Server中单个表中的最大记录条数?
- 小弟误用了delete语名,请问删除的数据怎么恢复,救急呀...........
- 请问单引号是怎样匹配的?
- 给位高手门帮忙解决下
- 重复数据的筛选问题.
Disipline(DisiplineID,ParentDisiplineID, DisiplineName,etc…)
因为有层级关系