官术网_书友最值得收藏!

The Customer database

Examples in this chapter will use a database called CUSTOMERDB. This database contains tables to track customer and order information for a fictitious store. The database uses JavaDB for its RDBMS, since it comes bundled with GlassFish, but it can be easily adapted to any other RDBMS.

A script is included with this book's code download to create this database and pre-populate some of its tables. Instructions on how to execute the script, and add a connection pool and data source to access it are included in the download as well.

The schema for the CUSTOMERDB database is depicted in the following diagram:

As can be seen in the diagram, the database contains tables to store customer information such as name, address, and email address. It also contains tables to store order and item information.

The ADDRESS_TYPES table will store values such as "Home", "Mailing", and "Shipping", to distinguish the type of address in the ADDRESSES table; similarly, the TELEPHONE_TYPES table stores the "Cell", "Home", and "Work" values. These two tables are prepopulated when creating the database, as well as the US_STATES table.

For simplicity, our database only deals with U.S. addresses.

主站蜘蛛池模板: 巴塘县| 吉木萨尔县| 元朗区| 德兴市| 临湘市| 澳门| 肃南| 芜湖县| 安泽县| 五峰| 哈密市| 高雄市| 高密市| 巍山| 什邡市| 临清市| 荥经县| 剑河县| 苍梧县| 宝兴县| 乌恰县| 开平市| 德保县| 南和县| 那曲县| 孝义市| 枝江市| 崇礼县| 陈巴尔虎旗| 阿克苏市| 沭阳县| 怀宁县| 时尚| 岳西县| 宝丰县| 衡东县| 博白县| 诏安县| 泰宁县| 孟津县| 炎陵县|