You are on page 1of 31

?What is MS. Access .

Mohammad Paiman Aslami

Ms. Access

Microsoft Access is a database software package. A database is an organized collection of records. Telephone and address books are examples of paper databases. With Access, you can create a computerized database. For example, you can use Access to organize the students who attend a school, the courses they take, and the instructors who teach them. After you create an Access database, you can search it, manipulate it, and extract information from it. This lesson introduces you to Access windows and teaches you how to create a database.

Ms. Access

Microsoft Access is a powerful program to create and manage your databases. Access is much more involved and is a more genuine database application than other programs.

Recognizing Microsoft Access:

.MDB (Microsoft Database)

Database is a collection of related object files, which is used for unique purpose. Note: Object contains individual types of object files. Opening Access Having figured out the tables we need, we are ready to create our database. Open Microsoft Office Access. When Access starts you will see a screen that looks Something likes this one.

Object: Object creates object files. Mainly, objects are divided in seven categories, which are followed with short definition. 1. Table: Is the source, base and data keeper of our database. Table is container of Information. 2. Query: Is used to operate the sources (Table and other queries). 3. Form: Is used to design the sources for data entry. 4. Report: Is used for print layout. 5. Page: Is used for designing or creating of WebPages. 6. Macro: Is used for applying actions on object files through controls. 7. Module: Is a collection of procedures.

Database File: This is your main file that keeps all object files. Example) StudentDatabase.mdb

Table: A table is a collection of data about a specific topic. There can be multiple tables in a database. Example #1) Students Example #2) Teachers Field: Fields are the different categories within a Table. Tables usually contain multiple fields. Example #1) Student LastName Example #2) Student FirstName

Datatypes: Data types are the properties of each field. A field only has 1 data type. FieldName) Student LastName Datatype) Text

Record

Field

Field Properties For Text

Field size: it is used for number of letters we write for a text Format: this icon is used for selecting a format such as >[green] or >< [Red] Input mask: is used for coding a text or texts like password symbols Caption: is used for another name of a text. Default Value: default value is used for an specific value such as MR. or Dr. Validation Rule: is command is for giving a rule for our text such as do not enter names after before f

Continue

Required: required command is for not letting any blank space in name field. Incase you select yes Allow Zero Length: This command is used for at least not letting any blank. You can put a comma or a dot for entering data. The benefit is that sometimes if you forget the name you can fill it by a comma. Index: Index is for avoiding the repetition of a name or ID.

Number Properties

Use to store a numeric value that isn't a monetary value. If you might use the values in the field to perform a calculation, use the Number data type.

Number Properties Field Size:


You can adjust the amount of space that each record in a table uses by changing the field size property of number fields in the table. I. Byte: For integers that range from 0 to 255. Storage requirement is a single byte. II. Integer: For integers that range from -32,768 to +32,767. Storage requirement is two bytes. III. Long integer: Use for integers that range from -2,147,483,648 to 2,147,483,647. Storage requirement is 4 bytes. IV. Single: Is used for Programming (range from -3.4 x 1038 to +3.4 x 1038 ) V. Double: Same as above (range from -1.797 x 10308 to +1.797 x 10308 ) VI. Replication ID: Same as above ( replication is not supported using the .accdb file format). VII.Decimal: For numeric values that range from -9.999... x 1027 to +9.999... x 1027. Storage requirement is 12 bytes.

Continue Format: You can either define your own format or use one of the named formats that Access has predefined such as:
I. General Number: separators. II. Currency: decimal places. III. Fixed: decimal place. Displays a number without thousand Displays thousand separators as well as two Displays at least two digits to the right of the

IV. Standard: Displays the thousand separators, at least two digits to the right of the decimal place. V. Percent : Displays a percent value - that is, a number multiplied by 100 with a percent sign. Displays two digits to the right of the decimal place. VI. Scientific: Scientific notation.

Decimal Place:

The Decimal Places property provides a default setting, Auto, and the option to specify from 0 to 15 decimal places. When set to Auto, fields with Format property settings of Currency, Fixed, Standard, Percent and Scientific display two decimal places. The Decimal Places property has no effect unless the field or control has a Format property setting.

Continue

Input mask: Input masks provide a large amount of data validation and prevent users from entering invalid data (such as a phone number in a date field). Input masks can also help ensure that users enter data in a consistent way. That consistency can make data easier to find and make it easier to maintain your database. Caption: The label text that is displayed for this field by default. If this property is empty, the name of the field is used. Any text string is allowed.

Continue

Default Value: Automatically assigns the specified value to this field when a new record is added. Validation Rule: Supplies an expression that must be true whenever you add or change the value in this field. Use in conjunction with the Validation Text property. Validation Text: Enter a message to display when a value that is entered violates the expression in the Validation Rule property. Required: Requires that data be entered in the field. Indexed: Specifies whether the field has an index. There are three available values: Yes (No duplicates) Creates a unique index on the field. Yes (Duplicates OK) Creates a non-unique index on the field. No Removes any index on the field. Text Align: Specifies the default alignment of text within a control.

Relationships

Before we get to know that what is Relationship in Ms. Access and it is role in it. We prefer to know about kinds of database: We have got two kind of databases: 1. Flat file Database
2. Relational Database

Flat file Database:

This kind of databases are not powerful and well suited as Relational Databases, since we have number of information such as Name, Addresses, etc in the same place. Relational Databases are contains of multiple tables that are related through matching fields. Figure 6- 1 illustrates the design of a relational database.

Relational Database

Figure 6- 1

One to many Relationship

Many to Many

Main Table is including general information about the entire students in a University:

Main Table
ID Name Fee Course Title Timing

Unchangeable

Changeable

Many to Many

Sub Table
In this table we modify our Course Title, since course title is made up on choice of students. As any student can choose any kind of course for example there are many choices shown as below BBA BCS MCSE DEL DIT

Many to Many

Sub Table There can be different timing for different classes, for example.. BBA ( 6:7am and 4:5 pm) BCS (7:8 am and 5:6 pm) MCSE (9:10 am and 3:4 pm) DEL (10:11 am and 3:4 pm) DIT (6:7 am and 6:7 pm)

What is Query?

As tables grow in size they can have hundreds of thousands of records, which makes it impossible for the user to pick out specific records from that table. Queries were designed to combat this problem. With a query you can apply a filter to the table's data, so that you only get the information that you want.

Field is already cleared in previous lectures Shows the table

Sort is used for sorting in accordance with ascending and descending Show will get you to know that if some field is not required to show Is used for formulas Is used for the substitute of a field

Query Functions

Like: is used for specifying required information of a person in a database. E.G: Like Ahmad , Like 2000 > 400 Percentage: is used for identifying the percentage of different values E.G:

You might also like