project ms access
TRANSCRIPT
-
8/13/2019 Project MS Access
1/16
Project MS Access
S U B M I T T E D T O :
S I R Q A I S E R J A V A I D
S U B M I T T I O N D A T E :
6 - 5 - 2 0 1 3
Management Information
Systems
Team:
Danish Mehmood (10-0916)
Ayesha Jamil Afridi (10-0922)
Nimra Khurshid (10-0909)
-
8/13/2019 Project MS Access
2/16
1
Ms Access
Introduction:
Microsoft Access, also known as Microsoft Office Access, is adatabase management
system fromMicrosoft that combines the relationalMicrosoft Jet Database Engine with
agraphical user interface and software-development tools. It is a member of theMicrosoft
Office suite of applications, included in the Professional and higher editions or sold
separately.
Microsoft Access stores data in its own format based on the Access Jet Database Engine. It
can also import or link directly todata stored in other applications and databases.[1]
Software developers anddata architects can use Microsoft Access to developapplication
software, and "power users" can use it to build software applications. Like otherOfficeapplications, Access is supported byVisual Basic for Applications, anobject-
orientedprogramming language that can reference a variety of objects including DAO (Data
Access Objects),ActiveX Data Objects, and many other ActiveX components. Visual objects
used in forms and reports expose their methods and properties in the VBA programming
environment, and VBA code modules may declare and call Windowsoperating-
system functions.
Features:
1. Create tables2. Queries3. Forms4. Reports,
And connect them together. Besides these features Ms access has also others features
Functions:
Microsoft Access calls anything that can have a name an object. Within an Access Database,
the main objects are tables, queries, forms, reports, data access pages, macros, and modules.
Database
A database is files in which you store data include all the major objects related to the stored
data; including objects you define to automate the use of your data. In other database
systems, the term database used to refer to only those files in which you store data.
Here is a summary of the major objects in an Access database.
Table
An object you define and use to store data. Each table contains information about a particular
subject, such as customers or orders. Table contains Fields (or columns) that store different
kinds of data, such as a name or an address, and, Records (or rows) that collect all theinformation about a particular instance of the subject.E.g. All the information about a
http://en.wikipedia.org/wiki/Database_management_systemhttp://en.wikipedia.org/wiki/Database_management_systemhttp://en.wikipedia.org/wiki/Microsofthttp://en.wikipedia.org/wiki/Microsoft_Jet_Database_Enginehttp://en.wikipedia.org/wiki/Graphical_user_interfacehttp://en.wikipedia.org/wiki/Microsoft_Officehttp://en.wikipedia.org/wiki/Microsoft_Officehttp://en.wikipedia.org/wiki/Datahttp://en.wikipedia.org/wiki/Microsoft_Access#cite_note-ms-import-1http://en.wikipedia.org/wiki/Microsoft_Access#cite_note-ms-import-1http://en.wikipedia.org/wiki/Microsoft_Access#cite_note-ms-import-1http://en.wikipedia.org/wiki/Software_developerhttp://en.wikipedia.org/wiki/Data_architecthttp://en.wikipedia.org/wiki/Application_softwarehttp://en.wikipedia.org/wiki/Application_softwarehttp://en.wikipedia.org/wiki/Power_usershttp://en.wikipedia.org/wiki/Microsoft_Officehttp://en.wikipedia.org/wiki/Microsoft_Officehttp://en.wikipedia.org/wiki/Visual_Basic_for_Applicationshttp://en.wikipedia.org/wiki/Object-orientedhttp://en.wikipedia.org/wiki/Object-orientedhttp://en.wikipedia.org/wiki/ActiveXhttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/ActiveXhttp://en.wikipedia.org/wiki/Object-orientedhttp://en.wikipedia.org/wiki/Object-orientedhttp://en.wikipedia.org/wiki/Visual_Basic_for_Applicationshttp://en.wikipedia.org/wiki/Microsoft_Officehttp://en.wikipedia.org/wiki/Microsoft_Officehttp://en.wikipedia.org/wiki/Power_usershttp://en.wikipedia.org/wiki/Application_softwarehttp://en.wikipedia.org/wiki/Application_softwarehttp://en.wikipedia.org/wiki/Data_architecthttp://en.wikipedia.org/wiki/Software_developerhttp://en.wikipedia.org/wiki/Microsoft_Access#cite_note-ms-import-1http://en.wikipedia.org/wiki/Datahttp://en.wikipedia.org/wiki/Microsoft_Officehttp://en.wikipedia.org/wiki/Microsoft_Officehttp://en.wikipedia.org/wiki/Graphical_user_interfacehttp://en.wikipedia.org/wiki/Microsoft_Jet_Database_Enginehttp://en.wikipedia.org/wiki/Microsofthttp://en.wikipedia.org/wiki/Database_management_systemhttp://en.wikipedia.org/wiki/Database_management_system -
8/13/2019 Project MS Access
3/16
2
company you can define a primary key (one or more fields that have a unique value for each
record) and, one or more indexes on each table to help retrieve your data more quickly.
Query
Query in an object that provides a custom view of data from one or more tables. In Access,
you can use the graphical query by example (QBE) facility or you can write SQL statementsto create your queries. You can define queries to select, update, insert, or delete data. You can
also define queries that create new tables from data in one or more existing tables.
Form
An object designed primarily for data input or display or for control; of application execution.
You use forms to customise the presentation of data that your application extracts for queries
or tables. You can also print forms. You can design a form to run a macro or a Visual Basic
procedure in response to any of a number of events- for example, to run a procedure when the
value of data changes.
Report
An object designed for formatting, calculating, printing, and summarising selected data. You
can view a report on your screen before you print it.
Working:
Microsoft Access works in the same manner any database does, by storing related
information together and letting you create connections (commonly called relationships)
between different things. The relationships between two different things in MS Access can
be very simple (such as a contact at a customer and the customer itself) or complex. In the
example below, the blue boxes represent the major things we're tracking in our MS Accessdatabase tables, and the reports at right show how you can join the related information for
analysis and reporting.
-
8/13/2019 Project MS Access
4/16
3
Data is stored in Microsoft Access tables (think of them as mini-spread sheets that store only
one type of thing). A table can have many fields (think of them as columns in your spread
sheet). Each field in a table can be set up to allow or prevent users from entering certain
information (for example, you could say one field only accepts dates, another can only allow
a user to enter a numeric value, while another lets them enter anything they want).
Once you have your MS Access tables, fields, and relationships set up, you can create data
entry forms that use those tables to store your information and later create reports with the
data. Microsoft Access forms are incredibly easy and you can use MS Access forms to
simplify data entry for users by grouping related fields together, and hiding fields they don't
need to enter. The Microsoft Access Command Button Wizard even helps you to create
simple buttons for your forms without understanding how to create macros and Visual Basic.
How Ms Access is different?
Consider a problem a spread sheet program is a terrific tool for maintaining and calculating
small sets of information. Microsoft Excel is easy to understand, create column names, enter
your data, create formulas, and you're on your way. You can sort, filter, and format the data
quickly and easily. But spread sheets are not ideal for handling hundreds of records where
you need to have "one version of the truth" for something like a customer, a contact, or main
"thing" you need to track. It is very easy to introduce errors into a spread sheet, which then
makes analysis, summing, and reporting very challenging. The image below provides a quick
example of several key challenges spread sheets face.
-
8/13/2019 Project MS Access
5/16
4
Solution:
Fewer errors and inconsistencies:
Maintaining one version of the truth for the things you need to track minimizes the potential
for duplication, errors, and inconsistent values. In the Excel example above, customer names,
contact phone numbers, and product names are misspelled, transposed, and abbreviated in
different forms. Imagine trying to create a report or graph in Excel that shows an accurate
picture of your sales or other key performance indicators.
Higher productivity:
You and others working in your database need only change a single record and all other
related things in your database will automatically "see" the change. In our Excel example,
you would need to change every occurrence of a customer's name. Find and replace wouldn't
necessarily catch that a customer's name is spelled six different ways. In a database, there is
only one customer record to change. Every other record (orders, contacts, etc.) that relates to
that customer record will never need to change because they are joined to the customer.
-
8/13/2019 Project MS Access
6/16
5
ProjectWe have been asked to create an application to support the sales and marketing functions of a
company .That manufactures and sells snowboards.
As part of that application, we will create a Microsoft Access database that will support
recording sales transactions.
As a proof of concept, we will create some sample forms and queries that will demonstrate
how this application might function as a decision support system for the Sales and Marketing
Departments.
We created:
1. Reports2. Forms3. Tables4. Quires
Create tables:
Using MS Access, create a product table, a customer table, and an order according to the
following specifications. Use the names, data types, and descriptions as indicated. We have
created three tables product tables, customer table and order table.
Steps:
1. Open the data Ms access2. Select blank data base if you r making new data base3. Cells appears you can simple enter the data4. Now go to design view this time the view of window changes o can enter the data5. In design view you can give the primary key6. Tables can also be formed by using wizard
Entering the data:
We were supposed to create 3 tables and then we entered the given data into it
1. The product table2. The customer table3. And the order table
Customer table:
We gave primary key to the customer number. The customer database includes customer
name. Address, city, state country, home and work phone numbers and email id.
-
8/13/2019 Project MS Access
7/16
6
Product table:
Product number has primary key the data base includes the price and its description.
Order table:
Here the primary key is order number .this data base also includes the costumer number .Ms
access can take the customer number from the customer table and product number from the
product table which means that this data base is linkage between the customer table, product
table and order table. The fields includes are. Data base includes the following fields order
number, customer number, product number, salemt, order date, sale type, payment ,card
number, and expiry date,
Create forms:
After entered the data into the three tables, create three forms for entering and editing the data
in the tables. Forms are used to customise the presentation of data that your application
extracts for queries or tables.
Steps:
1. Select the table for which the form is to be created2. Go to create on the ribbon and click the button form in the forms box3. The form is created
-
8/13/2019 Project MS Access
8/16
7
Product form:
Customer form:
Order form:
-
8/13/2019 Project MS Access
9/16
8
Layout view of form:
You can edit the form by using the formatting tools buttons are placed on the bottom so that
user can see the detail at once and move forward and backward.
there are certain others optios in the layout and design view which can edit the forms.
Create Reports:
After you have entered the data into the three tables and making forms next step is to create
three reports for displaying the table data. Report is an object designed for formatting,
calculating, printing, and summarising selected data.
Steps:
1. Select the table for which the report has to be made i.e product table2. Go to the create on the ribbon and click the button report in the report box 3. A report is created
-
8/13/2019 Project MS Access
10/16
9
Product report:
Costumer report:
-
8/13/2019 Project MS Access
11/16
10
Order report:
Creating report using wizard:
Report can also be created by using wizard.
Steps:
1. Click create option2. Click on report wizard3. This Window appears
-
8/13/2019 Project MS Access
12/16
11
4. Enter the available fields and click on next5. Than new window appears click the desire options6. Report is created7. You can change the themes and insert other options in reports as well
Relationships:
A relationship is defined as the association between two or more separate entities.
In Ms Access:
It is an association between 2 common fields (column) in
Two tables.
1. Primary Key2. Foreign Key3. Referential Integrity
Primary key:
The primary key of a relational table uniquely identifies each record in the table. It can either
be a normal attribute that is guaranteed to be unique (such as Social Security Number in a
table with no more than one record per person) or it can be generated by the DBMS (such as
a globally unique identifier, or GUID, in Microsoft SQL Server). Primary keys may consist
of a single attribute or multiple attributes in combination.
Foreign key:
It is a field in one table that is a primary key in another table. It is used to create a relationship
between two tables, normally a one to many relationship. The one side is where it is the
primary key and where it is the foreign key, that is the many tables.
Referential Integrity:
Referential integrity is a database concept that ensures that relationships between tables
remain consistent. When one table has a foreign key to another table, the concept of
referential integrity states that you may not add a record to the table that contains the foreignkey unless there is a corresponding record in the linked table. It also includes the techniques
known as cascading update and cascading delete, which ensure that changes made to the
linked table are reflected in the primary table.
Types of relationships:
1. One-to-One Relationship2. One-to-Many Relationship3. Many-to-Many Relationship
-
8/13/2019 Project MS Access
13/16
12
One-To-Many Relationships
A one-to-many relationship is the most common type of relationship. In this type of
relationship, a row in table A can have many matching rows in table B, but a row in table B
can have only one matching row in table A.A one-to-many relationship is created if only one
of the related columns is a primary key or has a unique constraint.
Many-To-Many Relationships
In a many-to-many relationship, a row in table A can have many matching rows in table B,
and vice versa. You create such a relationship by defining a third table, called a junction
table, whose primary key consists of the foreign keys from both table A and table B.
One-To-One Relationships
In a one-to-one relationship, a row in table A can have no more than one matching row in
table B, and vice versa. A one-to-one relationship is created if both of the related columns are
primary keys or have unique constraints.
Steps:
1. Click on database tool2. Click on relations3. By holding mouse left button drag the fields you want to link
-
8/13/2019 Project MS Access
14/16
13
Here, costumer table has one to many relationships with order table and order table has many
to one relationship with product table.
Creates Queries:
This is the most important part in our project.it links the tables with each others and creates a
database on back end whenever user wants a desire value he simply puts the value and results
appears on screen
To open tables or queries in Query Design view:
Steps:
1. Activate the Create tab.2. Click the Query Design button in the other group. The Show Table dialog box
appears.
3. Activate the Tables tab if you want to base your query on tables, activate the Queriestab if you want base your query on queries or activate the both tab if you want to baseyour query on both tables and queries.
4. Click to choose the table or query on which you want to base your query.5. Click Add. The table appears in the window.
a. Click to choose the next table or query on which you want to base your query.b. Continue clicking tables or queries until you have all the tables and queries
you plan to use.
6. Click Close. Access changes to Query Design view.To retrieve specific records:
-
8/13/2019 Project MS Access
15/16
14
Steps:
1. Open a table or query in Query Design view.2. Choose the field names you want to retrieve in the order you want to retrieve them.3. Choose the field names you want to sort by in the order you want to sort.4. Under the fields you want to sort by, choose Ascending or Descending.5. Deselect the Show button for columns you do not want to display.6. Enter your selection criteria on the Criteria line.7. Click the Run button. Access retrieves the columns you chose and displays the rows
in the order you specified.
Criteria:
Steps:
1. Open a table or query in Query Design view.2. Choose the field names you want to retrieve in the order you want to retrieve them.3. Choose the field names you want to sort by in the order you want to sort.4. Under the fields you want to sort by, choose Ascending or Descending.5. Enter your selection criteria on the Criteria line and the Or line, as needed.6. Deselect the Show button for columns you do not want to display.7. Click the Run button. Access retrieves the columns you chose and displays the rows
in the order you specified
To create a query that uses two or more tables:
Steps:
1. Open the tables and/or queries you want to use in Query Design view.2. Choose the field names you want to retrieve in the order you want to retrieve them.
-
8/13/2019 Project MS Access
16/16
15
3. Choose the field names you want to sort by in the order you want to sort. Under thefields you want to sort by, choose Ascending or Descending.
4. Enter your selection criteria, if necessary.5. Deselect the Show button for columns you do not want to display.6.
Click the Run button. Access retrieves the columns you chose and displays the rowsin the order you specified.
About project:
This data base is a small practice of how the data base is forms .in every organisation they
have their data base which they use daily.in our project we have done the basics of Ms access
in which we forms the queries, forms, tables beside these practices we also learned how data
is entered in the access. This gives us an actual view of how databases are maintained and
how it works.