Download Assignment 1

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Open Database Connectivity wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Concurrency control wikipedia , lookup

Database wikipedia , lookup

Relational model wikipedia , lookup

ContactPoint wikipedia , lookup

Clusterpoint wikipedia , lookup

Database model wikipedia , lookup

Transcript
Enterprise Computing
Assignment 1
Submission Date ____Friday 30st Oct @3.00pm_______
Question 1 – Enterprise Systems Design (40%)
In computer programming, SOLID (Single responsibility, Open-closed, Liskov
substitution, Interface segregation and Dependency inversion) is a mnemonic for five
basic principles of object-oriented programming and design. The principles, when
applied together, intend to make it more likely that a programmer will create a
system that is easy to maintain and extend over time. Explain these principles.
Dependency Injection is not the same as the Dependency Inversion Principle. Using
a design or implementation example explain and illustrate the differences.
(40 marks)
(Note. Your answer is limited to a maximum of five pages (A4, Ariel Font Size 12,
with 1.5 line spacing. So you need to plan carefully how you summarise and present
the research so as to optimise you answer.)
Assessment Criteria:
(i) Addresses directly the issues and questions posed15%
(ii) Provides sufficient and relevant detail15%
(iii)The quality of the grammar 5%
(iv) General presentation and appropriate referencing 5%
Question 2 –Object/Relational Mapping and LINQ (60%)
Using Visual Studio or otherwise you are required to create an enterprise type
application to manage International Soccer Teams, Players and Fixtures. First
design a database model to hold information relating to the Teams, Players and
Fixtures. For this scenario we need to define a number of facts. These facts define
the requirements which the Database must meet and would normally be agreed
between the Database User and the Database Designer prior to physical creation.
The draft facts have been defined as follows:
The Entities required should include:
 Teams
 Players
 Fixtures
 Player Positions
 Competitions
The Entities are related as follows:
 One Team can have Many Players
 One Player can play in Many Fixtures
 One Fixture can have Many Players (playing)
 One Competition has Many Fixtures
1
With this design, One Team has many Players however a Player can only play for
One Team at any one time. The relationship between Players and Fixtures is a
Many-To-Many relationship. One Player can play in zero, one or Many Fixtures, and
the Fixture involves Many Players. The link table between the Players and Fixtures
relationship also allows you to record whether a Player scored any Goals in that
particular Fixture.
When asking questions of the database we may need to know for example:
 Which Players played in a particular Fixture?
 What was the result of a particular Fixture?
 Which Players does a particular Team have signed on?
Consider carefully the fields required for each entity and the associated domain
values. You may need to do some requirements analysis regarding the type of
information held relating to this application domain so that your model is
reasonability realistic with meaningful data. Meaningful data makes it easier to check
the validity of the query results.
(a) Develop a relational database model for the international soccer scenario
described above.
Add sample data to allow reasonably realistic testing to be carried out.
Show the SQL Script that is associated with each tables in the database and
using “Show Table Data” provide screen dumps of the data stored in each of the
database tables.
(15 marks)
(b) Use Visual Studio to create an Entity Data Model from your existing database.
Present a copy of this Entity Data Model in your submission.
(5 marks)
(c) Develop this International Soccer Team System using a Visual Studio C#
Console application. The Entity Framework Power Tools allow you to reverse
engineer a Code First Model from an existing database. In the Visual Studio
Console application use these Power Tools and the “Code First to an Existing
Database” approach to develop a C# code based representation of your
database. Now develop a C# Console application program with a user interface
to provide the following functionality:
1) List the International Soccer Teams.
(2 marks)
2) Given a Team name list all the members of that team.
(4 marks)
3) Given a player’s Name, display their Team and list all the team Members.
(6 marks)
4) Given a competition Name, list the competition dates for all the games and the
home and away teams playing each other on those dates.
(6 marks)
5) Given a Player ID, display the player’s name, the name of the team they play
for and position they play in that team.
(6 marks)
2
6) Given a Player ID, report their name, the number of games played and the
total number of goals scored.
(6 marks)
You can use C# LINQ to Entities to communicate with the C# representation of the
database. All input data should be validated.
Provide a listing of your C# Console application code and provide screen dumps of
the testing associated with each of the above operations.
(d) Demonstration of your software in the laboratory.
(10 marks)
(Note. This assignment should be submitted as printed copy (only) with the
appropriate cover page to the School Office.)
END
3