Skip to content

Commit 91ceb8c

Browse files
authored
Merge pull request #442 from catwarner/patch-4
Update 15-database.mkd
2 parents b2cf9e4 + f3716c2 commit 91ceb8c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

book3/15-database.mkd

+5-5
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ INSERT INTO Artist (name, eyes)
417417

418418
\index{primary key}
419419
Now we have two tables but we need a way to *link* rows in the two tables.
420-
To do this, we need why we call 'keys'. These keys will just be integer numbers
420+
To do this, we need what we call 'keys'. These keys will just be integer numbers
421421
that we can use to lookup a row in different table. If we are going to make
422422
links to rows inside of a table, we need to add a *primary key* to the rows in the
423423
table. By convention we usually name the primary key column 'id'. So our
@@ -478,7 +478,7 @@ New York|25|Frank Sinatra|blue
478478
While it might seem a little clunky and your instincts might tell you that
479479
it would be faster just to keep the data in one table, it turns out the
480480
the limit on database performance is how much data needs to be scanned
481-
when retrieving a query. While they details are very complex, integers
481+
when retrieving a query. While the details are very complex, integers
482482
are a lot smaller than strings (especially Unicode) and far quicker to
483483
to move and compare.
484484

@@ -497,7 +497,7 @@ of our data model.
497497

498498
\index{Crow's Foot diagrams}
499499
While there are many graphical representations of data models, we will use
500-
one of the "classic" appraches, called "Crow's Foot Diagrams" as shown in Figure \ref{figvrbo2m}.
500+
one of the "classic" approaches, called "Crow's Foot Diagrams" as shown in Figure \ref{figvrbo2m}.
501501
Each table is shown as a box with the name of the table and its columns. Then where there
502502
is a relationship between two tables a line is drawn connecting the tables with
503503
a notation added to the end of each line indicating the nature of the relationship.
@@ -877,10 +877,10 @@ for many courses and a course will have many users on its roster.
877877

878878
It is pretty simple to *draw* a many-to-many relationship as shown in Figure \ref{figm2m}.
879879
We simply draw two tables and connect them with a line that has the "many" indicator on both
880-
ends of the lines. The problem is how to *implement* the raltionship using primary keys and
880+
ends of the lines. The problem is how to *implement* the relationship using primary keys and
881881
foreign keys.
882882

883-
Before we explore how we implement many-to-many relationships, lets see if we could hack
883+
Before we explore how we implement many-to-many relationships, let's see if we could hack
884884
something up by extending a one-to many relationship.
885885

886886
![A Many to Many Relationship\label{figm2m}](height=1.5in@../images/many-to-many)

0 commit comments

Comments
 (0)