-
Notifications
You must be signed in to change notification settings - Fork 0
Phase III (implementation) of class project for CMSC424
rampion/cmsc424-project-phaseiii
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Repository for rails implementation of phase III of the CMSC424 class project. Note: Data provided by IMDB for individual personal use only, MySQL installed by downloading mysql-5.0.77-osx10.5-x86.dmg - from http://mysql.mirrors.pair.com/Downloads/MySQL-5.0/ - install pkg, startupitem, prefpane & started server - !important! - use 32-bit - mysql.gem won't work with 64-bit gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config Sequence of commands thus far: % rails -d mysql dvd_club # create project % cd dvd_club # create the mysql database % rake db:create # create the tables % script/generate migration create_tables % vim db/migrate/20090503234102_create_tables.rb % rake db:migrate # add constraints and app-specific methods to models % vim app/models/{rental_plan,customer,purchase,rental,dvd,artist,genre}.rb # create the three default rental plans % script/generate migration default_plans % rake db:migrate # add the default plans # generate the DVD data from the IMDB data set % data/make-input.rb % rake db:add_new_dvd ... % script/generate migration load_dvds % mysqldump --user root dvd_club_development dvds artists genres appeared_in dvds_genres produced directors > db/migrate/20090514024013_load_dvds.sql % rake db:migrate # add 7000 records (created from mysqldump) # generate a view for easy indexing artist/dvd pairs % script/generate migration create_view_artists_dvds % rake db:migrate # create view artists_dvds % script/generate migration create_view_customers_dvds % rake db:migrate # create view customers_dvds # generate some customer activity... % mysqldump --user root dvd_club_development customers payments purchases rentals > db/migrate/20090515151922_load_customer_activity.sql # and if I change my mind % rake db:rollback # undo previous migration # admin commands % rake --help | grep 'admin:' # - add dvds # - generate unpopularity report # - ship dvds # - generate bills # - drop dvds # - receive returns # - recieve payments # TODO # open question: # - user w/ negative balance closes? # - should add inactive column? # - just do it # create a controller to handle welcome tasks # - login (existing user) # - register (new user) % script/generate controller welcome # create a controller to handle the user tasks # - drop membership # - dvd query # - purchase (add to cart, n copies)/ return # - rent / return % script/generate controller user Added table constraints, and join statements TODO: add tests
About
Phase III (implementation) of class project for CMSC424
Resources
Stars
Watchers
Forks
Releases
No releases published