Database Reference
In-Depth Information
Note You can find the commands in Listing 9-5 in the file named Chapter9/HR.sql .
Listing 9-5. Create an SMS Carrier Host Table
CREATE TABLE hr.sms_carrier_host
(
sms_carrier_cd VARCHAR2(32 BYTE) NOT NULL,
sms_carrier_url VARCHAR2(256 BYTE)
);
CREATE UNIQUE INDEX sms_carrier_host_cd_pk ON hr.sms_carrier_host
(sms_carrier_cd);
ALTER TABLE hr.sms_carrier_host ADD (
CONSTRAINT sms_carrier_host_cd_pk
PRIMARY KEY
(sms_carrier_cd)
USING INDEX sms_carrier_host_cd_pk
);
CREATE OR REPLACE VIEW hr.v_sms_carrier_host AS SELECT * FROM hr.sms_carrier_host;
After creating the table, you will want to pre-populate it with the addresses of the major carriers, and
any other carriers that are popular with your workforce. Be aware that some of the smaller cell-phone
providers piggyback on the major carrier's systems, especially phones from providers that are offered
strictly as pre-pay phones.
You can find comprehensive lists of provider's SMS gateways on the Internet. One fairly
comprehensive list can be found at http://en.wikipedia.org/wiki/List_of_SMS_gateways . I do not want
to promote any specific carrier, but offer these example addresses (URLs) in Listing 9-6 that you may
want to insert for your use.
Listing 9-6. Insert Sample SMS Carrier Host Entries
INSERT INTO hr.sms_carrier_host
( sms_carrier_cd, sms_carrier_url ) VALUES
( 'Alltel', 'message.alltel.com' );
INSERT INTO hr.sms_carrier_host
( sms_carrier_cd, sms_carrier_url ) VALUES
( 'AT_T', 'txt.att.net' );
 
Search WWH ::




Custom Search