Ms Access Training Present a Ion

Embed Size (px)

Citation preview

  • 8/4/2019 Ms Access Training Present a Ion

    1/31

    What is MS.Access?

    .

    Mohammad Paiman Aslami

  • 8/4/2019 Ms Access Training Present a Ion

    2/31

    Ms. Access

    Microsoft Access is a database software package. Adatabase is an organized collection of records.Telephone and address books are examples of paper

    databases. With Access, you can create acomputerized database. For example, you can useAccess to organize the students who attend a school,the courses they take, and the instructors who teachthem. After you create an Access database, you cansearch it, manipulate it, and extract information fromit. This lesson introduces you to Access windows andteaches you how to create a database.

  • 8/4/2019 Ms Access Training Present a Ion

    3/31

    Ms. Access

    Microsoft Access is a powerful program to create andmanage your databases. Access is much more involvedand is a more genuine database application than other

    programs. Recognizing Microsoft Access:

    .MDB (Microsoft Database)

  • 8/4/2019 Ms Access Training Present a Ion

    4/31

    Database is a collection of related object files, whichis used for unique purpose.

    Note: Object contains individual types of object files.

    Opening Access

    Having figured out the tables we need, we are readyto create our database. Open Microsoft OfficeAccess.

    When Access starts you will see a screen that looks Something likes this one.

  • 8/4/2019 Ms Access Training Present a Ion

    5/31

  • 8/4/2019 Ms Access Training Present a Ion

    6/31

    Object: Object creates object files. Mainly, objects aredivided in seven categories, which are followed with shortdefinition.

    1. Table: Is the source, base and data keeper of ourdatabase. Table is container of Information.

    2. Query: Is used to operate the sources (Table andother 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.

  • 8/4/2019 Ms Access Training Present a Ion

    7/31

  • 8/4/2019 Ms Access Training Present a Ion

    8/31

    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

  • 8/4/2019 Ms Access Training Present a Ion

    9/31

  • 8/4/2019 Ms Access Training Present a Ion

    10/31

  • 8/4/2019 Ms Access Training Present a Ion

    11/31

    Record

  • 8/4/2019 Ms Access Training Present a Ion

    12/31

    Field

  • 8/4/2019 Ms Access Training Present a Ion

    13/31

    Field Properties For Text

    Field size: it is used for number of letters wewrite 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 specificvalue such as MR. or Dr.

    Validation Rule: is command is for giving a rule forour text such as do not enter names after before f

  • 8/4/2019 Ms Access Training Present a Ion

    14/31

    Continue

    Required: required command is for not lettingany blank space in name field. Incase you selectyes

    Allow Zero Length: This command is used for at leastnot letting any blank. You can put a comma or a dotfor entering data. The benefit is that sometimes if youforget the name you can fill it by a comma.

    Index: Index is for avoiding the repetitionof a name or ID.

  • 8/4/2019 Ms Access Training Present a Ion

    15/31

    Number Properties

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

  • 8/4/2019 Ms Access Training Present a Ion

    16/31

    Number Properties

    Field Size: You can adjust the amount of space that eachrecord in a table uses by changing the field size property of numberfields in the table.

    I. Byte: For integers that range from 0 to 255. Storagerequirement is a single byte.

    II. Integer: For integers that range from -32,768 to +32,767. Storagerequirement is two bytes.

    III. Long integer: Use for integers that range from -2,147,483,648to 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 supportedusing 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.

  • 8/4/2019 Ms Access Training Present a Ion

    17/31

    Continue

    Format: You can either define your own formator use one of the named formats that Access haspredefined such as:

    I. General Number: Displays a number without thousand

    separators.II. Currency: Displays thousand separators as well as two

    decimal places.

    III. Fixed: Displays at least two digits to the right of thedecimal place.

    IV.Standard: Displays the thousand separators, at least twodigits to the right of the decimal place.

    V. Percent : Displays a percent value - that is, a numbermultiplied by 100 with a percent sign. Displays two digits to the rightof the decimal place.

    VI.Scientific: Scientific notation.

  • 8/4/2019 Ms Access Training Present a Ion

    18/31

    Decimal Place: The Decimal Places propertyprovides a default setting, Auto, and the option to specify from 0to 15 decimal places. When set to Auto, fieldswith Format property settings

    of Currency, Fixed, Standard, Percent and Scientific displaytwo decimal places. The Decimal Places property has no effectunless the field or control has a Format property setting.

  • 8/4/2019 Ms Access Training Present a Ion

    19/31

    Continue

    Input mask: Input masks provide a large amount ofdata validation and prevent users from entering invalid

    data (such as a phone number in a date field). Inputmasks can also help ensure that users enter data in aconsistent way. That consistency can make data easier tofind and make it easier to maintain your database.

    Caption: The label text that is displayed for thisfield by default. If this property is empty, the name of thefield is used. Any text string is allowed.

  • 8/4/2019 Ms Access Training Present a Ion

    20/31

    Continue

    Default Value: Automatically assigns the specified value tothis field when a new record is added.

    Validation Rule: Supplies an expression that must be truewhenever 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 thatis 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. Thereare 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.

  • 8/4/2019 Ms Access Training Present a Ion

    21/31

    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

  • 8/4/2019 Ms Access Training Present a Ion

    22/31

    Flat file Database:

    This kind of databases are not powerful and wellsuited as Relational Databases, since we havenumber 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- 1illustrates the design of a relational database.

  • 8/4/2019 Ms Access Training Present a Ion

    23/31

    Relational Database

    Figure 6- 1

  • 8/4/2019 Ms Access Training Present a Ion

    24/31

    One to many Relationship

  • 8/4/2019 Ms Access Training Present a Ion

    25/31

    Many to Many

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

    Main Table

    ID

    Name Unchangeable

    Fee

    Course Title

    Timing Changeable

  • 8/4/2019 Ms Access Training Present a Ion

    26/31

    Many to Many

    Sub Table

    In this table we modify our Course Title, since coursetitle is made up on choice of students.

    As any student can choose any kind of course forexample there are many choices shown as below

    BBA

    BCS

    MCSE

    DEL

    DIT

  • 8/4/2019 Ms Access Training Present a Ion

    27/31

    Many to Many

    Sub Table

    There can be different timing for different classes, forexample..

    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)

  • 8/4/2019 Ms Access Training Present a Ion

    28/31

    What is Query?

    As tables grow in size they can have hundreds ofthousands of records, which makes it impossible forthe user to pick out specific records from that table.

    Queries were designed to combat this problem. Witha query you can apply a filter to the table's data, sothat you only get the information that you want.

  • 8/4/2019 Ms Access Training Present a Ion

    29/31

    Field is already cleared inprevious lectures

    Shows the tableSort is used for sorting inaccordance with ascending anddescending

    Show will get you to know thatif some field is not required toshow

    Is used for formulas

    Is used for the substitute of afield

  • 8/4/2019 Ms Access Training Present a Ion

    30/31

    Query Functions

    Like: is used for specifying required informationof a person in a database.

    E.G: Like Ahmad , Like 2000

    > 400 Percentage: is used for identifying the

    percentage of different values

    E.G:

  • 8/4/2019 Ms Access Training Present a Ion

    31/31