cd collection hector urtubia fall 2002. summary motivation and objective technologies used project...

14
CD Collection Hector Urtubia Fall 2002

Upload: morgan-randall

Post on 13-Dec-2015

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: CD Collection Hector Urtubia Fall 2002. Summary Motivation and Objective Technologies Used Project Design Database Design and Integration Demo

CD Collection

Hector Urtubia

Fall 2002

Page 2: CD Collection Hector Urtubia Fall 2002. Summary Motivation and Objective Technologies Used Project Design Database Design and Integration Demo

Summary

Motivation and Objective Technologies Used Project Design Database Design and Integration Demo

Page 3: CD Collection Hector Urtubia Fall 2002. Summary Motivation and Objective Technologies Used Project Design Database Design and Integration Demo

Motivation and Objective

Hands-on project Gain experience on database design Project design and database integration To have a final product that is (somewhat)

useful To learn more about SQL

Page 4: CD Collection Hector Urtubia Fall 2002. Summary Motivation and Objective Technologies Used Project Design Database Design and Integration Demo

Technologies used

Programming Language:– PHP

Database Package– MySQL

Page 5: CD Collection Hector Urtubia Fall 2002. Summary Motivation and Objective Technologies Used Project Design Database Design and Integration Demo

PHP

PHP Hypertext Processor Very popular web scripting language

– Embedded into HTML– Fast development cycle

Open Source Fairly complete API Extensive database support

Page 6: CD Collection Hector Urtubia Fall 2002. Summary Motivation and Objective Technologies Used Project Design Database Design and Integration Demo

MySQL

Fast Relational Database Management System Uses SQL as its query language Open Source Multi-platform Interfaces to many languages: PHP, Perl,

Java, C, Python

Page 7: CD Collection Hector Urtubia Fall 2002. Summary Motivation and Objective Technologies Used Project Design Database Design and Integration Demo

Project Design

In short: A database of CD’s. Special features:

– CD’s classified by artist and country– Efficient search mechanism– User based

User privileges

– Ratings system– Interesting Reports based on collected data

Page 8: CD Collection Hector Urtubia Fall 2002. Summary Motivation and Objective Technologies Used Project Design Database Design and Integration Demo

Database Design: Main Tables

cd_id artist_id name Year description

date

cds

artistsartists_id name country_id description

countrycountry_id name

Page 9: CD Collection Hector Urtubia Fall 2002. Summary Motivation and Objective Technologies Used Project Design Database Design and Integration Demo

Database Design: User Tables

usersuser_id username password email session_id

user_privileges

user_id privilege

Page 10: CD Collection Hector Urtubia Fall 2002. Summary Motivation and Objective Technologies Used Project Design Database Design and Integration Demo

Database Design: Additional Tables

cd_viewscd_id user_id date

cd_ratingscd_id user_id text rating date

Page 11: CD Collection Hector Urtubia Fall 2002. Summary Motivation and Objective Technologies Used Project Design Database Design and Integration Demo

User Authentication

Client sends username, password pair Server sees if username,password pair match

the database.– No: do nothing– Yes: server sets cookie on client with user_id and a

randomly chosen session_id. Server also stores the session_id on the DB.

Page 12: CD Collection Hector Urtubia Fall 2002. Summary Motivation and Objective Technologies Used Project Design Database Design and Integration Demo

Seeing if a user is logged in

Server sees if cookies with the user_id and the session_id are stored on the client

If the user_id and session_id cookies match the ones on the DB, then the user is authentic

To log out a user, we must only set the session_id to NULL

Page 13: CD Collection Hector Urtubia Fall 2002. Summary Motivation and Objective Technologies Used Project Design Database Design and Integration Demo

Future Work

Extend the design to make it able to be a CD Shopping Store.

Reorganize some of the code and make more object oriented

Extend the design so it can not only have CD’s but arbitrary items

Page 14: CD Collection Hector Urtubia Fall 2002. Summary Motivation and Objective Technologies Used Project Design Database Design and Integration Demo

DEMO