After a few weeks online, someone says "wouldn't it be nice to seethe user's picture and hyperlink through to his or her home page?"create table users (user_id integer primary key,first_names varchar(50),last_name varchar(50) not null,emailvarchar(100) not null unique,password varchar(30) not null,-- user's personal homepage elsewhere-- on the <strong>Internet</strong>url varchar(200),registration_date timestamp(0),-- an optional photo;-- if Oracle Intermedia Image is installed-- use the image datatype instead of BLOBportrait blob);After a few more months ...create table users (user_id integer primary key,first_names varchar(50),last_name varchar(50) not null,emailvarchar(100) not null unique,password varchar(30) not null,-- user's personal homepage elsewhere-- on the <strong>Internet</strong>url varchar(200),registration_date timestamp(0)-- an optional photo;-- if Oracle Intermedia Image is installed-- use the image datatype instead of BLOBportrait blob,-- with a 4 GB maximum, we're all set-- <strong>for</strong> Life of Johnsonbiography clob,birthdate date,-- current politically correct column name-- would be "gender"-- but data models often outlive-- linguistic fashion so-- we stick with more established usageSex char(1) check (sex in ('m','f')),In addition to the metadata-driven object table definitions your scriptshould define a generalized mapping table to support links betweenknowledge objects. Here's an Oracle-syntax example:create table km_object_object_map (object_id_a integer not null,object_id_b integer not null,-- the objects are uniquely identified above but let's-- save ourselves-- hassle by recording in which tables to find themtable_name_a not nullreferences km_metadata_object_types,table_name_b not nullreferences km_metadata_object_types,-- User-entered reason <strong>for</strong> relating two objects, e.g.-- to distinguish between John McCarthy the developer-- of Lisp and Gerry Sussman and Guy Steele, who added-- lexical scoping in the Scheme dialectmap_comment varchar(4000),creation_user not null references users,creation_date date default sysdate not null,primary key (object_id_a, object_id_b));Notice that this table allows the users to map an object to any otherobject in the system, regardless of type.For simplicity, assume that associations are bidirectional. Supposethat a knowledge author associates the Huffman encoding algorithm(used in virtually every compression scheme, including JPEG) withthe person David A. Huffman (1925-1999; an MIT graduate studentat the time of his invention, which was submitted as a term paper).We should also interpret that to mean that the person David A.Huffman is associated with the algorithm <strong>for</strong> Huffman encoding. Thisis why the columns in km_object_object_map have names suchas "object_id_a" instead of "from_object".In an Oracle database, the primary key constraint above has the sideeffect of creating an index that makes it fast to ask the question"What objects are related to Object 17, where Object 17 happens toappear in the A slot?". For efficiency in querying "What objects arerelated to Object 17, where Object 17 happens to appear in the Bslot?", create a concatenated index on the columns in the reverseorder from that of the primary key constraint.74275
);274-- ordering within a <strong>for</strong>m, lower number = higher on-- page<strong>for</strong>m_sort_key integer,-- if there are N <strong>for</strong>ms, starting with 0, to define-- this object, on which does this go? (relevant <strong>for</strong>-- very complex objects where-- you need more than one page to submit)<strong>for</strong>m_number integer,-- <strong>for</strong> full text indexinclude_in_ctx_index_p char(1)check (include_in_ctx_index_p in ('t','f')),-- add <strong>for</strong>ms should be prefilled with the default-- valuedefault_value varchar(200),check ((abstract_data_type not in ('user')and oracle_data_type is not null)or(abstract_data_type in ('user'))),unique(table_name,column_name)15.5 Exercise 3: Write a Program to Generate DDLStatementsBegin an admin interface to your km module, starting with a pagewhose URL ends in "ddl-generate". This should be a script that willgenerate CREATE TABLE (data definition language) statements fromthe metadata tables. You'll want to have a look at the SQL be<strong>for</strong>efeeding it to the RDBMS and there<strong>for</strong>e you may wish to write yourscript so that it simply outputs the DDL statements to the Webbrowser with a MIME type of text/plain. You can save this to yourlocal file system as km-generated.sql and feed it to your SQLclient when you're satisfied.In addition to the housekeeping elements that you've defined <strong>for</strong> yourapplication, each object table should have an object_id column. Thevalue of this column should be unique across all of the tables in thekm module, which is easy to do in Oracle if you use a singlesequence to generate all the keys. Given unique object IDs acrosstypes, if you were to add a km_object_registry table you'd beable to publish cleaner URLs that pass around only object IDs ratherthan object IDs and types.country_code char(2) referencescountry_codes(iso),postal_code varchar(80),home_phone varchar(100),work_phone varchar(100),mobile_phone varchar(100),pagervarchar(100),fax varchar(100),aim_screen_namevarchar(50),icq_number varchar(50));The table just keeps getting fatter. As the table gets fatter, more andmore columns are likely to be NULL <strong>for</strong> any given user. With Oracle9i you're unlikely to run up against the hard database limit of 1000columns per table. Nor is there an storage efficiency problem. Nearlyevery database management system is able to record a NULL valuewith a single bit, even if the column is defined char(500) or whatever.Still, something seems unclean about having to add more and morecolumns to deal with the possibility of a user having more and morephone numbers.Medical in<strong>for</strong>maticians have dealt with this problem <strong>for</strong> many years.The example above is referred to as a "fat data model." In thehospital world you'll very likely find something like this <strong>for</strong> storingpatient demographic and insurance coverage data. But <strong>for</strong> laboratorytests the fat approach begins to get ugly. There are thousands ofpossible tests that a hospital could per<strong>for</strong>m on a patient. New testsare done every day that a patient is in the hospital. Some hospitalshave experimented with a "skinny" data model <strong>for</strong> lab tests. The tablelooks something like the following:create table labs (lab_idinteger primary key,patient_id integer not null referencespatients,test_date timestamp(0),test_name varchar(100) not null,test_units varchar(100) not null,test_value number not null,note varchar(4000));-- make it fast to query <strong>for</strong>-- "all labs <strong>for</strong> patient #4527"-- or "all labs <strong>for</strong> patient #4527,75
- Page 1 and 2:
SoftwareEngineering forInternetAppl
- Page 3 and 4:
Signature: ________________________
- Page 5 and 6:
end-users. We use every opportunity
- Page 7 and 8:
• availability of magnet content
- Page 9 and 10:
• we want to see if a student is
- Page 11 and 12:
you supply English-language queries
- Page 13 and 14:
What to do during lecturesWe try to
- Page 15 and 16:
The one-term cram courseWhen teachi
- Page 17 and 18:
332• spend a term learning how to
- Page 19 and 20:
Once we've taught students how to b
- Page 21 and 22:
has permission to perform each task
- Page 23 and 24: UDDIUnixcustomer's credit card. If
- Page 25 and 26: thousands of concurrent users. This
- Page 27 and 28: OraclePerlnamed XYZ" without the pr
- Page 29 and 30: LDAPLinuxbits per color, a vastly s
- Page 31 and 32: FilterFirewallFlat-fileGIF318functi
- Page 33 and 34: when there is an educational dimens
- Page 35 and 36: system. The authors of the core pro
- Page 37 and 38: Sign-OffsTry to schedule comprehens
- Page 39 and 40: scheduling goals that both you and
- Page 41 and 42: Client Tenure In Job (new, mid-term
- Page 43 and 44: ReferencesEngagement ManagementSQL*
- Page 45 and 46: Decision-makers often bring senior
- Page 47 and 48: presentation to a panel of outsider
- Page 49 and 50: 300always been written by programme
- Page 51 and 52: 17.3 Professionalism in the Softwar
- Page 53 and 54: Try to make sure that your audience
- Page 55 and 56: Chapter 17WriteupIf I am not for my
- Page 57 and 58: Suppose that an RDBMS failure were
- Page 59 and 60: analysis programs analyzing standar
- Page 61 and 62: at 9 hours 11 minutes 59 seconds pa
- Page 63 and 64: found" will result in an access log
- Page 65 and 66: 15.18 Time and MotionThe team shoul
- Page 67 and 68: select 227, 891, 'algorithm', curre
- Page 69 and 70: create table km_object_views (objec
- Page 71 and 72: • object-create• object-display
- Page 73: The trees chapter of SQL for Web Ne
- Page 77 and 78: and start the high-level document f
- Page 79 and 80: Example Ontology 2: FlyingWe want a
- Page 81 and 82: systems. What would a knowledge man
- Page 83 and 84: spreadsheet". Other users can comme
- Page 85 and 86: Chapter 15Metadata (and Automatic C
- Page 87 and 88: {site url}{site description}en-usCo
- Page 89 and 90: drawing on the intermodule API that
- Page 91 and 92: At this point you have something of
- Page 93 and 94: • description• URL for a photo
- Page 95 and 96: Here's a raw SOAP request/response
- Page 97 and 98: Chapter 14Distributed Computing wit
- Page 99 and 100: conduct programmer job interviews h
- Page 101 and 102: Most admin pages can be excluded fr
- Page 103 and 104: content that should distinguish one
- Page 105 and 106: Chapter 13Planning ReduxA lot has c
- Page 107 and 108: the Internet-specific problem of no
- Page 109 and 110: wouldn't see these dirty tricks unl
- Page 111 and 112: 12.8 Exercise 4: Big BrotherGeneral
- Page 113 and 114: than one call to contains in the sa
- Page 115 and 116: A third argument against the split
- Page 117 and 118: way 1 1/16One might argue that this
- Page 119 and 120: absquatulate 612bedizen 36, 9211cry
- Page 121 and 122: What if the user typed multiple wor
- Page 123 and 124: Chapter 12S E A R C HRecall from th
- Page 125 and 126:
long as it is much easier to remove
- Page 127 and 128:
features that are helpful? What fea
- Page 129 and 130:
made it in 1938)? Upon reflection,
- Page 131 and 132:
environment, we identify users by t
- Page 133 and 134:
those updates by no more than 1 min
- Page 135 and 136:
Balancer and mod_backhand, a load b
- Page 137 and 138:
translation had elapsed--the site w
- Page 139 and 140:
It seems reasonable to expect that
- Page 141 and 142:
11.1.5 Transport-Layer EncryptionWh
- Page 143 and 144:
such as ticket bookings would colla
- Page 145 and 146:
give their site a unique look and f
- Page 147 and 148:
It isn't challenging to throw hardw
- Page 149 and 150:
Chapter 11Scaling GracefullyLet's l
- Page 151 and 152:
10.15 Beyond VoiceXML: Conversation
- Page 153 and 154:
Consider that if you're authenticat
- Page 155 and 156:
In this example, we:194• ask the
- Page 157 and 158:
As in any XML document, every openi
- Page 159 and 160:
(http://www.voicegenie.com). These
- Page 161 and 162:
Chapter 10Voice (VoiceXML)questions
- Page 163 and 164:
9.15 MoreStandards information:•
- Page 165 and 166:
9.14 The FutureIn most countries th
- Page 167 and 168:
9.10 Exercise 7: Build a Pulse Page
- Page 169 and 170:
9.6 Keypad HyperlinksLet's look at
- Page 171 and 172:
text/xml,application/xml,applicatio
- Page 173 and 174:
Protocol (IP) routing, a standard H