Database Basics

Database-Basics

Database Basics explained

Primary KeyA primary key field holds data that uniquely identifies each record in a table.

There are two types of primary keys most commonly used:

  1. Single-field primary key – If you have a field that contains unique values such as Social Security Numbers in Employee Master Table, you can use that field as the primary key.
  2. Multiple-field primary key – In situations where the Employee worked for more than one company, Social Security Number alone will not guarantee the uniqueness of the records. In this situation, you would have to use a combination key (for example SSN and Subscriber ID)
Three Types of Joins

A join line between tables shows how the data is related. The type of join indicates which records the query selects or performs an action on.
There are three types of joins:

  1. Inner Join – only includes rows where the joined fields from both tables are equal.
  2. Left Outer Join – includes ALL records from the table on the left and only those records from the table on the right where the joined fields are equal.
  3. Right Outer Join – includes ALL records from the able on the right and only those records from the table on the left where the joined fields are equal.
Setting up Criteria

In order to view information for the particular field in the table, you must narrow down your search. There are a number of operations that can be performed to get results. Here are the few most commonly used:

  • Equals To
  • Not Equals To
  • Greater Than
  • Greater Than or Equals To
  • Less Than
  • Less Than or Equals To

Posted on December 2, 2014 in Database

Share the Story

About the Author

Leave a reply

Your email address will not be published. Required fields are marked *

Back to Top