to end-users to take responsibility <strong>for</strong> their experience with yourprogram.2.10 Database ExercisesWe're going to shift gears now into a portion of the problem setdesigned to teach you more about the RDBMS and SQL. See yoursupplement if you're using an RDBMS other than Oracle.To facilitate turning in your problem set, keep a text file transcript ofrelevant parts of your database session athttp://yourhostname.com/basics/db-exercises.txt.DB Exercise 1: SQL*Loader• Use a standard text editor to create a plain text filecontaining five lines, each line to contain your favorite stocksymbol, an integer number of shares owned, and a dateacquired (in the <strong>for</strong>m MM/DD/YYYY). Separate the fields oneach line with tabs.• create an Oracle table to hold these data:create table my_stocks (symbolvarchar(20) not null,n_shares integer not null,date_acquired date not null);• use the sqlldr shell command on Unix to invoke SQL*Loaderto slurp up your tab-separated file into the my_stocks tableDepending on how resourceful you are with skimmingdocumentation, this exercise can take 15 minutes or a lifetime. Thebook Oracle: The Complete Reference, discussed in the Moresection of this chapter is very helpful. You can also read aboutSQL*Loader in the official Oracle docs at http://otn.oracle.com/,typically in the Utilities book.DB Exercise 2: Copying Data from One Table to AnotherThis exercise exists because we found that, when faced with the taskof moving data from one table to another, programmers weredragging the data across SQL*Net from Oracle into their Web server,manipulating it in a Web script, then pushing it back into Oracle over• About the Application• About the Project• Sign-Offs• Assets DevelopedWe recommend you go through this <strong>for</strong>mally with your team at leastonce a week. You can also use it to structure introductory and updatemeetings with your client, though the worksheet is primarily <strong>for</strong> yourteam.About the OrganizationTo contribute to discussions about scope and which features arecritical, you need to understand what the client's organization is tryingto accomplish as a whole. It helps to know a bit not just aboutpurpose, but about size, resources, and trends in the organization's<strong>for</strong>tunes.It also helps to understand your client personally, and to understandhis/her place and influence in the organization. How much can be<strong>for</strong>ced through? What must be proven be<strong>for</strong>e the application will getsupport from higher management?Organization NameOrganization Purpose (does what? <strong>for</strong> whom?)Organization Size (#people? annual budget?)Organizational Per<strong>for</strong>mance (revenue/ profit/budget trend, actual vs. plan)Sponsor's Name, Title, and OrganizationalRole/ Level (person whose budget is paying <strong>for</strong>this, or who is accountable <strong>for</strong> business resultsthe application supports)Client's Name, Title, and Organizational Role/Level (person responsible <strong>for</strong> what getsdelivered)Business Goals Served by Application (doingexactly what "better, more, faster, cheaper",quantifiably how much?)Client Clout (leader, has say, follower?)42307
ReferencesEngagement ManagementSQL*Net. This is not the way! SQL is a very powerful language andthere is no need to bring in any other tools if what you want to do ismove data around within the RDBMS.This section was primarily authored by Cesar Brea.Most of this book is about building a great experience <strong>for</strong> the users.In parallel, however, it is important to ensure that you're creating agreat experience <strong>for</strong> your client and his or her sponsors during yourteam's engagement with this client. These are the folks who will paythe bills and sing your praises.Whether or not your praises get sung depends primarily on whetherthe application that you build delivers the benefits your client expects.Thus it is important at all times to keep in mind an answer to thequestion "What does my client expect?" One com<strong>for</strong>ting factor is thatyou have a lot of control over the client's expectations. You arepreparing the planning documents, you are writing the schedule, andyou are bringing agendas to meetings with clients.This chapter presents an engagement management worksheet, alightweight tool <strong>for</strong> managing your relationship with the client.Definitions:306• Organization - the company or non-profit corporation <strong>for</strong>whom you are building the application; if you're working <strong>for</strong>an enormous enterprise, e.g. a university or Fortune 500, itis probably best to put down a particular department ordivision as the organization• Sponsor - the person whose budget is paying <strong>for</strong> this, orwho is accountable <strong>for</strong> business results the applicationsupports; in some cases if you are working directly <strong>for</strong> thetop manager at a small organization the sponsor will be theboard of directors• Client - the manager, typically a subordinate of the sponsor,who is your day-to-day contactThe worksheet has five sections:• About the Organization• using only one SQL statement, create a table calledstock_prices with three columns: symbol, quote_date, price.Within this one statement, fill the table you're creating withone row per symbol in my_stocks. The date and pricecolumns should be filled with the current date and a nominalprice. Hint: select symbol, sysdate as quote_date, 31.415 asprice from my_stocks; .• create a new table:create table newly_acquired_stocks (symbol varchar(20) not null,n_shares integer not null,date_acquired date not null);• using a single insert into ... select ... statement (with aWHERE clause appropriate to your sample data), copyabout half the rows from my_stocks intonewly_acquired_stocksDB Exercise 3: JOINWith a single SQL statement JOINing my_stocks and stock_prices,produce a report showing symbol, number of shares, price per share,and current value.DB Exercise 4: OUTER JOINInsert a row into my_stocks. Rerun your query from the previousexercise. Notice that your new stock does not appear in the report.This is because you've JOINed them with the constraint that thesymbol appear in both tables.Modify your statement to use an OUTER JOIN instead so that you'llget a complete report of all your stocks, but won't get pricein<strong>for</strong>mation if none is available.DB Exercise 5: PL/SQLInspired by Wall Street's methods <strong>for</strong> valuing <strong>Internet</strong> companies,we've developed our own valuation method <strong>for</strong> this problem set: astock is valued at the sum of the ascii characters making up its43
- 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: Client Tenure In Job (new, mid-term
- 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 and 74: The trees chapter of SQL for Web Ne
- Page 75 and 76: );274-- ordering within a form, low
- 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