Make our own ebay (auction system en)-The Auction Database

Source: Internet
Author: User
Tags date integer table definition unique id
Based on the "information in" previous section, we have a good understanding of what we database schemas should look lik E. The following tables list our database structure:


Tblauctions Tblauctionitems
AID Unique ID to keep track of records Autonumber IID unique ID to keep track of records
StartDate Date The auction started Date/time AID Which Auction Does this item belong to? (Foreign key to auctions table) Integer
EndDate Date The auction is to end Date/time name name of the item being sold Text
Sellerid the ID of the seller. (Foreign key to User table) Integer Description Description of the item being sold Text
Minprice Minimum Price to sell (specified by the seller)
Tblauctionbids Increment Value to Increment proxy bids by (specified by the seller)
BID Unique ID to keep track of records Autonumber Available # of items Available to sell Integer
IID Unique ID to keep track of items (foreign key to AuctionItem table) Integer
UID Unique ID to keep track of bidders (foreign key to Auctionusers table) Integer tblauctionusers
Winprice current price for a user (calculated by application) Money UID Unique ID to keep track of records Autonumber
Maxbid Maximum price for a user's name of user Text
Biditems the number of items this user bid for Integer
Winitems the number of items this user would win if the auction ended immediately Integer
Time the "Last" bid was updated Date/time

Note this above tables are simply used for example. You could decide to store more information for your purposes (i.e., your may store more than just a name in the user table). Already, however, the schema is getting kind of complex-each table has foreign keys to one or more.


Note:you can use a pre-existing user table if you wish. We simply provide the Tblauctionusers table definition for completeness sake.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.