Database Systems: Design, Implementation, and Management

Download Report

Transcript Database Systems: Design, Implementation, and Management

14
Chapter 14
Databases in Electronic
Commerce
Database Systems: Design, Implementation, and
Management, Fifth Edition, Rob and Coronel
14
In this chapter, you will learn:
•
•
•
•
What electronic commerce (e-commerce) is
How e-commerce affects the new economy
About the different e-commerce styles
About the Internet architectural components
required to conduct electronic commerce
• About database design and implementation
issues for electronic commerce applications
• What Extensible Markup Language (XML) is and
why it is important
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
2
14
What is Electronic Commerce?
• Definition
– Bring new products, services, or ideas to market
– Support and enhance business operations
(including sales of products/services over the
Web)
•
•
•
•
Generally identified with Internet use
External evidence is corporate Web site
Prime revenue source
Not an end in itself
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
3
14
E-Commerce Impact
• Changed business environment
• New economy
• Benefits
– Ability to provide quick and convenient
comparison shopping
– 24X7X365 operations
– Global access
– Lower entry barriers
– Increased customer market knowledge
• Disadvantages
–
–
–
–
Hidden costs
Technology is not perfect
Thin profit margins
Security, loss of privacy, service levels, and legal
issues
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
4
14
E-Commerce Styles
Figure 14.1
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
5
14
E-Commerce Architecture
• Managerial issues
– Establishing partnerships
• Suppliers
• Distributors
• Vendors
– Design and development of business plans
• Technological issues
– Hardware and software
– Well-planned architecture
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
6
14
E-Commerce Architecture (Con’t.)
Figure 14.2
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
7
14
Internet Basic Services
•
•
•
•
•
•
•
•
•
Internet
TCP/IP
Router
WWW
Web Page
HTML
Hyperlink
URL
HTTP
•
•
•
•
•
•
•
•
Web Browser
Web Server
Web Site
Static Web Page
Dynamic Web Page
FTP
E-Mail
News and Discussion
Group Services
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
8
14
Internet Basic Services
Figure 14.3
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
9
14
Business Enabling Services
• Search Services
• Security
• Site Monitoring
and Data Analysis
• Load Testing,
Balancing, and
Web Caching
• Usability Testing
•
•
•
•
Personalization
Web Development
Database Integration
Transaction
Processing
• Content Management
• Messaging
• Wireless Device
Support
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
10
14
Security
• Procedures and technology uses
– Protection against accidental and intentional
access
– Warrantee identity of transaction’s participants
• Buyer
• Seller
– Protect transaction data from unauthorized
modifications during Internet travel
– Protect resources (data and computer)
• Customers’ personal data
• Privacy issues
• Property against criminal activities
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
11
14
Sample E-Commerce Transaction
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
Figure 14.4
12
14
Payment Processing
• Digital Cash
– Digital equivalent of hard cash
– Digital certificates verify identity of transaction
participants
– Low transaction costs
– Lack of customer acceptance
• Credit Card purchasing
– Most common for online purchasing
– Secure Electronic Transaction (SET)
• Electronic wallets
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
13
14
Database Design for E-Commerce
• Don’t reinvent the wheel
• No need for ‘new’ design techniques
• Scope
–
–
–
–
–
–
Facilitate sales of products and services
Show products and services
Conduct basic sales transactions
Customer service
Product returns
Web customer profiling
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
14
14
Basic Business Rules
• Sell products
– PRODUCT and CUSTOMER Tables
• Customer may place multiple orders
– 1:M relationship between CUSTOMER and ORDER
• Order contains multiple lines
– 1:M relationship between ORDER and ORDLINE
• Order lines refer to one product
– 1:M between PRODUCT and ORDLINE
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
15
14
Basic Business Rules (Con’t.)
• Customer browses catalog by category
– Each PRODUCT belongs to PRODTYPE
• Customer places products in shopping cart
– SHOPCART belongs to one CUSTOMER and
references one or more PRODUCTS
• Customer checks out and enters credit card and
shipping info
– Added to ORDER
• After credit card authorization order created
– SHOPCARD used to create ORDER with ORDLINEs
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
16
14
Basic Business Rules (Con’t.)
• Merchant offers shipping options
– SHIPOPTION stores details
• Merchant offers many payment options
– PMTOPTION stores details
• States may have different tax rates
– Stored in STATE and TAXRATE
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
17
14
CUSTOMER Table
• Details for each registered customer
• Some customers prefer not to register
• Primary table contents
–
–
–
–
–
–
Name and address information
Login information
Credit card information
Billing information
Shipping information
Membership type
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
18
14
PRODUCT Table
• Central entity in DB
• Some customers prefer not to register
• Primary table contents
–
–
–
–
–
–
Product details
URL of image
Vendor ID
Reorder
Pricing
Alternate item
• May need a PRODOPT table for options within a
particular product
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
19
14
ORDER Table
•
•
•
•
Contains all customer orders
After credit card approval order added to table
One row for each new order
Primary table contents
–
–
–
–
–
–
Order date
Customer ID
Payment and credit card information
Shipping info
Cost info
Status
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
20
14
PRODTYPE Table
• Describes product categories
• Multiple levels
• Primary table contents
– Product type name
– Product type parent
ORDLINE Table
Contains items in customer order
One product for each row
Primary table contents
Order ID
Product ID
Quantity
Tax
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
21
14
SHOPCART Table
• Temporarily store products during shopping activity
• Primary table contents
– Product ID
– Quantity
PMTTYPE Table
Payment information
Primary table contents
Payment name
Merchant ID used by processing systems
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
22
14
SHIPTYPE Table
• Stores different shipping option names
• Primary table contents
– Shipping name
– Cost
TAXRATE Table
Tax information
Primary table contents
Rate
State for that rate
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
23
14
STATE Table
• Stores state names
• Primary table contents
– State ID
– State name
PROMOTION Table
Stores information about promotions
Primary table contents
Promotion Name
Promotion details
Promotion pricing and quantity
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
24
14
PRICEWATCH Table
• Information about particular products customers hope to
buy when the price drops
• Primary table contents
– Customer information
– Product information
PRODPRICE Table
Manages multilevel pricing based on quantity
Primary table contents
Product
Quantity
Pricing information
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
25
14
Extensible Markup
Language (XML)
• Meta-language
• Represents and manipulates data elements
• Facilitates exchange of structured documents
over the Web
• World Wide Web Consortium (W3C) published
standard definition in 1998
• Allows definition of meta-tags to describe data
elements
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
26
14
XML Characteristics
• Allows definition of new tags
• Case sensitive
– Tags must be well-formed
– Proper nesting required
• Can use <-- and --> to enter comments
• XML or xml prefixes reserved for XML tags only
• Not a replacement for HTML
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
27
14
Contents of ProductList.xml
Figure 14.5
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
28
14
Document Type Definition (DTD)
• File with .dtd extension to describe XML
elements
• Provides composition of database’s logical
model
• Defines syntax rules for each XML document
• Defines valid tags
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
29
14
XML Schema
• Advanced data definition language used to
describe structure of XML documents
• Checks for database types
• Validates data for out-of-range values
• XML Schema Definition (XSD) file uses syntax
like XML document
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
30
14
Extensible Style Language (XSL)
• Specifies rules for display of XML data
• Two parts
– Extensible Style Language Transformation (XSLT)
• General mechanism to extract and process data from
one XML document and transform within another
– XSL style sheets
• Defines presentation rules applied to XML elements
• Describes formatting options for different XML
elements
• Limited browser support
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
31
14
Framework for XML Transformations
Figure 14.10
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
32
14
XML Applications
•
•
•
•
•
•
•
B2B exchanges
Legacy system integration
Web page development
Database support
Database meta-dictionaries
XML databases
XML services
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
33