tailieunhanh - Beginning Database Design- P19

Beginning Database Design- P19:This book focuses on the relational database model from a beginning perspective. The title is, therefore, Beginning Database Design. A database is a repository for data. In other words, you can store lots of information in a database. A relational database is a special type of database using structures called tables. Tables are linked together using what are called relationships. You can build tables with relationships between those tables, not only to organize your data, but also to allow later retrieval of information from the database | Filling in the Details with a Detailed Design Seller seller_id INTEGER Category Hierarchy category_id INTEGER parent_id INTEGER category VARCHAR 32 Listing Currency ticker CHAR 3 currency VARCHAR 32 excha nge_rate FLOAT decimals SMALLINT listing CHAR 10 buyer_id INTEGER seller_id INTEGER category_id INTEGER ticker CHAR 3 description VARCHAR 32 image BLOB start_date DATE listing_days SMALLINT starting_price FLOAT bid_increment FLOAT reserve_price FLOAT buy_now_price FLOAT number_of_bids SMALLINT winning_price FLOAT seller VARCHAR 32 company VARCHAR 32 company_url VARCHAR 64 popularity_rating SMALLINT join_date DATE address_line_1 VARCHAR 32 address_line_2 VARCHAR 32 town VARCHAR 32 zip NUMBER 5 postal_code VARCHAR 32 country VARCHAR 32 return_policy VARCHAR 256 international_shipping SMALLINT payment_ payment_ payment_ payment_ payment_ payment_ payment_ payment_ payment_ payment_ payment_ History history_id INTEGER Bid _method_ method method method method method method method method method method _personal_check SMALLINT cashiers_check SMALLINT paypal SMALLINT western_union SMALLINT USPS_postal_ord SMALLINT international_p SMALLINT wire_transfer SMALLINT cash SMALLINT visa SMALLINT mastercard SMALLINT american express SMALLINT seller_id INTEGER buyer_id INTEGER comment_date DATE feedback_positive SMALLINT feedback_neutral SMALLINT feedback_negative SMALLINT Buyer buyer_id INTEGER listing CHAR 10 buyer_id INTEGER bid_price FLOAT proxy_bid FLOAT bid_date DATE buyer VARCHAR 32 popularity_rating SMALLINIT join_date DATE address_line_1 VARCHAR 32 _ J address_line_2 VARCHAR 32 town VARCHAR 32 zip NUMBER 5 postal_code VARCHAR 16 country VARCHAR 32 Figure 11-7 Defining field datatypes for the online auction house OLTP database model. All that has been done in Figure 11-7 is that the field datatypes have been specified. Because of limitations of the version of the database modeling tool in use and other software note the following in Figure 11-7 All variable length strings