Elementary, Dear Data (episode)

The Enterprise is threatened when a character in Data and La Forge's holodeck simulation becomes sentient.

Summary
The USS Enterprise (NCC-1701-D) is awaiting the arrival of the USS Victory. Data is then summoned to engineering, where Geordi La Forge's assistants tells Data that he's with the Victory, which puzzles Data. Data then walks over and inquires about the Victory, since it is not here yet. La Forge shows Data a model, a replica of the original HMS Victory, which he intends to give to Captain Zimbata, with whom La Forge served as an ensign.

After that, La Forge gives Data a smoking pipe and invites him to take part in a Sherlock Holmes holographic story. Data, who has memorized all of Arthur Conan Doyle's stories of Sherlock Holmes, instantly recognizes the story (Scandal in Bohemia) after only the first few moments, and immediately solves the case. La Forge abruptly freezes the program and storms out of the holodeck.

Talking over the incident in Ten Forward, La Forge and Data are overheard by Dr. Katherine Pulaski, who states that Data is incapable of solving a real mystery. Data takes this as a challenge, and invites Pulaski to join La Forge and him in another Holmes story. This time, the computer is instructed to create a new mystery in the Holmes style. This is less than successful, however, because the computer merely combines elements of the existing Holmes stories in a way that Data is again easily able to solve.

La Forge makes another try, however, and carefully instructs the computer to create a story and a character capable of defeating Data. The new program runs and the three are off on their new adventure. The story takes an unexpected twist when Dr. Pulaski is actually kidnapped by Sherlock Holmes' arch-enemy, Professor James Moriarty, who was somehow imbued with a measure of consciousness and witnessed the use of the holodeck arch.

Moriarty desires to learn more, and makes it easy for Data to track him and his hostage. Upon being handed a hand-drawn profile of the Enterprise by Moriarty, Data immediately leaves the holodeck with La Forge following in confusion. Meanwhile, Moriarty learns a great deal about the Enterprise from the computer, and somehow constructs a crude device that toggles attitude control in the holodeck. He uses this several times, causing the ship to shudder uncontrollably.

Meeting with Captain Picard and the senior officers, La Forge figures out that it was his instructions to create an adversary capable of defeating Data, not Sherlock Holmes, that initiated the holodeck override control and is preventing them from ending the holodeck program. Picard decides that he must personally meet with Moriarty, whom he confronts, but who is adamant that he is sentient and self-aware, and should be allowed to continue to exist.

After Moriarty releases Dr. Pulaski and returns control of the ship to Captain Picard, Picard explains that the ship's computer can store Moriarty's character indefinitely, and that the Federation would work on a way to bring Moriarty out of the holodeck. Moriarty's program is stored and ended, and the matter is considered closed. Picard then goes down to engineering, where La Forge is overlooking the model of the HMS Victory. Picard then asks if it will sail, to which La Forge replies that it will. The USS Victory arrives.

Memorable quotes
"Where will I find you?" "He will be at 221B Baker Street."
 * - Clancy asking Data where he and Geordi La Forge will be

"Your artificial friend doesn't have a prayer of solving a Holmes mystery that he hasn't read."
 * - Pulaski to La Forge after Data solves a Sherlock Holmes mystery rather quickly on the holodeck

"I'll give you credit for your vast knowledge but your circuits would just short out if you were confronted with a truly original mystery."
 * - Pulaski criticizing Data again

"That dark fellow there used the word "arch" and then, I wonder... arch!"
 * - Moriarty, gaining sentience

"Why does it frighten you, Holmes?!"
 * - Moriarty, after he presents Data with a hand drawn Enterprise-D

"How can a character from 1890s London draw a picture of the Enterprise?"
 * - Geordi La Forge

"Nice suit."
 * - Riker, when Worf changes into an 1890s London outfit

"I'm a civilized abductor, Captain Picard. Civilized... but still dangerous."
 * - Moriarty

"I do not want to die."

"And I do not want to kill you."
 * - Moriarty and Picard

Story and script

 * The second revision final draft script was submitted on.
 * According to Maurice Hurley, the idea for this episode was inspired by Data's experiences in . Hurley stated, "It wasn't a writer saying, 'Let's do this.' It was one of the people living on the Enterprise." (Captains' Logs: The Unauthorized Complete Trek Voyages, p. 174)
 * This episode contains elements from and references to the Sherlock Holmes short stories ', ', and '. Furthermore, Moriarty's creation being a result of La Forge requesting an opponent capable of defeating Data references Arthur Conan Doyle's creation of the same character for the short story ' – specifically, as an opponent capable of defeating Sherlock Holmes who, at the time, Doyle wanted to kill off.
 * First UK airdate: 17th April 1991

Production

 * The original ending filmed was cut from the episode. (Star Trek: The Next Generation Companion 2nd ed., pp. 68-69) Hurley recalled, "In that ending, Picard knew how to defeat Moriarty. He tricked him. He knew all along that Moriarty could leave the holodeck whenever he wanted to, and he knew because when Data came out and showed him a drawing of the Enterprise, if that piece of paper could leave the holodeck, that means that the fail-safe had broken down. In turn, this means that the matter-energy converter which creates the holodeck, now allowed the matter to leave the holodeck, which was, up to that point, impossible. When he knew that paper had left the holodeck, he knew that Moriarty could as well, so he lied to him." (Captains' Logs: The Unauthorized Complete Trek Voyages, p. 174)
 * This ending was removed by Gene Roddenberry, who claimed that it hurt Picard's character by making him look deceitful. Hurley disagreed, noting, "I thought it made him look clever, and since you are dealing with maybe the most profound criminal mind in literature, you've got to be careful." (Captains' Logs: The Unauthorized Complete Trek Voyages, p. 174) The original ending can be seen in the script here (scene 62B).
 * In the episode as aired, the existence of the paper with a drawing of the Enterprise, given to Data by Moriarty, outside the holodeck is unexplained.
 * When given a choice of shows to direct, Rob Bowman chose this episode, as he was disappointed at missing out on the previous season's period show, . (Star Trek: The Next Generation Companion 2nd ed., p. 68)
 * Bowman noted that this episode was "a huge production. They built that whole street from the ground up on stage. Indoors. It's an awesome episode." However, Bowman was angry with a cost-cutting decision to reduce the schedule for filming from eight to seven days. He remarked, "They made the shooting process one of the most unpleasant I've ever been through. I thought it almost killed the episode...Here was a show where we had all this great production value. Brent Spiner was about to do the best work I've ever seen him do. We had all these sets and they said seven days. I think that show is when I started to pull away from Star Trek, because I felt that it was a great opportunity to make a wonderful episode, and there was an arbitrary decision because the sets cost so much – I think $200,000 – where they said, 'We'll save money by taking a day off the schedule.' It's like, 'Wait a minute guys, first you have to take a day out of the script. You don't just take a day off the schedule to save $60,000.' As you can tell, I was pretty angry about it, and still have a little hostility towards what I went through on that show to make it happen." (Captains' Logs: The Unauthorized Complete Trek Voyages, p. 174)

Cast and characters

 * Wil Wheaton (Wesley Crusher) does not appear in this episode.

Continuity
i.e. Ataru over Lum – the two main characters of Rumiko Takahashi's anime series, Urusei Yatsura.
 * The equation fragments on Moriarty's chalkboard, surrounding his "sketch" of the Enterprise, include $${A_t A_r - U} \over {L - U_m}$$.
 * When starting the initial Holmes program, Data gives the full name "Dr. John Watson" for La Forge's character. The stories of the Holmes canon have identified Dr. Watson's first name as both "John" and "James", though John is indeed used more frequently, and James may merely be an Anglicized version of Hamish, for which Watson's middle initial "H" may stand.

Reception

 * Hurley remarked, "Wonderful episode... We had carriages, old London, and I thought the guy who played Moriarty was just wonderful. I've never seen anybody play Moriarty better than that." (Captains' Logs: The Unauthorized Complete Trek Voyages, p. 174)
 * Despite the issues with filming, Bowman was still proud of the episode. "Certainly Brent Spiner came through with flying colors and everybody did. The original draft of that script was so eloquently written; absolutely beautiful, but it was probably a two hour episode at least and was written way, way down, but that was a wonderful script. We pulled the episode off." (Captains' Logs: The Unauthorized Complete Trek Voyages, p. 174)
 * At the time of filming, the producers believed that the Sherlock Holmes character was public domain. After the episode aired, the estate of Sir Arthur Conan Doyle notified Paramount that they still retained a percentage of the rights to the character, and would require a usage fee if the character was used again. This legal issue delayed sequel episodes for nearly four years, at which time an agreement was reached for use of the character in . (Star Trek: The Next Generation Companion 2nd ed., pp. 69, 231). The unusual delay was subsequently referenced in the latter episode.
 * A mission report by Patrick Daniel O'Neill for this episode was published in The Official Star Trek: The Next Generation Magazine Vol. 6, pp. 21-25.

Awards

 * This episode was nominated for two Emmy Awards: Outstanding Art Direction for a Series and Outstanding Costume Design for a Series.

Video and DVD releases

 * Original UK VHS release (two-episode tapes, CIC Video): Volume 15, catalog number VHR 2468,
 * UK re-release (three-episode tapes, Paramount Home Entertainment): Volume 2.1, catalog number VHR 4737,
 * As part of the TNG Season 2 DVD collection
 * As part of the TNG Season 2 Blu-ray collection.

Starring

 * Patrick Stewart as Capt. Jean-Luc Picard
 * Jonathan Frakes as Cmdr. William Riker

Also starring

 * LeVar Burton as Lt. Geordi La Forge
 * Michael Dorn as Lt. Worf
 * Marina Sirtis as Counselor Deanna Troi
 * Brent Spiner as Lt. Commander Data

Special appearance by

 * Diana Muldaur as Doctor Pulaski

Guest stars

 * Daniel Davis as James Moriarty
 * Alan Shearman as Lestrade

Co-stars

 * Biff Manard as Ruffian
 * Diz White as Prostitute
 * Anne Elizabeth Ramsay as Assistant Engineer Clancy
 * Richard Merson as Pie Man

Uncredited co-stars

 * Rosemarie Baio as the widow
 * Majel Barrett as USS Enterprise (NCC-1701-D) computer voice
 * Michael Braveheart as Martinez
 * Jeffrey Deacon as command division officer
 * Guy Vardaman as Darien Wallace
 * Mark Wilson as bystander
 * Unknown performers as
 * Boy
 * Bystanders
 * Dead man
 * Emissary
 * Jabez Wilson
 * Operations division officer

Stand-ins

 * James G. Becker - stand-in for Jonathan Frakes
 * Darrell Burris - stand-in for LeVar Burton
 * Dexter Clay - stand-in for Michael Dorn
 * Jeffrey Deacon - stand-in for Patrick Stewart
 * Nora Leonhardt - stand-in for Marina Sirtis
 * Tim McCormack - stand-in for Brent Spiner

Log entries

 * Captain's log, USS Enterprise (NCC-1701-D), 2365