52
CPSC 471 FINAL REPORT

CPSC 471 - DesiFX Sound Crew Database

Embed Size (px)

DESCRIPTION

CPSC 471 - DesiFX Sound Crew Database

Citation preview

Page 1: CPSC 471 - DesiFX Sound Crew Database

CPSC 471FINAL REPORT

Nitin Puri 988955Iram Shamim 210627

Page 2: CPSC 471 - DesiFX Sound Crew Database

TABLE OF CONTENTS

1.0 Proposal..................................................................................................................42.0 Entity Relationship Diagram................................................................................63.0 Logical Relational Diagram..................................................................................74.0 Initial Draft of Functional Programming............................................................7

4.1 Login Screen........................................................................................................84.2 Employee Screen.................................................................................................8

4.2.1 View All Bookings Screen..........................................................................84.2.2 Music Catalogue Screen..............................................................................84.2.3 Manage Users Screen..................................................................................9

4.3 Customer Screen..................................................................................................94.3.1 View Previous Bookings Screen.................................................................94.3.2 View Previous Play Lists Screen.................................................................94.3.3 Make New Booking Screen.........................................................................9

5.0 User Manual.........................................................................................................105.1 Generic Instructions...........................................................................................10

5.1.1 Login into the DesiFX Online Party..........................................................105.1.2 Logout of the DesiFX Online Party...........................................................11

5.2 Employee Instructions.......................................................................................135.2.1 View all bookings......................................................................................145.2.2 View a play list for a booking....................................................................155.2.3 Manage the music catalogue......................................................................165.2.4 Add a song to the music catalogue............................................................175.2.5 Delete a song in the music catalogue.........................................................185.2.6 View all songs in the music catalogue.......................................................205.2.7 View a song by artist name in the music catalogue...................................225.2.8 View a song by genre type in the music catalogue....................................235.2.9 Manage the users.......................................................................................245.2.10 Add a user..................................................................................................255.2.11 Delete a user..............................................................................................26

5.3 Customer Instructions........................................................................................285.3.1 Make a new booking..................................................................................295.3.2 Enter new booking information.................................................................305.3.3 Make a play list..........................................................................................315.3.4 Confirmation..............................................................................................325.3.5 View previous bookings............................................................................335.3.6 Select Previous Booking............................................................................345.3.7 Edit Previous Booking...............................................................................355.3.8 View Previous Play Lists...........................................................................365.3.9 Select Previous Play List...........................................................................375.3.10 Edit Previous Play List..............................................................................38

6.0 Troubleshooting.........................................................................................................396.1 Make A New Booking - Booking Already Exists............................................396.2 Make A New Booking – No Confirmation........................................................396.3 Managing The Music Catalogue – Empty Fields..............................................39

2

Page 3: CPSC 471 - DesiFX Sound Crew Database

6.4 Managing The Music Catalogue – Missing Artist, Title...................................396.5 Managing The Users – Missing Name, Username, Password...........................39

7.0 System Requirements................................................................................................398.0 Appendix.....................................................................................................................40

8.1 Tables.................................................................................................................408.2 Relational Instances...........................................................................................41

3

Page 4: CPSC 471 - DesiFX Sound Crew Database

1.0 Proposal

January 31, 2003

Dr. Reda ElhajjComputer Science DepartmentUniversity of Calgary2500 University Drive NWCalgary, Alberta, Canada

4

Page 5: CPSC 471 - DesiFX Sound Crew Database

Subject: CPSC 471 proposal for creating an online booking form, music catalogue, and play-list creation, for a local disc jockey (DJ) company.

Dear Dr. Elhajj,

We have been in contact with a local DJ company, called DesiFX Sound Crew. This company specializes in professional DJ services and concert promotions for various functions, within the East Indian community.

For more information, please visit their existing website at: http://www.desifx.8m.com

Our proposal to enhance their website will consist of developing the following database applications:

A secure login screen for customers, where customers will have to contact DesiFX Sound Crew to obtain a username and password, prior to logging in.

The ability for an employee to view all of the bookings for reservations of services.

The ability for an employee to manage the entire music catalogue online by artist name, album title, song title, genre, format, language, and availability.

The ability for an employee to manage the users, in which users can be added or deleted, and be assigned as either an employee or customer.

The ability for a customer to reserve the services of the DesiFX Sound Crew for a specified date, time, and location.

The ability for a customer to create customized play-lists, in which songs can be added or deleted.

The ability for a customer to submit the reservation of services, along with the customized play-list corresponding to the reservation, for the DesiFX Sound Crew to retrieve/view at their convenience.

The programming languages we will be using are PHP and mySQL. We have chosen to use PHP since our applications will require a direct interface with the Internet, and PHP meets our requirements. Furthermore, we have chosen to use mySQL since using Oracle or DB2 would be out of scope for our database application, and also because of the resources available for us to work with.

5

Page 6: CPSC 471 - DesiFX Sound Crew Database

We are confident we will be able to successfully design and develop these applications for online usage by April 18, 2003. For further information or clarification, please feel free to contact us via our email addresses provided below.

Sincerely,

Nitin Puri 988955 Iram Shamim [email protected] [email protected]

2.0 Entity Relationship Diagram

6

UserPersonal Info

UsernamePassword

Name

Email Add.

Phone

num

D

Has

1 1 Type

Userid

Page 7: CPSC 471 - DesiFX Sound Crew Database

3.0 Logical Relational Diagram

User(userid, username, password, type)Song(id, album, title, availability, language, format, artist, genre)Personal_info(phone_num, email_add, name, userid)Booking(bno, day, month, year, time, location, userid)Playlist(playno, bno), Consists_of(playno, id), id references Song id.

4.0 Initial Draft of Functional Programming

As previously outlined in our proposal, our CPSC 471 project will be the creation of an online booking form, music catalogue, and play-list creation, for a local disc jockey (DJ) company. The functionalities will be:

A secure login screen for customers, where customers will have to contact DesiFX Sound Crew to obtain a username and password, prior to logging in.

7

Customer

Employee

Booking

Play List

Song

Bno

Time

Location

Availability

Language

Album

Title

Format

Genre

Artist

Has a

Has a

Consist of

Views

Manages

1

M

1

M

M

M

M

M

M

M

M

Playno

M

Date

Year

Month

Day

ID

Page 8: CPSC 471 - DesiFX Sound Crew Database

The ability for an employee to view all of the bookings for reservations of services.

The ability for an employee to manage the entire music catalogue online by artist name, album title, song title, genre, format, language, and availability.

The ability for an employee to manage the users, in which users can be added or deleted, and be assigned as either an employee or customer.

The ability for a customer to reserve the services of the DesiFX Sound Crew for a specified date, time, and location.

The ability for a customer to create customized play-lists, in which songs can be added or deleted.

The ability for a customer to submit the reservation of services, along with the customized play-list corresponding to the reservation, for the DesiFX Sound Crew to retrieve/view at their convenience.

4.1 Login Screen

From this screen, the user will enter the username and password, and the login function will access the database for username and password validity.

Our system will only have two types of users, an employee or customer. Upon successful login, the employee will then proceed to the employee screen, and the customer will then proceed to the booking screen.

4.2 Employee Screen

From this screen, the employee will be able to view all bookings, manage the music catalogue, and manage the users.

4.2.1 View All Bookings Screen

This screen will display all the bookings, with their respective times, dates, and a location, along with the customer to which each

booking belongs. The employee can also select a particular

8

Page 9: CPSC 471 - DesiFX Sound Crew Database

booking, and view the customized play-list corresponding to that booking.

The functionality of this screen is that every customized play-list is linked to the corresponding booking, which will be retrieved from the database. If the employee chooses to do so, they may also view the customized play-list, but they cannot edit the play-list. Only the customer may do this.

4.2.2 Music Catalogue Screen

This screen will contain search fields to be filled in, according to all the attributes of a song, which are: artist, album, title, format, language, genre, and availability. This screen will also contain three functionalities: add, delete, and view.

If add is selected, the database is updated with the all of attributes of the song, and upon successful addition to the database, a confirmation message will be displayed.

If delete is selected, the database will delete a song based on the artist and title attributes, and upon successful deletion from the database, a confirmation message will be displayed.

If view is selected, the database searches for the song(s) based on either the artist or genre attributes, respectively. If no attributes are filled, and view is selected, then the database will return all of the songs in the database.

4.2.3 Manage Users Screen

This screen will allow the employees to add or delete users. This screen will contain fields to be filled in for the user information attributes. These fields will be their full name, username, password, phone number, email address, and user type. The user type will either be an employee or customer.

4.3 Customer Screen

From this screen, the customer will be able to view all previous bookings, view all previous play lists, and make a new booking.

4.3.1 View Previous Bookings Screen

From this screen, the customer can view all previous bookings they have created. They can select a particular booking, and view its

9

Page 10: CPSC 471 - DesiFX Sound Crew Database

details. Furthermore, they also have the option to edit the booking information.

4.3.2 View Previous Play Lists Screen

From this screen, the customer can view all previous play lists they have created, for a particular booking. They can select a particular booking’s play list, and view its details. Furthermore, they also have the option to edit the play list information.

4.3.3 Make New Booking Screen

From this screen, the customer will enter the booking date, time, and location. The booking function will then check to make sure this booking is available. Upon successful creation of a booking, the customer will then be directed towards the creation of making play list. They will select songs from the music catalogue and add them to their play list. Upon completion, they will be asked to confirm their booking and play list, and it will then be submitted to the database for future retrieval by both the customer and employees.

5.0 User Manual

The following user manual instructions will describe the sequence and number of steps required in order to perform a task for our system. When the term “enter” is used, this is in reference to entering text in the appropriate fields, and when the term “click” is used, this is in reference to clicking a hyperlink or button within our system. The user manual section has four sub-sections, being the Generic Instructions, Employee Instructions, Customer Instructions, and Troubleshooting. The Generic Instructions apply to both types of users, which are employees and customers. Accordingly, the employee instructions are outlined within the Employee Instructions section, and the customer instructions are outlined within the Customer Instructions sections. Finally, the Troubleshooting section applies to possible troubleshooting both employees and customers may encounter when using the system.

5.1 Generic Instructions

These are the login and logout instructions that both users, employees and customers, must execute before using the system.

10

Page 11: CPSC 471 - DesiFX Sound Crew Database

5.1.1 Login into the DesiFX Online Party

Figure 1: Login

1. Enter in username and password in the appropriate fields.2. Click on the login button to login.

5.1.2 Logout of the DesiFX Online Party

11

Page 12: CPSC 471 - DesiFX Sound Crew Database

Figure 2: Employee Logout

12

Page 13: CPSC 471 - DesiFX Sound Crew Database

Figure 3: Customer Logout

1. The menu bar on the left side of the screen will always contain a logout link.

2. To logout out of DesiFX Online Party simply click on the logout link.

13

Page 14: CPSC 471 - DesiFX Sound Crew Database

5.2 Employee Instructions

It is assumed that the user has successfully logged in as an employee.

Figure 4: Employee Menu

14

Page 15: CPSC 471 - DesiFX Sound Crew Database

5.2.1 View all bookings

Figure 5: View All Bookings

1. To view all the bookings, click on the To View All Bookings link from the employee menu.

5.2.2 View a play list for a booking

15

Page 16: CPSC 471 - DesiFX Sound Crew Database

Figure 6: Select A Booking

Figure 7: View Play list for a Booking

1. Select the radio button corresponding to the booking from the booking list.

2. Click on the submit button to view the play list.3. Click on the OK button to return back to the booking list.

5.2.3 Manage the music catalogue

16

Page 17: CPSC 471 - DesiFX Sound Crew Database

Figure 8: Manage The Music Catalogue

1. To manage the music catalogue, click on the To Manage The Music Catalogue link from the employee menu.

5.2.4 Add a song to the music catalogue

17

Page 18: CPSC 471 - DesiFX Sound Crew Database

Figure 9: Add Song

Figure 10: Add Song Confirmation

1. Enter the artist name.2. Enter the title name.

18

Page 19: CPSC 471 - DesiFX Sound Crew Database

3. Enter the album name.4. Enter the language.5. Select the genre type from the pull down menu.6. Select the availability from the pull down menu.7. Select the format from the pull down menu. (VY = Vinyl, CS = Cassette, CD = compact disc, MP3= MP3 format)8. Click on the Add button to add the song.9. Once a song has successfully been added, a confirmation message will

appear. Click on the OK button to return back to managing the music catalogue.

5.2.5 Delete a song in the music catalogue

Figure 11: Delete Song

19

Page 20: CPSC 471 - DesiFX Sound Crew Database

Figure 12: Delete Song Confirmation

1. Enter the artist name.2. Enter the title name.3. Click on the Delete button to delete the song.4. Once a song has successfully been deleted, a confirmation message

will appear. Click on the OK button to return back to managing the music catalogue.

20

Page 21: CPSC 471 - DesiFX Sound Crew Database

5.2.6 View all songs in the music catalogue

Figure 13: View All Songs

21

Page 22: CPSC 471 - DesiFX Sound Crew Database

Figure 14: Viewing All Songs

1. Click on the View button.2. Once the music catalogue has been displayed, click on the OK button

to return back to managing the music catalogue.

22

Page 23: CPSC 471 - DesiFX Sound Crew Database

5.2.7 View a song by artist name in the music catalogue

Figure 15: View Songs By Artist

Figure 16: Viewing Songs By Artist

1. Enter the artist name.2. Click on the View button.3. Once the music catalogue has been displayed, click on the OK button

to return back to managing the music catalogue.

23

Page 24: CPSC 471 - DesiFX Sound Crew Database

5.2.8 View a song by genre type in the music catalogue

Figure 17: View Songs By Genre

Figure 18: Viewing Songs By Genre

1. Select the genre type from the pull down menu.2. Click on the View button.3. Once the music catalogue has been displayed, click on the OK button

to return back to managing the music catalogue.

24

Page 25: CPSC 471 - DesiFX Sound Crew Database

5.2.9 Manage the users

Figure 19: Manage Users

1. To manage the users, click on the To Manage The Users link from the employee menu.

25

Page 26: CPSC 471 - DesiFX Sound Crew Database

5.2.10 Add a user

Figure 20: Add A User

Figure 21: Add User Confirmation

26

Page 27: CPSC 471 - DesiFX Sound Crew Database

1. Enter the full name of the user.2. Enter the username.3. Enter the password.4. Enter the phone number.5. Enter the email address.6. Select user type from the pull down menu.7. Click on the Add button to add the user.8. Once the user has been successfully added, a confirmation message

will appear. Click on the OK button to return back to managing the users.

5.2.11 Delete a user

Figure 22: Delete A User

27

Page 28: CPSC 471 - DesiFX Sound Crew Database

Figure 23: Deletion User Confirmation

1. Enter the full name of the user.2. Enter the username.3. Click on the Delete button to delete the user.4. Once the user has been successfully deleted, a confirmation message

will appear. Click on the OK button to return back to managing the users.

28

Page 29: CPSC 471 - DesiFX Sound Crew Database

5.3 Customer Instructions

It is assumed that at the user has successfully logged in as a customer.

Figure 24: Customer Menu

29

Page 30: CPSC 471 - DesiFX Sound Crew Database

5.3.1 Make a new booking

Figure 25: Make a New Booking

1. To make a new booking, click on the Make A New Booking link from the customer menu.

30

Page 31: CPSC 471 - DesiFX Sound Crew Database

5.3.2 Enter new booking information

Figure 26: Enter Information For a New Booking

1. Select the booking date, month, and year from the pull down menus.2. Select a time block from the pull down menu.3. Enter location information.4. Click Submit to submit the booking.5. Click Clear to clear the booking.

31

Page 32: CPSC 471 - DesiFX Sound Crew Database

5.3.3 Make a play list

Figure 27: Make a play list

1. Select all songs by checking off the checkboxes next to each song.2. Click Submit to submit the play list.3. Click Clear to clear the play list.

32

Page 33: CPSC 471 - DesiFX Sound Crew Database

5.3.4 Confirmation

Figure 28: Confirm Booking

1. Select confirmation choice from the pull down menu.2. Click Submit to send the confirmation choice.

33

Page 34: CPSC 471 - DesiFX Sound Crew Database

5.3.5 View previous bookings

Figure 29: View Previous Booking

1. To view a previous booking, click on the View Previous Bookings link from the customer menu.

34

Page 35: CPSC 471 - DesiFX Sound Crew Database

5.3.6 Select Previous Booking

Figure 30: Select a Previous Booking

1. Select a particular booking to view by choosing the appropriate radio button.

2. Click Submit to submit selection.3. Click Clear to clear selection.

35

Page 36: CPSC 471 - DesiFX Sound Crew Database

5.3.7 Edit Previous Booking

Figure 31: Edit A Previous Booking

1. Select confirmation choice from the pull down menu.2. Click Submit to send the confirmation choice.3. If editing booking, please refer to 5.3.2 to review steps.

36

Page 37: CPSC 471 - DesiFX Sound Crew Database

5.3.8 View Previous Play Lists

Figure 32: View Previous Play Lists

1. To view a previous play list, click on the View Previous Play Lists link from the customer menu.

37

Page 38: CPSC 471 - DesiFX Sound Crew Database

5.3.9 Select Previous Play List

Figure 33: Select a Booking to View Play list

1. Select a particular play list to view by choosing the appropriate radio button.

2. Click Submit to submit selection.3. Click Clear to clear selection.

38

Page 39: CPSC 471 - DesiFX Sound Crew Database

5.3.10 Edit Previous Play List

Figure 34: Edit Play list

1. Select confirmation choice from the pull down menu.2. Click Submit to send the confirmation choice.3. If editing play list, please refer to 5.3.3 to review steps.

39

Page 40: CPSC 471 - DesiFX Sound Crew Database

6.0 Troubleshooting

This section describes any troubleshooting both employees and customers may encounter, and how the system will handle it.

6.1 Make A New Booking - Booking Already Exists

When the customer makes a new booking, if the booking date and time have already been booked, the system will notify the user of this and prompt the user to enter new booking information

6.2 Make A New Booking – No Confirmation

When the customer makes a new booking, if the customer chooses not to confirm the booking and play list, the system will prompt the user to start over by entering new booking and play list information

6.3 Managing The Music Catalogue – Empty Fields

When the employee tries to add a new song to the music catalogue without filling in all the fields for a song, the system will prompt the user to indicate that all the fields were not entered in.

6.4 Managing The Music Catalogue – Missing Artist, Title

When the employee tries to delete a song from the music catalogue without filling in the artist and title for the song, the system will prompt the user to indicate that the artist and title fields were not filled out.

6.5 Managing The Users – Missing Name, Username, Password

When an employee tries to add a new user to the system without entering in the Name, Username, or Password fields, the system will prompt the user to indicate that one or more the fields was not filling out.

7.0 System Requirements

Our system is a web-based database system. Users will need to have an Internet connection. and preferably use a browser such as Internet Explorer 6.0 or Netscape Navigator 5.0. Our source code uses HTML/ PHP pages, along with MySQL queries to a database. As such, our web-based database system will require a web-based server, such as Apache, along with PHP and MySQL server package environments to store the database and enable the PHP pages.

40

Page 41: CPSC 471 - DesiFX Sound Crew Database

8.0 Appendix

The following section includes all six of the tables used in our database, along with the relational instances we have used to populate our database:

8.1 Tables

The following MySQL statements were used to create the six tables used in our database:

create table `User`(`userid` int auto_increment not null,`password` varchar(20) not null,`username` varchar(20) not null,`type` enum("Employee", "Customer") not null default 'Employee',primary key(`userid`))type = innodb;

create table `Personal_info`(`userid` int not null,`phone_num` varchar(11) not null,`email_add` varchar(50),`name` varchar(30) not null,primary key(`userid`, `name`),foreign key(`userid`) references `User`(`userid`) on delete cascade on update cascade)type = innodb;

create table `Booking`(`bno` int auto_increment not null,`day` int not null,`month` int not null,`year` int not null,`time` time not null,`location` text,`userid` int not null,index `uid`(`userid`),primary key(`bno`),foreign key(`userid`) references `User`(`userid`) on delete cascade on update cascade)type = innodb;

create table `Playlist`(`playno` int auto_increment not null,`bno` int not null,primary key(`playno`),index `bno`(`bno`),foreign key(`bno`) references `Booking`(`bno`) on delete cascade on update cascade

41

Page 42: CPSC 471 - DesiFX Sound Crew Database

)type = innodb;

create table `Consists_of`(`playno` int not null,`id` int not null,primary key(`playno`, `id`),index `id`(`id`),index `play`(`playno`),foreign key(`playno`) references `Playlist`(`playno`) on delete cascade on updatecascade,foreign key(`id`) references `Song`(`id`) on delete cascade on update cascade)type = innod

create table `Song`(`id` int auto_increment not null,`album` text,`title` varchar(40) not null,`availability` enum("Available", "Not Available") not null default 'Available',`language` varchar(20),`format` enum("VY", "CS", "CD", "MP3") not null default 'CD',`artist` varchar(30) not null,`genre` enum("R&B","Hip-Hop","Rap","Dance","House","Garage","Indian Film","Indian Pop","Bhangra","Indian Remix","Indian Garage","Wedding","Other") not null default 'Other',primary key(`id`))type = innodb;

8.2 Relational Instances

The following MySQL statements were used to populate the six tables in our database:

insert User values(1, 'hello', 'iram', 'Employee'); insert User values(2, 'hello', 'nitin', 'Employee');insert User values(3, 'hello', 'sana', 'Customer');insert User values(4, 'hello', 'hanif', 'Customer');

insert Personal_info values(1, '605-8034', '[email protected]', 'Iram Shamim');insert Personal_info values(2, '616-2969', '[email protected]’', 'Nitin Puri');insert Personal_info values(3, '862-8530', '\0', 'Sana Shamim');insert Personal_info values(4, '681-4619', '[email protected]', 'HanifMohamed');

insert Booking values(1, '03', '05', '2003', '03:00', 'The house', 3); insert Booking values(2, '20', '06', '2005', '05:00', 'Community Center', 4);insert Booking values(3, '14' ,'01' ,'2004', '06:00', 'University', 3);

42

Page 43: CPSC 471 - DesiFX Sound Crew Database

insert Playlist values(1, 2);insert Playlist values(2,1);insert Playlist values(3,3);

insert Consists_of values(1, 2 );insert Consists_of values(1, 4);insert Consists_of values(1, 7);insert Consists_of values(2, 8);insert Consists_of values(2, 10);insert Consists_of values(3, 3);insert Consists_of values(3, 5);

insert Song values(1,'Full Moon', 'Full Moon', 'Available', 'English', 'VY', 'Brandy','R&B');insert Song values(2,'Full Moon', 'What About Us?', 'Available', 'English', 'CD','Brandy', 'R&B');insert Song values(3,'Dance For Me Remix', 'No More Drama', 'Available', 'English','CS', 'Mary J. Blige', 'Dance');insert Song values(4,'Eminem Show', 'Cleanin Out My closet', 'Not Available','English', 'MP3', 'Eminem', 'Rap');insert Song values(5,'Gimme The Light', 'Gimme The Light', 'Available', 'English','CD', 'Sean Paul', 'Dance');insert Song values(6,'Jugni', 'Star Crazy', 'Available', 'Punjabi', 'CD', 'Bally Sagoo','Bhangra');insert Song values(7,'Tera Chehra', 'Tera Chehra', 'Available', 'Hindi', 'CD','Adnam Sami', 'Indian Pop');insert Song values(8,'Sona Sona', 'MIB 2', 'Available', 'Punjabi','CD', 'MIB Crew', 'Indian Remix');insert Song values(9,'Bach Ke', 'PMC Live', 'Not Available', 'Punjabi', 'MP3', 'PMC', 'Bhangra');insert Song values(10,'Pyar Hogaya', 'Slave 2 Fusion', 'Available','Punjabi', 'VY', 'Stereo Nation', 'Indian Pop');

43