{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Each class has a unique crn that has been

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: exist, you may need to select more than one field or have Access create one for you using the AutoNumber feature. AutoNumber is great when the key field is only used internally in the database, or when it is not necessary to access the record for a particular entity on demand. Typically, the entities whose records have to be accessed on demand are people, as when you order by phone, check books out from the library, make a credit card payment, or go to the ARC. You may have noticed that in all of those instances the burden of finding your record is placed on you; and you have to produce a card or number that allows the operator to find your record. For example: The UC Davis RSVP system is a large database that keeps track of every student. An excellent choice for a primary key would be the student’s Social Security Number (SSN), because each SSN is unique, and pretty much everyone has learned that number and remembers it. A name would not be a good choice because many students have the same name. However, because of identity security issues, the SSN should no longer be used as an ID. UC Davis has phased out SSN and creates a unique student ID for each student. Have you ever noticed how the cashier at the grocery store enters “codes” for all produce that is not packaged and has no bar codes? You guessed it! They had to learn the values of the primary key for each item. I am sure that you have noticed that the link between the physical item on the scale and what you get charged is completely dependent on the code entered by the cashier. That is a weak link in the system, because the computer has no way of knowing if the fruit on the scale (bananas) actually costs what the key code entered by the cashier indicates (star fruit @ $12.99 per lb). The MyPeople table that you created did not have a good field to be a primary key. This is because you could have more than one friend with the same first and last names. This is unlikely, but very possible. Database design requires that it be impossible for two entities to end up with the same value in the key field. So we had to let Access create one for us, the ID field with AutoNumber values. Each time you add a new record, Access automatically adds a unique number in the ID field. The key field is identified in design view by a KEY icon in the corresponding field selector Setting Your Own Primary Key In some instances, there are fields that are natural candidates for primary keys. When those fields are part of the database, it makes sense to use them instead of AutoNumber,...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern