ObjectWeb Consortium
Print

Advanced Search - Powered by Google

  Consortium     Activities     Projects     Forge     Events 

RUBiS


Project Links
· Home
· Download
· Documentation
· Mailing List
· Experimental Results
· License
· History

Developers' Corner
· Getting Involved
· ObjectWeb Forge Site
· CVS Repository

About
· Contacts
· Team
· JMOB

Database description

  • Table users

CREATE TABLE users (

id INTEGER UNSIGNED NOT NULL UNIQUE AUTO_INCREMENT,
firstname VARCHAR(20),
lastname VARCHAR(20),
nickname VARCHAR(20) NOT NULL UNIQUE,
password VARCHAR(20) NOT NULL,
email VARCHAR(50) NOT NULL,
rating INTEGER,
balance FLOAT,
creation_date DATETIME,
region INTEGER,
PRIMARY KEY(id),
INDEX auth (nickname,password),
INDEX region_id (region)

);

  • Table items

CREATE TABLE items (

id INTEGER UNSIGNED NOT NULL UNIQUE AUTO_INCREMENT,
name VARCHAR(100),
description TEXT,
initial_price FLOAT UNSIGNED NOT NULL,
quantity INTEGER UNSIGNED NOT NULL,
reserve_price FLOAT UNSIGNED DEFAULT 0,
buy_now FLOAT UNSIGNED DEFAULT 0,
nb_of_bids INTEGER UNSIGNED DEFAULT 0,
max_bid FLOAT UNSIGNED DEFAULT 0,
start_date DATETIME,
end_date DATETIME,
seller INTEGER,
category INTEGER,
PRIMARY KEY(id),
INDEX seller_id (seller),
INDEX category_id (category)

);

  • Table categories

CREATE TABLE categories (

id INTEGER UNSIGNED NOT NULL UNIQUE AUTO_INCREMENT,
name VARCHAR(50),
PRIMARY KEY(id)

);

  • Table regions

CREATE TABLE regions (

id INTEGER UNSIGNED NOT NULL UNIQUE AUTO_INCREMENT,
name VARCHAR(20),
PRIMARY KEY(id)

);

  • Table bids

CREATE TABLE bids (

id INTEGER UNSIGNED NOT NULL UNIQUE AUTO_INCREMENT,
user_id INTEGER,
item_id INTEGER,
qty INTEGER,
bid FLOAT UNSIGNED NOT NULL,
max_bid FLOAT UNSIGNED NOT NULL,
date DATETIME
INDEX item (item_id),
INDEX user (user_id)

);

  • Table buy_now

CREATE TABLE buy_now (

id INTEGER UNSIGNED NOT NULL UNIQUE AUTO_INCREMENT,
buyer_id INTEGER UNSIGNED NOT NULL,
item_id INTEGER UNSIGNED NOT NULL,
qty INTEGER,
date DATETIME,
PRIMARY KEY(id),
INDEX buyer (buyer_id),
INDEX item (item_id)

);

  • Table comments

CREATE TABLE comments (

id INTEGER UNSIGNED NOT NULL UNIQUE AUTO_INCREMENT,
from_user_id INTEGER,
to_user_id INTEGER,
item_id INTEGER,
rating INTEGER,
date DATETIME,
comment TEXT
PRIMARY KEY(id),
INDEX from_user (from_user_id),
INDEX to_user (to_user_id),
INDEX item (item_id)

);


Copyright © 1999-2009, OW2 Consortium | contact | webmaster | Last modified at 2009-10-07 08:43 PM