Database for checking the Ebay historic data. Final Project for Stanford course: Introduction to Database (CS 145)
Technologies and tools used: Python, SQLite, Flask, Bootstrap.
Author: Yimeng Li
Website: http://yimengli.me/
Using Given DTD file to validate the xml data.
$ xmllint --valid --noout items-*.xml
- Users(User_ID, Rating, Location, Country)
- Items(Item_ID, Seller_ID, Name, Buy_Price, First_Bid, Currently, Number_of_Bids, Started, Ends, Description)
- Categories(Item_ID, Category)
- Bids(Item_ID, User_ID, Time, Amount)
- Finish
parser.py
. Use Command:
python parser.py data/items-*.xml
to generate bids.dat
, items.dat
, users.dat
, categories.dat
.
- Use unix tool to eliminate duplicates.
$ sort bids.dat | uniq > bids_uniq.dat
$ sort items.dat | uniq > items_uniq.dat
$ sort users.dat | uniq > users_uniq.dat
$ sort categories.dat | uniq > categories_uniq.dat
- Create the
auctionbase.sqlite
database using
$ sqlite3 auctionbase.sqlite
-
Finish
create.sql
,drop.sql
andload.txt
to automate the table creation and data bulk-loading processes. -
By running the
$ sqlite3 auctionbase.sqlite < create.sql
$ sqlite3 auctionbase.sqlite < load.txt
The data would be imported from bids_uniq.dat
, items_uniq.dat
, users_uniq.dat
, categories_uniq.dat
to auctionbase.sqlite
.
Finish several SQL
queries to verify the correctness of above steps. Example:
$ sqlite3 auctionbase.sqlite < db/query7.sql
150
Create CurrentTime table: time.sql
, and load it into auctionbase.sqlite
database.
sqlite3 auctionbase.sqlite < time.sql
- Registration/Login/Logout/Personal Profile
- Ability to manually change the "current time". (FINISHED)
- Ability for auction users to enter bids on open auctions. (FINISHED)
- Ability to browse auction of interest based on the following input parameters: (FINISHED)
- item ID
- category
- item description
- price
- open/closed status
- Ability to view all relevant information pertaining to a single auction. This should be displayed on an individual webpage, and it should display all of the information in your database pertaining to that particular item. In particular, this page should include: (FINISHED)
- the auction's open/close status
- the acution's bids. You should also display all relevant information for each bid, including:
- the name of bidder
- the time of the bid
- the price of the bid
- if the auction is closed, it should display the winner of the auction
- Check all the constraints
- Support Pagination (FINISHED)
- Host on Digital Ocean (FINISHED)
- Friendly UI
- Support place items