|
|
The MIMER_STORE_WEB Schema
This schema provides some of the SQL functionality required to create a Web-based application to order items.
The ident-name in the AUTHORIZATION clause is currently restricted to be the name of the current ident.
The basic idea behind a Web application would be two tabs, one for Music and the other for Books. The relevant SEARCH routine provides a list of matches (one of the details returned is the ITEM_ID). The user would then have the ability to drill down to display further information (use MIMER_STORE_MUSIC.TitleDetails and MIMER_STORE_MUSIC.TrackDetails for music items and MIMER_STORE_BOOK.TITLE_DETAILS for book items.
If an item is selected for purchase (the quantity should be prompted for) and MIMER_STORE_WEB.ADD_TO_BASKET used to order the item (a blank SESSION_ID defines a new session). Once a session has been created the basket can be viewed using MIMER_STORE_WEB.VIEW_BASKET.
When an order has been completed the user needs to be identified by their e-mail and password (MIMER_STORE_WEB.VALIDATE_CUSTOMER) and then a call should be made to MIMER_STORE_WEB.PLACE_ORDER.
Tables
Table name
Description
SESSIONS Maps an external session identifier with an internal order identifier.Keeps track of the date/time that the 'basket' was last accessed.PSM Routines
Triggers
There is a statement trigger that will fire after an update to the SESSIONS table. The trigger is designed to prevent any changes to the values of the SESSION_NO and ORDER_ID columns. This demonstrates that a trigger can be used to abort an SQL update operation.
Idents
A synonym is created by MIMER_STORE for the SESSIONS tables in the MIMER_STORE_WEB schema.
A new user ident, MIMER_WEB, is created to allow Web-applications execute privilege on certain of the PSM routines.
|
Mimer Information Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 info@mimer.se |
|
|