Step 1
Removing
Redundant Data from the Database
To illustrate how to organize data for
efficient storage and retrieval,
we will redesign this book list.
There are 55 titles in this list, and
only 15 authors,
but notice that some authors are shown several times,
once for each book that the author wrote.
To store this information together as it
is shown here,
each author must be stored with the related title.
This is redundant and wastes storage
space.
The first step to designing a database
is to re-structure the data.
The way to do that is to make two
separate lists,
instead of trying to store everything in one list, as shown here.
Problem is that when you separate the
authors from their books,
how will we know who wrote which book ?
This requires some planning.
|
Titles |
Authors |
|
Lost Worlds
of 2001 |
Arthur C.
Clarke |
|
Childhood's
End |
Arthur C.
Clarke |
|
2001 : A
Space Odyssey |
Arthur C.
Clarke |
|
2010 :
Odyssey Two |
Arthur C.
Clarke |
|
2061 :
Odyssey Three |
Arthur C.
Clarke |
|
3001 :
Final Odyssey |
Arthur C.
Clarke |
|
The Moon Is
a Harsh Mistress |
Arthur C.
Clarke |
|
A Fall of
Moondust |
Arthur C.
Clarke |
|
Breaking
Strain |
Arthur C.
Clarke |
|
Maelstrom |
Arthur C.
Clarke |
|
Hide and
Seek |
Arthur C.
Clarke |
|
Tales
from Planet Earth |
Arthur C.
Clarke |
|
Rendezvous
with Rama |
Arthur C.
Clarke |
|
Rama Revisited |
Arthur C.
Clarke |
|
Atlas
Shrugged |
Ayn Rand |
|
Fountainhead |
Ayn Rand |
|
Deception
Point |
Dan Brown |
|
Digital
Fortress |
Dan Brown |
|
Murder
Points a Finger |
David
Alexander |
|
Mostly
Harmless |
Douglas
Adams |
|
Holistic
Detective Agency |
Douglas
Adams |
|
HitchHiker's Guide to the Galaxy |
Douglas
Adams |
|
Long Dark
Teatime of the Soul |
Douglas
Adams |
|
Restaurant
at the End of the Universe |
Douglas
Adams |
|
So Long
and Thanks for All the Fish |
Douglas
Adams |
|
The
Killers |
Georges Simenon |
|
I, Robot |
Isaac
Asimov |
|
Foundation |
Isaac
Asimov |
|
Foundation's
Edge |
Isaac
Asimov |
|
Foundation
and Empire |
Isaac
Asimov |
|
The
Robots of Dawn |
Isaac
Asimov |
|
Nightfall |
Isaac
Asimov |
|
The Gods
Themselves |
Isaac
Asimov |
|
Bicentennial
Man |
Isaac
Asimov |
|
The Naked
Sun |
Isaac
Asimov |
|
Foundation
And Empire |
Isaac
Asimov |
|
The Stars
Like Dust |
Isaac
Asimov |
|
World
Without End |
Joe Haldeman |
|
Andomeda Strain |
Michael
Crichton |
|
Prey |
Michael Crichton |
|
Timeline |
Michael
Crichton |
|
Airframe |
Michael
Crichton |
|
Disclosure |
Michael
Crichton |
|
Passing |
Nella Parson |
|
Strip for
Murder |
Richard
Prather |
|
Stranger
in a Strange Land |
Robert
Heinlein |
|
Time
Enough for Love |
Robert Heinlein |
|
Time for
the Stars |
Robert
Heinlein |
|
Farnham's Freehold |
Robert
Heinlein |
|
Farmer in
the Sky |
Robert
Heinlein |
|
For Us,
the Living |
Robert
Heinlein |
|
Glory
Road |
Robert
Heinlein |
|
Pleading
Guilty |
Scott Turow |
|
Burden of
Proof |
Scott Turow |
|
The
Corvair Decade |
Tony
Fiore |