Starting from:

$30

CSE 5331/4331 Project 2 Solved

CSE 5331/4331                                                                                                   
Project 2

In this project, you will learn to use MongoDB as an example of a document-oriented NOSQL system, and see how data is stored and queried in such a system. You will also learn about the difference between storing data in a flat (relational) format versus in a document (complex object) JSON format.

The input to your program will be several data files in flat relational format for the WORLD CUP 2018 database example (see attached approximate ER and relational schemas). The files contain data records about information regarding the 2018 soccer world cup tournament.

 

Project 2, Part 1:

 

Install Mongo DB on your computer. Load the data files into Mongo DB as flat files: TEAM, GAME, PLAYER, STARTING_LINEUP, GOALS.

 

Turn in documentation to show that you installed Mongo DB and created the flat file document collections corresponding to the above tables. Due date: Sunday August 4, 2019.

 

Project 2, Part 2:

 

You will need to design two document (complex object) schemas corresponding to this data. The first one is required, while the second one is optional for extra credit (20 points extra over 100):

 

1.     The TEAM_SCORES document will include the following data about each team: Team (that is, the team name), and a collection of the team match (GAME) scores. Each match score in the collection will include: the date of the match, the name of the city and stadium where the match was played, repeat of the team’s name, the team score in the match, the name of the opposing team, and the score of the opposing team.

2.     The PLAYER_DATA document will include the following data about each player: the player name (Pname), the player’s team name (Team), the player number (PNo) and position (Position), and a collection of games that the player has started – for each game (match) the player  has started, include the MatchDate, City, Stadium Name, and opposing team name. Also include for each player a collection of goals that the player has scored (if any) – for each goal scored, include the GoalType, Time, MatchDate, City, Stadium Name, and opposing team name.

 

Instructions on how to download and install MongoDB on your computer are on Canvas and also at crystal.uta.edu/~elmasri/db2 under Projects.

 

We will have the following data files for the world cup database:

 

TEAM(TeamID, Team, Continent, League, Population)

(* Team is the Team Name, which is the name of one of the participating countries *)

STADIUM(SID, SName, SCity, SCapacity)

(* SName and SCity are the name and city of each stadium *)

PLAYER(Team,TeamID,PNo,Position,PName,Birth Date,Shirt Name,Club,Height,Weight)

(* PLAYER corresponds to the data in the “rosters” data file – Pno corresponds to PlayerID,

and PName corresponds to FIFA Popular Name in the rosters file *)

GAME(GameID,MatchType,MatchDate,SID,TeamID1,TeamID2,Team1_Score,Team2_Score)

(* GAME corresponds to the data in the “matches” data file *)

STARTING_LINEUPS(GameID,TeamID,PNo)

GOALS(GameID,TeamID,PNo,Time,Penalty)

OWN_GOALS(GameID,TeamID,PNo,Time,For_TeamID)

 

 

Your tasks for the project are as follows:

Write programs or use Mongo DB tools to extract the data needed for the complex document types (TEAM_SCORES (required) and PLAYER_DATA (optional)), and load these documents into the MongoDB system. Notice that the data from each document will be the result of a join on more than one flat file. You will need to convert the flat-file data loaded in Project 2, Part 1 to convert into the nested format into JSON for loading on MongoDB
Write some MongoDB queries to retrieve some of the stored documents. (For example, retrieve all team scores for the team “Japan”).
 

Due Dates: You should turn in an intermediate report for Part 1. You must demonstrate that you have installed MongoDB by creating the simple flat documents for the data files described in Part 1 and turning in documentation to show this.


Note 1: This project can be done in groups of up to 2 students per group. All students in a group will receive the same grade.

More products