Database Basics explained
There are two types of primary keys most commonly used:
- 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.
- 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)
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:
- Inner Join – only includes rows where the joined fields from both tables are equal.
- 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.
- 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.
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