You know ?
Posted in 1996
Topics: General Discussion
I have to build a database for a hockey team. First, i'd like to begin with the relational algebra. For those who dont know what i mean about relational algebra, this is the way we make requests to relations in a database. An example would be for those 3 relations; S(S#,SNAME,STATUS,STOWN) P(P#,PNAME,COLOR,WEIGHT,PTOWN) E(F#,P#,QUANTITY) Where S mean Supplier, P Piece, E Envoice If we would like to find the suppliers's names that are located in Montreal, the relational algebra would be; R1=S WITH STOWN = 'MONTREAL' R2=R1[SNAME] So here is description of my problem. Up to now, i have those relations with those identificators : ------------------------Players------------------------------- PNAME->Player's name SAISON->The saison that is considered in AA-AA format SCORES->The number of scores for the saison that is considered ASSIST->The assistances for the saison that is considered --------------------------Teams--------------------------- TNAME->The team's name SAISON->The saison that is considered in AA-AA format SAISON_SCORES->Total score for the saison we consider (We talk about team's score here) --------------------------PlayFor----------------------------- PNAME->The player's name TNAME->The team's name STARTDATE->The arrival with the team date in AA-AA format ENDATE->The leaving from the team date in AA-AA format ---------------------------Games---------------------------- DATE->The game's date in AA-AA format VISITORNAME->The visitor's team name HOMENAME->The home's team name SCORVIS->The score of the visitors SCOREHOME->The score of the home team ----------------------------Stats---------------------------' DATE->The game's date in AA-AA format PNAME->The player's name SCORES->The number of scores of the player for this game ASSIST->The number of assitances of the player for this game -------------------------------------------------------------- The only one identificator that comes twice and that has not the same signification is SCORES. The first one is in the relation Players and the other one is in Stats. So i know that i'll have to make an alias of one of those. So here are some kind of request i would like to be able to make in relational algebra; -Find all teams that won while they were visitors for the games that took place on November 10 1995. -Find all teams who won a game that took place on October 10 1994. -Find all the "Draveurs" players that had scored at least 1 score while the 17 january 1994 game. -Find all the teams that had a player who scored more than 4 scores while they were playing a game, since the beginning of the league. -Find all the teams that had a player who scored more than 50 scores, at the end of the 1993-1994 season. -Find all the players who had scored the same nomber of scores than Paul Gates, while one the the games played on march 15 1995. -Find all teams that had scored the same nomber of scores that the "RoadRunners", while one of the games played on April 1st 1994. I actually work on it but if someone has an idea on one of those, please, feel free to e-mail me ! -> jean_moreau@itr.qc.ca -- J'MOR