Você está na página 1de 7

Database Design

This outcome is concerned with designing database structures for implementation.


Implementation. = creating the design using database software

The design data dictionary


The finished design will include:Data item names (field and table names) Database structure (such as relationships between tables) Data item characteristics (field types, sizes) Validity checks (presence, range and restricted choice all stated in terms of how the software does each of these.

Access restrictions
You will have to consider the following restrictions of Microsoft Access when creating your design. Field and table names: Can be up to 64 characters long. Can include any combination of letters, numbers, spaces, and special characters except a period (.), an exclamation point (!), an accent grave (`), and brackets ([ ]). Can't begin with leading spaces. Can't include control characters (ASCII values 0 through 31). So, for example, this may mean that you will have to change attribute (field) names or entity (table) names in the design stage to suit the software.

Things to remember
Dates should be represented using the Date type not Numbers. Money should be represented using the currency data types. It is best to split addresses up into sections such as address 1, address 2, town and postcode. Postcodes have a set format (see input mask). All foreign keys and concatenated keys should be a lookup from primary entity Primary keys should be indexed as Yes, no duplicates. Foreign keys should be indexed as yes, duplicates ok compuond keys will be indexed as yes, duplicates ok Telephone numbers should be listed as text, as should anything that does not become involved with a calculation that contains a leading zero.

What to show in the design (Extended data dictionary)


Name Type Size Validation Check
Indexed (or not) Key

Database: Charlies Video Club


Fieldname Video Tape Number Type

How it should look


Table: Video Tapes
Size Validation Index / key Yes (unique) Primary key- no duplicates Yes (foreign key duplicates ok) No Long integer integer Yes/no (boolean) Lookup (from Films Table) =Yes OR = No

Film Number Booked Out

Database: Charlies Video Club


Fieldname Film Number Type Long integer

Table: Films
Size Validation Index / key Yes Yes (unique) Primary key no duplicates no no

Film Title Film Certificate

Text Text

75 2

Film Rental Cost

currency

Lookup (from E, U, PG, 12, 15, 18) >=1.00 AND <=99.99

No

Data types available in Microsoft Access


Data Type Text Memo Number Date/Time Currency Description Text or combinations of text and numbers, as well as numbers that don't require calculations, such as phone numbers. Lengthy text or combinations of text and numbers. Numeric data used in mathematical calculations. Can be a real number of an integer. Date and time values for the years 100 through 9999. Currency values and numeric data used in mathematical calculations involving data with one to four decimal places. Accurate to 15 digits on the left side of the decimal separator and to 4 digits on the right side. A unique sequential (incremented by 1) number or random number assigned by Microsoft Access whenever a new record is added to a table. AutoNumber fields can't be updated. Yes and No values and fields that contain only one of two values (Yes/No, True/False, or On/Off). An object such as a document, audio, video or any other object linked to or embedded in a Microsoft Access table. Text or combinations of text and numbers stored as text and used as a hyperlink address. Creates a field that allows you to choose a value from another table or from a list of that you enter. Size restrictions Up to 255 characters. Up to 65,535 characters. 1, 2, 4, or 8 bytes. 8 Bytes 8 Bytes

AutoNumber

4 bytes

Yes/No (boolean) OLE Object

1 bit. Up to 1 gigabyte (limited by available disk space) Each part of a Hyperlink data type can contain up to 2048 characters. The same as the value used in the lookup.

Hyperlink Lookup Value

Você também pode gostar