您现在的位置: 军旅同心-旅游自驾-军旅文学 >> 读书赏析 >> 学习园地 >> 电脑网络 >> 技术文章 >> 正文
制作我们自己的Ebay(拍卖系统)(3)
作者:采集员 文章来源:来源于网络 点击数: 更新时间:2005-9-10 14:20:12
Based on the information in the previous section, we have a good understanding of what our database schema should look like. The following tables list our database structure:

tblAuctions
AID:Unique ID to keep track of records Autonumber
StartDate:Date the auction started Date/Time
EndDate:Date the auction is to end Date/Time
SellerID:The ID of the seller. (Foreign key to user table) Integer

tblAuctionItems
IID:Unique ID to keep track of records Autonumber
AID:Which auction does this item belong to? (Foreign key to Auctions table) Integer
Name: Name of the item being sold Text
Description: Description of the item being sold Text
MinPrice: Minimum price to sell (specified by the seller) Money
Increment: Value to increment proxy bids by (specified by the seller) Money
Available: Number of items available to sell Integer

tblAuctionBids
BID: Unique ID to keep track of records Autonumber
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
WinPrice :Current price for a user (calculated by application) Money
MaxBid: Maximum price for a user Money
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 time this bid was updated Date/Time   

tblAuctionUsers
UID :Unique ID to keep track of records Autonumber
Name :Name of user Text

Note that the above tables are simply used for example. You may decide to store more information for your purposes (i.e., you 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 other tables.


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


更多
免责声明:作品版权归所属媒体与作者所有!!本站刊载此文不代表同意其说法或描述,仅为提供更多信息。如果您认为我们侵犯了您的版权,请告知!本站立即删除。有异议请联系我们。
文章录入:烟灰缸    责任编辑:烟灰缸 
网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
| 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 网站地图 | 版权申明 | 网站公告 | 管理登录 |