0% found this document useful (0 votes)
12 views18 pages

Database Notes-1

A database is an organized collection of data that allows for access, retrieval, and maintenance. Examples include inventory systems, library catalogs, and student records, with characteristics such as data integrity, relationships, and query capabilities. Database Management Systems (DBMS) like Microsoft Access facilitate data management, while various data types and structures ensure efficient storage and retrieval.

Uploaded by

gladys02.adrupio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views18 pages

Database Notes-1

A database is an organized collection of data that allows for access, retrieval, and maintenance. Examples include inventory systems, library catalogs, and student records, with characteristics such as data integrity, relationships, and query capabilities. Database Management Systems (DBMS) like Microsoft Access facilitate data management, while various data types and structures ensure efficient storage and retrieval.

Uploaded by

gladys02.adrupio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

DATABASES

A database is a collection of data organized in manner that allows access, retrieval, use
and maintenance of that data.

Examples of databases:
1. Inventory management system databases: These contain information about
products, quantities, suppliers, and stock levels.
2. Library catalogs: Databases that organize information about books, authors,
genres, and availability.
3. Student records databases: Storing information about students, including their
grades, courses, attendance, and personal details.
4. Hospital patient databases: Recording patient information such as medical history,
treatments, prescriptions, and appointments.
5. Financial transaction databases: Tracking transactions, accounts, balances, and
financial statements for businesses or individuals.
6. Social media user databases: Holding user profiles, connections, posts, and
interactions on platforms like Facebook, Twitter, or LinkedIn.
7. Geographic information systems (GIS) databases: Storing geographical data like
maps, coordinates, features, and spatial relationships.
8. Online retail databases: Managing product listings, orders, customers, payments,
and shipping details for e-commerce platforms.
9. Human resources management systems (HRMS) databases: Recording employee
information such as salaries, benefits, performance reviews, and training records.
10. Research databases: Compiling academic papers, citations, authors, and research
topics for scholarly purposes.
Characteristics of databases:
 Data organization: Information is structured into tables, with columns representing
fields and rows representing records.
 Data integrity: Databases enforce constraints to ensure accuracy and consistency
of stored data.
 Data relationships: Tables can be related through keys, allowing for efficient
retrieval and manipulation of related information.
 Query capabilities: Users can retrieve specific data using queries, which are
commands or statements that extract information based on defined criteria.
 Scalability: Databases can accommodate large volumes of data and support
growing needs over time.
 Security: Access controls and authentication mechanisms are implemented to
protect sensitive data from unauthorized access or modifications.
 Concurrent access: Multiple users can simultaneously access and modify data in
the database without interfering with each other's operations.
Types of databases:
(i) Flat file database:
 Consists of a single table.
 Suitable for small-scale applications with simple data storage requirements.

1
 Easy to design and maintain but lacks flexibility for complex relationships.
(ii) Relational database:
 Comprises multiple tables linked through common fields.
 Supports complex data relationships through the use of primary and foreign keys.
 Offers flexibility, scalability, and robust query capabilities for managing diverse
datasets.
 Commonly used in enterprise applications and data-driven environments.

NB: A relationship determines the way in which the details in one table are related to the
details in another table. It can be a one to one relationship, one to many or many to many
relationship.

A database can also be categorized as a paper/manual database or a computerized


(electronic) database

An example of a paper database is a personal address book on the other hand, an


electronic inventory tracking system is one example of computerized database

Advantages of using electronic database system

 Data Integration: It allows for the integration of data from multiple sources,
enabling a holistic view of information for analysis and decision-making.
 Data Security: Advanced database systems offer robust security features such as
encryption, access controls, and backup mechanisms to safeguard sensitive data
from unauthorized access or loss.
 Data Consistency: Databases enforce data integrity constraints to ensure that data
remains consistent and accurate across the system, reducing errors and
inconsistencies.
 Automation: Database systems can automate repetitive tasks such as data entry,
validation, and report generation, increasing efficiency and reducing manual
effort.
 Scalability: As data volumes grow, electronic databases can scale up to
accommodate increasing storage and processing requirements without significant
disruption.
 Accessibility: With the advent of cloud-based database solutions, users can access
and manage data from anywhere with an internet connection, promoting
collaboration and remote work.
 Analytics and Insights: Databases support advanced analytics and reporting
capabilities, allowing organizations to derive valuable insights from their data for
strategic planning and decision-making.

Disadvantages of database system


 Complexity: Developing and maintaining a database system requires specialized
skills and expertise, leading to complexity in system design, implementation, and
management.
2
 Initial Cost: The upfront cost of setting up a database system, including hardware,
software licenses, and implementation services, can be substantial, especially for
large-scale deployments.
 Maintenance Overhead: Database systems require regular maintenance tasks such
as backups, software updates, and performance tuning, which can consume time
and resources.
 Dependency on Technology: Organizations relying on database systems are
vulnerable to technology obsolescence and compatibility issues, necessitating
periodic upgrades and migrations.
 Data Privacy Concerns: Centralized storage of sensitive data in a database system
poses risks related to data privacy and compliance with regulations such as GDPR
or HIPAA.
 Vendor Lock-In: Organizations may become dependent on a specific database
vendor or platform, limiting their flexibility and ability to switch to alternative
solutions.
 Performance Bottlenecks: Poorly designed database schemas or inefficient queries
can lead to performance bottlenecks, impacting system responsiveness and user
satisfaction.

A DATABASE MANAGEMENT SYSTEM (DBMS)


A database management system (DBMS) is a software tool that lets users add, view, and
work with the data in a database
Examples of (DBMS)

 Oracle
 Lotus Approach
 Corel paradox
 MYSQL
 Informix
 Microsoft Access etc
We shall deal much with the basic one which is Microsoft Access

TERMS USED
Common terms used in database management systems
1. Data entry: The process of getting information into a database, usually done by
people
2. Objects: These are the components that makeup a database. Examples of database
objects include, tables, forms, queries, reports, modules, macros
3. An entity: is a person, place, thing, activity, or event for which data is collected
4. A field: is a single piece of information from a record. In a database table every
column represents a field
5. A record: Is a row on a datasheet and is a set of values defined by fields
6. Field name (Field Labels): Is a title of a particular column in a database table e.g.
titles like ID No, Name, Sex, District, Allowance.
5. Field Length: Is the maximum number of characters that can be stored for data in a
3
Particular field.
6. Data type (Field Type): is an attribute which determines the kind of data which
users can store in a field
7. Data redundancy: Is the repeating of data in more than one file.
8. Query: is a database object used to request for specific type of data from a database
table or combination of tables.
9. Form: is a database object that allows you to enter or view data stored in your
tables.
10. Report: is a formatted screen display or printout of the contents of one or more
tables in a database.
11. Design view: This provides the tools for creating fields in a table and other
objects.
12. Datasheet view: Allows one to update, edit and delete information from a table.
13. Attribute: a part of the description of an entity. The entity itself is described by
one or more attributes e.g. the attributes for student can be name, Address, Telephone,
etc.
14. Primary key (key field): is a field in a data file that uniquely identifies each
record. It is also used to connect two or more tables in a database
Characteristics of a primary key
 It uniquely identifies each record ie cannot have repeated values
 It is never empty or null
15. Foreign key: Is a primary key of one table that also appears in another table
16. Data integrity: Is the degree to which the data in any file is accurate and up-to
date.
17. A string is a data type used to represent text rather than numbers. It is comprised
of a set of characters that can also contain spaces and numbers.
18. Wild cards: Is a special character that represents one or more other characters.
Wild card characters may be used to represent a letter or letters in a word. Wild cards
can be used in access queries to look for specific information
Wildcard Description Example

* Matches any number of characters. You can use the wh* finds what, white, and why,
asterisk (*) anywhere in a character string. but not awhile or watch.
? Matches any single alphabetic character. B?ll finds ball, bell, and bill.
[] Matches any single character within the brackets. B[ae]ll finds ball and bell, but not
bill.
! Matches any character not in the brackets. b[!ae]ll finds bill and bull, but not
ball or bell.
- Matches any one of a range of characters. You must b[a-c]d finds bad, bbd, and bcd.
specify the range in ascending order (A to Z, not Z to

4
A).
# Matches any single numeric character. 1#3 finds 103, 113, and 123.

19. Data normalization


The process of applying the normalization rules to your database design is called
normalizing the database, or just normalization.

When do we use normalization rules?


When you want ensure that you have divided your information items into the appropriate
tables i.e. when you want to see if your tables are structured correctly.
You apply the rules in succession, at each step ensuring that your design arrives at one of
what is known as the "normal forms." Five normal forms are widely accepted ie
 the first normal form
 second normal form
 third normal form
 fourth normal form
 fifth normal forms

Database objects
These are the basic components that make up a database and they include:
 Tables
 Queries
 Forms
 Reports
 macros
 Modules etc

Macros (Mini programs):


These are tools used to automate the way one uses his database. Macros can be used to
instruct the computer to print specific reports at a given time.

Macros in Access can be thought of as a simplified programming language which you


can use to add functionality to your database. For example, you can attach a macro to a
command button on a form so that the macro runs whenever the button is clicked. Macros
contain actions that perform tasks, such as opening a report, running a query, or closing
the database. Most database operations that you do manually can be automated by using
macros, so they can be great time-saving devices.

Modules:

5
A module is a collection of declarations, statements, and procedures that are stored
together as a unit.

Modules, like macros, are objects you can use to add functionality to your database.
Whereas you create macros in Access by choosing from a list of macro actions, you write
modules in the Visual Basic for Applications (VBA).

Visual Basic for Applications (VBA): is a macro-language version of Microsoft Visual


Basic that is used to program Microsoft Windows-based applications and is included with
several Microsoft programs.
Database tables
Characteristics of a good database table
 It should have a primary key
 It should have the required fields
 It should have required data types and formats

Data types in Microsoft Access

Data type Stores Size


Text Alphanumeric characters Up to 255 characters.
Use for text, or text and
numbers that are not used in
calculations (for example, a
product ID).
Memo Alphanumeric characters Up to 1 gigabyte of
(longer than 255 characters characters, or 2
in length) or text with rich gigabytes of storage (2
text formatting. bytes per character), of
which you can display
65,535 characters in a
control.
Number Numeric values (integers or 1, 2, 4, or 8 bytes, or
fractional values). 16 bytes when used for
Used for storing numbers to be replication ID.
used in calculations, except for
monetary values (use the
Currency for data type for
monetary values).
Date/Time Dates and times. 8 bytes.
Used for storing date/time
values. Note that each value

6
stored includes both a date
component and a time
component.
Currency Used for storing monetary 8 bytes.
values (currency).
AutoNumber A unique numeric value that 4 bytes or 16 bytes
Office Access automatically when used for
inserts when a record is added. replication ID.
Use for generating unique
values that can be used as a
primary key. Note that
AutoNumber fields can be
incremented sequentially.
Yes/No Boolean values. 1 bit (8 bits = 1 byte).
Use for True/False fields that
can hold one of two possible
values: Yes/No or True/False, for
example.
OLE(Object OLE objects or other binary Up to 1 gigabyte.
Linking and data.
Embedding) Use for storing OLE objects from
Object other Microsoft Windows
applications.
Attachment Pictures, Images, Binary For compressed
files, Office files. attachments, 2
This is the preferred data type gigabytes. For
for storing digital images and uncompressed
any type of binary file. attachments,
Note approximately 700k,
Field name should be written as depending on the
a Caption degree to which the
attachment can be
compressed.
Hyperlink Hyperlinks. Up to 1 gigabyte of
Use for storing hyperlinks to characters, or 2
provide single-click access to gigabytes of storage (2
Web pages through a URL bytes per character), of
(Uniform Resource Locator) or which you can display
files through a name in UNC 65,535 characters in a
(universal naming convention) control.
format. You can also link to
Access objects stored in a
database.
Lookup Wizard Not actually a data type; Table or query based:
instead, this invokes the Lookup The size of the bound
7
Wizard. column.
Use to start the Lookup Wizard Value based: The size
so you can create a field that of the Text field used
uses a combo box to look up a to store the value.
value in another table, query or
list of values.
Note

 For phone numbers, part numbers, and other numbers you don’t intend to use for
mathematical calculations, you should select the Text data type, not the Number
data type.
 For the Text and Number data types, you can specify the field size or data type
more specifically by setting a value in the FieldSize property box.

Field properties

Use this field


property To

FieldSize Set the maximum size for data stored as a Text,


Number, or AutoNumber data type.

Format Customize the way the field appears when


displayed or printed.

DecimalPlaces Specify the number of decimal places to use


when displaying numbers.

NewValues Set whether an AutoNumber field is incremented


or assigned a random value.

InputMask Display editing characters to guide data entry.

Caption Set the text displayed by default in labels for


forms, reports, and queries.

DefaultValue Automatically assign a default value to a field


when new records are added.

ValidationRule Supply an expression that must be true


whenever you add or change the value in this
field.

ValidationText Enter text that appears when a value violates


the ValidationRule expression.

Required Require that data be entered in a field.


8
AllowZeroLength Allow entry (by setting to Yes) of a zero-length
string ("") in a Text or Memo field.

Indexed Speed up access to data in this field by creating


and using an index.

UnicodeCompressio Compress text stored in this field when a large


n amount of text is stored (> 4,096 characters)

IMEMode Control conversion of characters in an Asian


version of Windows.

IMESentenceMode Control conversion of characters in an Asian


version of Windows.

SmartTags Attach a smart tag to this field.

AppendOnly Allow versioning (by setting to Yes) of a Memo


field.

TextFormat Choose Rich Text to store text as HTML and


allow rich formatting. Choose Plain Text to store
only text.

TextAlign Specify the default alignment of text within a


control.

Precision Specify the total number of digits allowed,


including those both to the right and the left of
the decimal point.

Scale Specify the maximum number of digits that can


be stored to the right of the decimal separator.

 If you want more space to enter or edit a property setting in the property box,
press SHIFT+F2 to display the Zoom box. If you are entering an input mask

or validation expression and would like help in building it, click next to the
property box to display the appropriate builder

Understanding input masks

9
An input mask is a set of literal characters and mask characters that control what you
can and cannot enter in a field. For example, an input mask can require users to enter
dates or telephone numbers that follow the conventions for a specific country/region

When and where to use an input mask

 You use an input mask whenever you want users to enter data in a specific way.
For example, if you want users to enter phone numbers in the British format or
German format, use an input mask.
 By default, you can apply input masks to table fields that are set to
 the Text,
 Number (except ReplicationID),
 Currency, and
 Date/Time data types.
 You can also apply input masks to form controls, such as text boxes, that you
bind to table fields that are set to those data types.

How to use input masks


You can add input masks to table fields by running the Input Mask Wizard, or by manually
entering masks in a field property (the Input Mask property).
Input mask character reference
The following table lists and describes the placeholder and literal characters that you can use in
an input mask.
Charact
er Use

0 Digit. You must enter a single digit in this position.

9 Digit. Single digits in this position are optional.

# Enter a digit, a space, or a plus or minus sign in this position. If


you skip this position, Access enters a blank space.

L Letter. You must enter a single letter in this position.

? Letter. Single letters in this position are optional.

A Letter or digit. You must enter a single letter or digit in this


position.

a Letter or digit. Single letters or digits in this position are


optional.

10
& Any character or space. You must enter either a single
character or a space in this position.

C Any character or space. Characters or spaces in this position


are optional.

.,:;-/ Decimal and thousands placeholders, date and time separators.


The character you select depends on your Microsoft Windows
regional settings.

> All characters that follow appear in uppercase.

< All characters that follow appear in lowercase.

! Causes the input mask to fill from left to right instead of from
right to left.

\ Forces Access to display the character that immediately


follows. This is the same as enclosing a character in double
quotation marks.

"Literal Encloses any text that you want users to see in double
text" quotation marks.

Password In Design view for tables or forms, setting the Input Mask
property to Password creates a password entry box. When
users type passwords in the box, Access stores the characters
but displays asterisks (*).

Examples of input masks


The examples in the following table demonstrate some of the ways you can use input
masks.
This input Provides this
mask type of value Notes

(000) 000-0000 (206) 555-0199 In this case, you must must enter an
area code because that section of
the mask (000, enclosed in
parentheses) uses the 0 placeholder.

(999) 000-0000! (206) 555-0199 In this case, the area code section
( ) 555-0199 uses the 9 placeholder, so area
codes are optional. Also, the
exclamation point (!) causes the
mask to fill in from left to right.

(000) AAA-AAAA (206) 555-TELE Allows you to substitute the last four
digits of a U.S. style phone number
with letters. Note the use of the 0

11
placeholder in the area code section,
which makes the area code
mandatory.

#999 -20 Any positive or negative number, no


2000 more than four characters, and with
no thousands separator or decimal
places.

>L????L?000L0 GREENGR339M A combination of mandatory (L) and


3 optional (?) letters and mandatory
MAY R 452B7 numbers (0). The greater-than sign
forces users to enter all letters in
uppercase. To use an input mask of
this type, you must set the data type
for the table field to Text or Memo.

00000-9999 98115- A mandatory postal code and an


98115-3007 optional plus-four section.

>L<???????????? Maria A first or last name with the first


?? Pierre letter automatically capitalized.

ISBN 0- ISBN 1-55615- A book number with the literal text,


&&&&&&&&&-0 507-7 mandatory first and last digits, and
any combination of letters and
characters between those digits.

>LL00000-0000 DB51392-0493 A combination of mandatory letters


and characters, all uppercase. Use
this type of input mask, for example,
to help users enter part numbers or
other forms of inventory correctly.

Query
Query: is a database object used to request for specific type of data from a database table or
combination of tables.
This is achieved through the use of query criteria
A query criteria is a rule that identifies the records that you want to include in the query result.
Use this criterion Query result
"China" Returns records where the Value in the field is set to
China.
Not "Mexico" Returns records where the Value in the field is set to

12
any other value in the field other than Mexico.
Like A* Returns records for all fields whose values start with
"A",
NOTE When used in an expression, the asterisk (*)
represents any string of characters — it is also called a
wildcard character.
Like "*Korea*" Returns records for all fields that contain the string
"Korea".
K*and*I
*D*
K*or b*
<>john
*E or *I
Not Like U* Returns records for all fields whose names start with a
character other than "U".
Not Like "*Korea*" Returns records for all fields that do not contain the
string "Korea".
Like "*ina" Returns records for all fields whose names end in "ina",
such as China and Argentina.
Not Like "*ina" Returns records for all fields that do not end in "ina",
such as China and Argentina.
Is Null Returns records where there is no value in the the field.
Is Not Null Returns records where the value is not missing in the
field.
"" (a pair of quotes) Returns records where the field is set to a blank (but
not null) value.
Not "" Returns records where the field has a nonblank value.
"" Or Is Null Returns records where there is either no value in the
field, or the field is set to a blank value.
Is Not Null And Not Returns records where the field has a nonblank, non-
"" null value.
>= "Mexico" Returns records of all fields with values beginning with
Mexico and continuing through the end of the alphabet.
Like "[A-D]*" Returns records for fields whose values start with the
letters "A" through "D".
"USA" Or "UK" Returns records for USA and UK.
In("France", "China", Returns records for all fields with values specified in
"Germany", "Japan") the list.
Right([Value in the], Returns records for all fields where the last letter is "y".

13
1) = "y"
Len([Country/ Returns records for countries/regions whose name is
Region]) > 10 more than 10 characters long.
Like "Chi??" Returns records for fields with values, such as China
and Chile, whose names are five characters long and
the first three characters are "Chi".

Criteria for Number, Currency, and AutoNumber fields


Use this
criterion Query Result

100 Returns records where the value is 100.

Not 1000 Returns records where the value is not 1000.

< 100 Returns records where the value is less than 100
<= 100 (<100).
Displays records where the value is less than or equal
to 100.

20 or 25 Returns records where the value is either 20 or 25.

>10 and <90 Returns records where the value is between (but not
including) 10 and 90

Between 50 Returns records where the value is between (and


and 100 including) 50 and 100

<50 or >100 Returns records where the value is not between 50 and
100.

In(20, 25, 30) Returns records where the value is either 20, 25, or 30.

Like "*4.99" Returns records where the value ends with "4.99", such
as 4.99, 14.99, 24.99, and so on.

Is Null Returns records where no value is entered in the field.

Is Not Null Returns records where the value is not missing in the
field.

Criteria for Date/Time fields


Use this criterion Query result
#2/2/2006# Returns records with date set to Feb 2, 2006.
Note

14
Remember to surround date values with the #
character so that Access can distinguish
between date values and text strings.
Not #2/2/2006# Returns records that took place on a day other
than Feb 3, 2006.
5/*/* Displays all records on 5th of any month of any
year
5/10/*
*/6/* All records with the month of june
*/*/2012
< #2/2/2006# Returns records that took place before Feb 2,
2006.
> #2/2/2006# Returns records that took place after Feb 2,
2006.
>#2/2/2006# and Returns records took place between Feb 2, 2006
<#2/4/2006# and Feb 4, 2006.
You can also use the Between operator to filter
for a range of values. For example, Between
#2/2/2006# and #2/4/2006# is the same as
>#2/2/2006# and <#2/4/2006# .
<#2/2/2006# or Returns records took place before Feb 2, 2006
>#2/4/2006# or after Feb 4, 2006.
#2/2/2006# or Returns records that took place on either Feb 2,
#2/3/2006# 2006 or Feb 3, 2006.
In (#2/1/2006#, Returns records that took place on Feb 1, 2006,
#3/1/2006#, March 1, 2006, or April 1, 2006.
#4/1/2006#)
DatePart("m", Returns records that took place in December of
[SalesDate]) = 12 any year.
DatePart("q", Returns records that took place in the first
[SalesDate]) = 1 quarter of any year.
Date() Returns records that took place on the current
day. If today's date is 2/2/2006, you see records
where the Date field is set to Feb 2, 2006.
Date()-1 Returns records that took place the day before
the current day. If today's date is 2/2/2006, you
see records for Feb 1, 2006.
Date() + 1 Returns records that took place the day after
the current day. If today's date is 2/2/2006, you
see records for Feb 3, 2006.

15
< Date() Returns records that took place before today.
> Date() Returns records that will take place after today.
Is Null Returns records where the date is missing.
Is Not Null Returns records where the date is known.
DateDiff ("yyyy", This criterion applies to a Date/Time field, such
[BirthDate], Date()) > as BirthDate. Only records where the number
30 of years between a person's birthdate and
today's date is greater than 30 are included
in the query result.

The design process


The design process consists of the following steps:
 Determine the purpose of your database
This helps prepare you for the remaining steps.
 Find and organize the information required
Gather all of the types of information you might want to record in the database, such as
product name and order number.
 Divide the information into tables
Divide your information items into major entities or subjects, such as Products or Orders.
Each subject then becomes a table.
 Turn information items into columns
Decide what information you want to store in each table. Each item becomes a field, and
is displayed as a column in the table. For example, an Employees table might include
fields such as Last Name and Hire Date.
 Specify primary keys
Choose each table’s primary key. The primary key is a column that is used to uniquely
identify each row. An example might be Product ID or Order ID.
 Set up the table relationships
Look at each table and decide how the data in one table is related to the data in other
tables. Add fields to tables or create new tables to clarify the relationships, as necessary.
 Refine your design
Analyze your design for errors. Create the tables and add a few records of sample data.
See if you can get the results you want from your tables. Make adjustments to the design,
as needed.
 Apply the normalization rules
Apply the data normalization rules to see if your tables are structured correctly. Make
adjustments to the tables, as needed.

Factors to consider before designing a database


• Size and nature of the work that need to be entered into a database.
• Number of users of the database.
• How the database will be administered.
16
• Future needs of the organization.
• Initial cost for designing.
• Application program to use (on the programming side).

DATA VALIDATION
Validation - Is the process of comparing the data entered with a set of predefined rules
or values to check if the data is acceptable. OR Validation is the name for the checks that
detect incorrect data, display an error message and request another input or just reject the
data.
Data Validation - is the checking of input data for errors (e.g., of the correct data type)
before processing.
Validation checks used in a database
 Alphabetic check: ensures that only alphabetic characters are entered into the
field
 Numeric checks: ensures that only numeric data is entered into the field
 Consistency check: test Checks fields to ensure data in these fields corresponds,
e.g., If Title = "Mr.", then Gender = "M".
 Check digits: this confirms the accuracy of a primary key value. It is usually
appended to or inserted into a primary check
 Cross-system consistency checks: Compares data in different systems to ensure
it is consistent, e.g., the address for the customer with the same id is the same in
both systems.
 Data type checks: Checks the data type of the input and give an error message if
the input data does not match with the chosen data type, e.g., In an input box
accepting numeric data, if the letter 'O' was typed instead of the number zero, an
error message would appear.
 Range check: Checks that the data lie within a specified range of values, e.g., the
month of a person's date of birth should lie between 1 and 12.
 Spelling and grammar check: Looks for spelling and grammatical errors.
Validation rules
This prevent bad data from being saved in your table. Basically, they look like
criteria in a query.
Validation rule Validation text
<>0 Enter a nonzero value.
>=0 Value must be zero or greater.
-or-
You must enter a positive number.
0 or >100 Value must be either 0 or greater than 100.
BETWEEN 0 AND 1 Enter a value with a percent sign. (For use with a
field that stores number values as percentages).
<#01/01/2007# Enter a date before 2007.

17
>=#01/01/2007# AND Date must occur in 2007.
<#01/01/2008#
<Date() Birth date cannot be in the future.
M Or F Enter M for male or F for female.

END

18

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy