Anda di halaman 1dari 3

Company

Title

Registration number

Auction System - Database design


Revision Page

PA1
Author Subject Update date

1(3)

Johan Wolff

2003-04-02

Auction System Database design


Overview
This document describes the database design of the Project Entropia Auction System.

Tables
auction_offer
Column auction_offer_id started ends start_price buy_out_price max_bid_price nbr_bids category_id id seller Type bigint timestamp timestamp bigint biginit bigint integer integer integer bigint Description Id of auction group Date and time when auction item was created Date and time when the auction will end The start price selected by the seller Buy out price (-1 if not used) Current highest bid Number of bids (-1 if auction has ended) Id of category inventory item belong to Id of inventory item Id of seller

Primary key is auction_offer_id. Index on seller. This table stores auctions. The term auction item is used in the Auction System to describe a single auction. The id of the auction item, auction_offer_id, is received from table stored_events when a new event is created, i.e. the event id and the auction item id is the same. The event is set to start when the auction is supposed to be closed.

auction_bidding
Column auction_offer_id bid_time bidder price status Type bigint timestamp bigint bigint character(1) Description Id of auction group Date and time when bid was placed Id of player with the highest bid Highest bid in PEC Status of players bid

Primary key is auction_offer_id and bid_time. Index on columns bidder. Foreign key on auction_offer(auction_offer_id). This table is used both to see which player has the highest bid, and to show the bidding history of an auction item. The status flag can have one of the following values:
Created Saved Printed Document name Title Page

03-02-26 11:44
MA Small v1.7

03-04-08 21:12

14-02-17 18:38

D:\Fraps\Oblivion 2\Old Auction and Society Documents\auction and society\auction\Dokument\Auction System DB Design.doc

Auction System Database design

1 (3)

Company

Title

Registration number

Auction System - Database design


Revision Page

PA1
Author Subject Update date

2(3)

Johan Wolff

2003-04-02

Status H W D C B S E I

Description The player has the highest bid (H = highest) The player does not have the highest bid, but money is still held deposited (W = waiting) The player does not have the highest bid and the player has received his deposit (D = deposit) Auction committed, waiting for seller and buyer to log on Buyer has received his item, seller has not received his money Seller has received his money, buyer has not received his item Auction has ended, seller has received his money, and buyer has received his item Auction invalid, the auction has been closed with no bidders

The status flags is used to see if the buyer has received his item, if the seller has received his payment and if the auction is ready for deletion. An auction item can only be deleted from the two tables if the seller and buyer have received the item and money respectively, and there are no other players with money in deposition, i.e. an auction item can only be deleted if the status is either E or I. The status flags C, B, S and E can only be set for the highest bid, i.e. the resulting bid of the auction.

inventory_reserved
Column id group_id module_id blob_size Type integer bigint integer integer Description

Primary key is id. Index on column group_id. Inventory items are moved from table inventory_carried to inventory_reserved when a player creates an auction item.

inventory_reserved_blobs
Column id group_id index blob Type Description integer bigint smallint varchar(8000)

Primary key is id. Index on column group_id.

Created

Saved

Printed

Document name

Title

Page

03-02-26 11:44
MA Small v1.7

03-04-08 21:12

14-02-17 18:38

D:\Fraps\Oblivion 2\Old Auction and Society Documents\auction and society\auction\Dokument\Auction System DB Design.doc

Auction System Database design

2 (3)

Company

Title

Registration number

Auction System - Database design


Revision Page

PA1
Author Subject Update date

3(3)

Johan Wolff

2003-04-02

Inventory item blobs are moved from table inventory_carried_blobs to inventory_reserved_blobs when a player creates an auction item.

Database diagram chart


auction_offer PK auction_offer_id started ends start_price buy_out_price max_bid_price nbr_bids category_id id seller BIGINT TIMESTAMP TIMESTAMP BIGINT BIGINT BIGINT INTEGER INTEGER INTEGER BIGINT PK PK,FK1 I1 auction_bidding bid_time auction_offer_id bidder price status TIMESTAMP BIGINT BIGINT BIGINT CHARACTER(1)

I1

inventory_reserved PK I1 id group_id module_id synchronized blob_size INTEGER INTEGER INTEGER CHARACTER(1) INTEGER PK I1

inventory_reserved_blobs id INTEGER

group_id INTEGER index INTEGER blob VARCHAR(8000)

Created

Saved

Printed

Document name

Title

Page

03-02-26 11:44
MA Small v1.7

03-04-08 21:12

14-02-17 18:38

D:\Fraps\Oblivion 2\Old Auction and Society Documents\auction and society\auction\Dokument\Auction System DB Design.doc

Auction System Database design

3 (3)

Anda mungkin juga menyukai