Gathering requirements is a part of every software project, and the techniques apply whether your system is database-centric or uses no database at all. This section summarizes some general advice regarding requirements and specializes it for database-related ones.
Ambiguity
Ambiguity can make life interesting. Unless you enjoy the back-and-forth of angry users and
programmers, however, your goal in gathering requirements is to reduce ambiguity to the point where you can deliver a useful database design that does what people want.
As an example, consider the commonplace book. This was a collection of reference materials that Sherlock Holmes constructed to supplement his prodigious memory for facts. Some of the relevant Holmes quotations illustrate the basic requirements.
This passage summarizes the nature of the commonplace book:
"Kindly look her up in my index, Doctor," murmured Holmes without opening his eyes. For many years he had adopted a system of docketing all paragraphs concerning men and things, so that it was difficult to name a subject or a person on which he could not at once furnish information. In this case I found her biography sandwiched in between that of a Hebrew rabbi and that of a staff- commander who had written a monograph upon the deep-sea fishes.
"Let me see," said Holmes. "Hum! Born in New Jersey in the year 1858. Contralto—hum! La Scala, hum! Prima donna Imperial Opera of Warsaw—yes! Retired from operatic stage—ha! Living in London—quite so! Your Majesty, as I understand, became entangled with this young person, wrote her some compromising letters, and is now desirous of getting those letters back." [SCAN]
Not every attempt to find information is successful:
My friend had listened with amused surprise to this long speech, which was poured forth with extraordinary vigour and earnestness, every point being driven home by the slapping of a brawny hand upon the speaker's knee. When our visitor was silent Holmes stretched out his hand and took down letter "S" of his commonplace book. For once he dug in vain into that mine of varied information.
"There is Arthur H. Staunton, the rising young forger," said he, "and there was Henry Staunton, whom I helped to hang, but Godfrey Staunton is a new name to me."
It was our visitor's turn to look surprised. [MISS]
The following passage illustrates the biographical entries of people and their relationship to criminal organizations.
"Just give me down my index of biographies from the shelf."
He turned over the pages lazily, leaning back in his chair and blowing great clouds from his cigar. "My collection of M's is a fine one," said he. "Moriarty himself is enough to make any letter illustrious, and here is Morgan the poisoner, and Merridew of abominable memory, and Mathews, who knocked out my left canine in the waiting-room at Charing Cross, and finally, here is our friend of tonight."
He handed over the book, and I read:
Moran, Sebastian, Colonel. Unemployed. Formerly 1st Bangalore Pioneers. Born London, 1840. Son of Sir Augustus Moran, C.B., once British Minister to Persia. Educated Eton and Oxford. Served inJowaki Campaign, Afghan Campaign, Charasiab (dispatches), Sherpur, and Cabul. Author of Heavy Game of the Western Himalayas (1881), Three Months in the Jungle (1884). Address: Conduit Street. Clubs: The Anglo-Indian, the Tankerville, the Bagatelle Card Club. On the margin was written, in Holmes's precise hand:
The second most dangerous man in London. {EMPT]
Here is an example of the practical use of the commonplace book in criminal investigating: We both sat in silence for some little time after listening to this extraordinary narrative. Then Sherlock Holmes pulled down from the shelf one of the ponderous commonplace books in which he placed his cuttings.
"Here is an advertisement which will interest you," said he. "It appeared in all the papers about a year ago. Listen to this:
"Lost on the 9th inst., Mr. Jeremiah Hayling, aged twenty-six, a hydraulic engineer. Left his lodging at ten o'clock at night, and has not been heard of since. Was dressed in—"
etc. etc. Ha! That represents the last time that the colonel needed to have his machine overhauled, I fancy. [ENGR]
And here is another example, showing the way Holmes added marginal notes to the original item: Our visitor had no sooner waddled out of the room—no other verb can describe Mrs. Merrilow's method of progression—than Sherlock Holmes threw himself with fierce energy upon the pile of commonplace books in the corner. For a few minutes there was a constant swish of the leaves, and then with a grunt of satisfaction he came upon what he sought. So excited was he that he did not rise, but sat upon the floor like some strange Buddha, with crossed legs, the huge books all round him, and one open upon his knees.
"The case worried me at the time, Watson. Here are my marginal notes to prove it. I confess that I could make nothing of it. And yet I was convinced that the coroner was wrong. Have you no recollection of the Abbas Parva tragedy?"
"None, Holmes."
"And yet you were with me then. But certainly my own impression was very superficial. For there was nothing to go by, and none of the parties had engaged my services. Perhaps you would care to read the papers?" [VEIL]
Holmes also uses the commonplace book to track cases that parallel ones in which a client engages his interest:
"Quite an interesting study, that maiden," he observed. "I found her more interesting than her little problem, which, by the way, is a rather trite one. You will find parallel cases, if you consult my index, in Andover in '77, and there was something of the sort at The Hague last year. Old as is the idea, however, there were one or two details which were new to me. But the maiden herself was most instructive." [IDEN]
"The whole course of events," said Holmes, "from the point of view of the man who called himself Stapleton, was simple and direct, although to us, who had no means in the beginning of knowing the motives of his actions and could only learn part of the facts, it all appeared exceedingly complex. I have had the advantage of two conversations with Mrs. Stapleton, and the case has now been so entirely cleared up that I am not aware that there is anything which has remained a secret to us. You will find a few notes upon the matter under the heading B in my indexed list of cases. {HOUN]
Certain limitations of the commonplace book medium clearly limited the ways in which Holmes ordered his cases:
"Matilda Briggs was not the name of a young woman, Watson," said Holmes in a reminiscent voice. "It was a ship which is associated with the giant rat of Sumatra, a story for which the world is not yet prepared. But what do we know about vampires? Does it come within our purview either? Anything is better than stagnation, but really we seem to have been switched on to a Grimms' fairy tale. Make a long arm, Watson, and see what V has to say."
I leaned back and took down the great index volume to which he referred. Holmes balanced it on his knee, and his eyes moved slowly and lovingly over the record of old cases, mixed with the accumulated information of a lifetime.
"Voyage of the Gloria Scott," he read. "That was a bad business. I have some recollection that you made a record of it, Watson, though I was unable to congratulate you upon the result. Victor Lynch, the forger. Venomous lizard or gila. Remarkable case, that! Vittoria, the circus belle. Vanderbilt and the Yeggman. Vipers. Vigor, the Hammersmith wonder. Hullo! Hullo! Good old index. You can't beat it. Listen to this, Watson. Vampirism in Hungary. And again, Vampires in Transylvania." He turned over the pages with eagerness, but after a short intent perusal he threw down the great book with a snarl of disappointment.
"Rubbish, Watson, rubbish! What have we to do with walking corpses who can only be held in their grave by stakes driven through their hearts? It's pure lunacy." [SUSS]
These quotations show how Holmes constructed his commonplace books:
He took down the great book in which, day by day, he filed the agony columns of the various London journals. "Dear me!" said he, turning over the pages, "what a chorus of groans, cries, and bleatings! What a rag-bag of singular happenings! But surely the most valuable hunting-ground that ever was given to a student of the unusual! This person is alone and cannot be approached by letter without a breach of that absolute secrecy which is desired. How is any news or any message to reach him from without? Obviously by advertisement through a newspaper. There seems no other way, and fortunately we need concern ourselves with the one paper only. [REDC]
One winter's night, as we sat together by the fire, I ventured to suggest to him that, as he had finished pasting extracts into his commonplace book, he might employ the next two hours in making our room a little more habitable. [MUSG]
The first day Holmes had spent in cross-indexing his huge book of references. [BRUC]
As evening drew in, the storm grew louder and louder, and the wind cried and sobbed like a child in the chimney. Sherlock Holmes sat moodily at one side of the fireplace cross-indexing his records of crime,… [FIVE]
These passages from the Holmes canon illustrate both the painstaking nature of Holmes's approach to detection and the nature of ambiguity in requirements gathering. Holmes, despite his best efforts, was unable to conceive of his commonplace book system in unambiguous terms. "Voyage of the Gloria Scott," for example, as an entry in volume "V" seems a bit mysterious.
Ambiguity is a state in which you find multiple, conflicting interpretations of a text or situation. You create ambiguity when you state the requirements for your system or database that someone might interpret in different ways. Gause and Weinberg cite three specific kinds of ambiguity that are important for requirements gathering [Gause and Weinberg 1989]:
Missing Requirements: Needs that are a key part of resolving the differences in interpretation
Introduced elements: Words you put in the mouth of the stakeholder
In designing the commonplace book system, we have perhaps a bit less access to Holmes than we would ordinarily like, given his busy schedule and general terseness. This situation is certain to lead to missing requirements and introduced elements. With some persistence, we can work out the details. For example, in the quotations above, the system seems to require several types of fact:
Biographical facts: Facts relating to the history of individual people
Case history: Facts relating to the history of criminal cases from Holmes's work and cases of interest from around the world
Encyclopedia articles: Facts relating to things of interest to the consulting detective (vampires, for example, or gilas)
Classified advertisements: The agony columns where people advertise for lost family members or place communications to others
Periodical articles: Text from newspapers and magazines that contributes interesting facts relating to people, places, and events of interest to the consulting detective
With a little thought, you can see that there might be many more sources of information that are critical to the investigator. Did Holmes exclude these for a reason, or did they simply not come up in the conversation? What about Web articles? How about government data? What about information about corporations, limited partnerships, and other business entities? Television infomercials (relating to consumer fraud, for example, possibly on a large scale)?
Also, we have to infer from the quotations that the information in the commonplace book is not random or universal. But it seems difficult to make the direct claim that the book contains only those bits of fact that relate to things of interest to the detective. This is ambiguous both because the terms are ambiguous (what is of interest?) and because we are putting words in Holmes's mouth. How can we resolve these questions?