Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In nearly all cases, a table will contain a primary key as a way of keeping all of the records unique. Without a way to keep records unique, the data inside quickly becomes useless. A Primary Key is usually an incremented number and is unique for every record in that table. This allows tables to use that Primary Key value to reference records in another table. This is useful because it is more efficient to break data up unto specialized tables with Primary and Foreign Keys keeping that data related.

Info
titlePrimary and Foreign Key Example

Image Removed

The Primary Key from the permitapps table is used as a Foreign Key in the contacts table. This means that there can only one application with an appid of 12 but there may be multiple contacts on that application. By writing a request to the database to see all of the records where the appid is 12 we would be able to see that there is one application and potentially several contacts.


Difference Between a Dataset and a Report

...