Presentation is loading. Please wait.

Presentation is loading. Please wait.

Building Tables & Defining Relationships

Similar presentations


Presentation on theme: "Building Tables & Defining Relationships"— Presentation transcript:

1 Building Tables & Defining Relationships

2 Guidelines for Designing Tables
Identify all the fields needed to produce the required information Organize each piece of data into its smallest useful part Group related fields into tables Determine each table’s primary key ( only if needed) Include a common field in related tables Avoid data redundancy Determine the properties of each field

3 Guidelines for Naming Fields
A field name can be up to 64 characters in length and it can include letter, numbers, spaces and special characters, except for the following: periods(.) exclamation mark (!) accent (‘) square brackets [] It cannot begin with a space Use sentence case method (Capitalize the first letter of each word ) As a practical matter do not use spaces so that it will be easier to work with the names when you need to perform complex programming tasks Use standard abbreviations, such as Num for number, Qty for quantity, Amt for amount, etc. Use names that are descriptive and you can easily understand them when you view and or edit record. Different DBMS have different naming convections.

4 Data Types Short Text Long Text (Memo) Number
Field values containing letters, digits, spaces, and special characters. Use for names, addresses, descriptions, values and digits not used in calculations. 0 to 255 characters; default field size is 255. Long Text (Memo) Field values containing letters, digits, spaces, and special characters. Use for long comments and explanations. 1 to 65,535 characters; the exact size is determined by the entry. Number Allows positive and negative numbers. Numbers can contain digits, a decimal point, commas, a plus sign, and a minus sign. Use for values that will be used for calculations expect for monetary values. 1 to15 digits.

5 Data Types Date/Time Currency Yes/No
Allows valid dates from January 1, 100 to December 31, Dates can be entered in a variety of formats such as month/day/year ( mm/dd/yyy) or variety of time formats such as 8:40 AM. You can perform mathematical calculations on dates and times. Currency Similar to Number but used for monetary values. Accurate to 15 digits on the left side of the decimal point and 4 digits on the right side. Yes/No Boolean: An expression that can be evaluated as either true (nonzero) or false (0). The field data type Yes/No is Boolean and has the value of -1 for Yes and 0 for No)

6 Data Types OLE Hyperlink Attachment Lookup Wizard
Allows values that are created as objects in other programs- pictures, graphic files, Word documents and Excel spreadsheets. These objects can be linked or embedded.   Hyperlink Used for and URL addresses. Total of 65, 535 characters. Attachment Allows field values with one or more attached files, such as images, videos, charts or other files that are supported. More flexible that OLE.  Lookup Wizard Provides a way that allows you to look up a value in another table or a predefined list of values.


Download ppt "Building Tables & Defining Relationships"

Similar presentations


Ads by Google