Welcome Guest! To enable all features please Login or Register.




2 Pages<12
Go to last post Go to first unread
#21 Posted : Saturday, October 9, 2010 3:39:27 PM(UTC)

Rank: Administration

Groups: Approved
Joined: 3/4/2008(UTC)
Posts: 649
Location: Phoenix, AZ

Actually, I am thinking of this as Mission-&gt;Pilot. More correctly, if you look at the chart I provided above and follow the lines, you get Crews_Members -&gt; Crews -&gt; Crews_Missions -&gt; Missions. Since a Crew Member can be a pilot and the end of that path is Mission, simplifying you get: Missions -&gt; Pilots. :)

Regarding your other question, when Larry created the database, he included a "smart key" as part of the Crew table. A smart key is a value in a database that stores more information than one would normally expect. For example, the Crew Members table has a field in it called "MemberCrewGrade." This single column has a single value: the highest grade that person was elevated to at the end of their service. It is not a "smart key." The smart key that Larry created has three pieces of information in it: the Crew Type, the Member ID of the Crewman in charge of that crew and a number identifying a crew that person managed. It is formatted like this: 12271. The single digit on the left is the crew type. The single digit on the right is a number that represents the crew that was being managed. And the middle number, 227, is the Member ID of the person managing that crew. (In this case, Rick's father.) These positions are fixed, therefore, the right position that identifies crews is limited to the values 0 - 9 and this limits us to only ten possible crews per person.

As I mentioned above, I can fix it by simply treating the smart key as a surrogate key. (A surrogate key is simply an arbitrary identifier that has no meaning beyond identifying the record in question.) I can then add two new columns to the table that represent the Crew Type and Crew Number and create a secondary key -- which behaves exactly like a surrogate/primary key -- that will play the same role as the smart key. With the Crew Number freed from that fixed position on the right of the smart key, we will no longer be limited to 10 crews per pilot.

Probably more answer than you expected, but... I felt the need to say it. ;)

#22 Posted : Saturday, October 9, 2010 4:46:11 PM(UTC)

Rank: Administration

Groups: Approved, Administrators
Joined: 3/5/2008(UTC)
Posts: 1,019
Location: Lubbock Texas

Actually that was great the way you explaned it and was easy to understand why Thanks for that. I had never heard of the smartkey but have the Primary Key when I was working with MSAccess.

Sgt. Donald C. Byers, 613th Bomb Squadron, Togglier, 42-97344 Carrie B II, KIA 08/24/1944.
Users browsing this topic
2 Pages<12
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.