create table if not exists League (

lid int primary key auto_increment,   
   lyear int not null,
   season varchar(10) not null,
   title varchar(30) not null
);

create table if not exists tb_test
(
    id int primary key auto_increment,
    name varchar(200) not null,
    salary float(11,2),
    birthday date,
    sex varchar(5),
    sleep time,
    ts timestamp,
    description text,
    picture blob
);

create table if not exists Player (
   pid int primary key auto_increment,
   name varchar(30) not null,
   address varchar(30) not null,
   city varchar(20) not null,
   email varchar(40) not null
);

--
-- This table represents the relationship between leagues and players.
--
create table if not exists Registration (
   lid int not null,
   pid int not null,
   division varchar(20) not null,
   league_lid int not null,
   player_pid int not null,
   primary key (lid, pid)
);

create table if not exists AdminUser (
   uid int primary key auto_increment,
   username varchar(20) not null,
   password varchar(20) not null
);

-- Create the initial set of leagues.
INSERT INTO League (lid, lyear, season, title) VALUES (1, 2008, 'Spring', 'Soccer League (Spring ''08)');
INSERT INTO League (lid, lyear, season, title) VALUES (2, 2008, 'Summer', 'Summer Soccer Fest 2008');
INSERT INTO League (lid, lyear, season, title) VALUES (3, 2008, 'Fall', 'Fall Soccer League (2008)');
INSERT INTO League (lid, lyear, season, title) VALUES (4, 2009, 'Spring', 'Soccer League (Spring ''09)');
INSERT INTO League (lid, lyear, season, title) VALUES (5, 2009, 'Summer', 'The Summer of Soccer Love 2009');
INSERT INTO League (lid, lyear, season, title) VALUES (6, 2009, 'Fall', 'Fall Soccer League (2009)');

-- Insert the basic AdminUser.
INSERT INTO AdminUser (uid, username, password) VALUES (100, 'admin', 'admin');
INSERT INTO AdminUser (uid, username, password) VALUES (101, 'jack', 'admin');

Performance

  • Tier:
    • In presentation tier, business tier and integration tier, use load balancing.
    • In business tier, use a stateless session Bean pooling mechanisms.
    • In SessionFaca control level, choose ReadCommited transaction to improve the transaction processing speed and avoid the dirty data.
    • In JMS implementation, use asynchronous communication, store-and-forward mechanism.
    • Using BusinessDelegate and set up the cache, according to the shooting, especially to the offer and the product.
    • Use the ServiceLocator, conducive to the JNDI lookup.
  • Layer:
    • Use high-performance servers, increase the number of CPUs to equal or more than four.
    • Do pressure test to find out whether the servers meet the performance requirements
    • Find out performance bottlenecks if the performance requirement is not satisfied.

Availability

  • Tier:
    • Set up load balancing and use Session Copy inn presentation tier, business tier and resource tier.
    • Use Oracle/RAC technology in resource tier.
    • Redundent network connections

Reliability

  • Tier:
    • Using JMS asynchronous communication technology, control the transaction in the SessionFaca.
    • Choose ReadCommited transaction level, improve things to deal with both speed and avoid the dirty data.
    • Use cluster failover in presentation tier and business tier.
    • In the resource layer using RAC, RAC is a mature product to provide good support for reliability.

Scalability

  • Tier:
    • Set load balancing for each tier.
    • In business tier, use a stateless session Bean pooling mechanisms.
    • Use Session Affinity and Session Copy on web server
    • Use Off-Load Shared Resources on application server

Security

  • Tier:
    • In the Web and EJB tier, use JAAS.
    • Set the roles of seller, buyer and Auction Market etc., assign relative permissions to each role.
    • Use UID and password for logging in.
    • Set resource access control in the tiers.
  • Layer:
    • The Lower Playform layer use Linux operating
      system, and set up the firewall and SSL.

• 
Replication

• 
Load balance

• 
Failover

• 
Off-load shared resources

• Forward cache

• Request prefetch

• Request short circuit

• Session affinity

SoccerLeagueDB的更多相关文章

随机推荐

  1. Shell echo命令

    Shell echo命令 echo "It is a test" 这里的双引号完全可以省略 .显示变量 read 命令从标准输入中读取一行,并把输入行的每个字段的值指定给 shel ...

  2. 微信公众平台应用开发框架sophia设计不足(1)

    设计一个小框架考虑的东西真不少,每一样都不easy: 1.既要解决当前技术的不足: 2.又要方便他人使用(基本的目的). 3.同一时候又要设计得优雅.easy扩展. sophia一開始设计用来支持智能 ...

  3. oracle在desc表时,name 和type列不能格式化问题(占位过长)

    今天玩Oracle的时候,遇到一个让人很无语的问题,我desc表的时候,总是发现name列和type 列占位太多, 无法很直观明白的显示出来各个列值,就像下面的样子: 这样让人很不舒服,当然,一看到列 ...

  4. 模拟new实例化对象。

    使用new和字面量的的方法是两种主流创建对象的方法,两种最终都能达到同样的实例化的对象,本章主要围绕new关键字来实例化一个对象并且讲一个不使用new但是完全与new实例化对象相同的例子. 在使用ne ...

  5. winDbg 命令使用帮助

    srv*C:/symbol*http://msdl.microsoft.com/download/symbols;D:\Desktop\CMS_Dump symck //检查pdblm //显示pdb ...

  6. Python Object Graphs — objgraph 1.7.2 documentation

    Python Object Graphs - objgraph 1.7.2 documentation Python Object Graphs¶ objgraph is a module that ...

  7. 字符编码详解 good

    字符编码详解 字符编码详解

  8. 开源mp3播放器--madplay 编译和移植 简记

    madplay是一款开源的mp3播放器. http://madplay.sourcearchive.com/ 下面简单记录一下madplay的编译与移植到ARM开发板上的过程 一.编译x86版本的ma ...

  9. android 在你的UI中显示Bitmap - 开发文档翻译

    由于本人英文能力实在有限,不足之初敬请谅解 本博客只要没有注明“转”,那么均为原创,转贴请注明本博客链接链接 Displaying Bitmaps in Your UI 在你的UI中显示Bitmap ...

  10. C++ 多态性分析

    编译 - 时间多态性--函数重载 编译后的中间代码(例如GCC产生.o文件.此时还不是汇编语言)函数名字有变化,看以下两个样例. void cc_show(const char*str)     -& ...