Sei sulla pagina 1di 16

Project MS Access

Management Information Systems


Team: Danish Mehmood (10-0916)
SUBMITTED TO: SIR QAISER JAVAID SUBMITTION DATE: 6-5-2013

Ayesha Jamil Afridi (10-0922) Nimra Khurshid (10-0909)

Ms Access
Introduction: Microsoft Access, also known as Microsoft Office Access, is a database management system from Microsoft that combines the relational Microsoft Jet Database Engine with a graphical user interface and software-development tools. It is a member of the Microsoft 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 to data stored in other applications and databases.[1] Software developers and data architects can use Microsoft Access to develop application software, and "power users" can use it to build software applications. Like other Office applications, Access is supported by Visual Basic for Applications, an objectoriented programming 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 Windows operatingsystem functions.

Features: 1. 2. 3. 4. Create tables Queries Forms 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 the information about a particular instance of the subject.E.g. All the information about a

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 statements to 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 Access database tables, and the reports at right show how you can join the related information for analysis and reporting.

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.

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.

Project
We 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. 2. 3. 4. Reports Forms Tables 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. 2. 3. 4. 5. 6. Open the data Ms access Select blank data base if you r making new data base Cells appears you can simple enter the data Now go to design view this time the view of window changes o can enter the data In design view you can give the primary key 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 table 2. The customer table 3. 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.

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 created 2. Go to create on the ribbon and click the button form in the forms box 3. The form is created

Product form:

Customer form:

Order form:

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 table 2. Go to the create on the ribbon and click the button report in the report box 3. A report is created

Product report:

Costumer report:

Order report:

Creating report using wizard: Report can also be created by using wizard. Steps: 1. Click create option 2. Click on report wizard 3. This Window appears

10

4. 5. 6. 7.

Enter the available fields and click on next Than new window appears click the desire options Report is created 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 Key 2. Foreign Key 3. 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 foreign key 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 Relationship 2. One-to-Many Relationship 3. Many-to-Many Relationship

11

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 tool 2. Click on relations 3. By holding mouse left button drag the fields you want to link

12

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 Queries tab if you want base your query on queries or activate the both tab if you want to base your 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:

13

Steps: 1. 2. 3. 4. 5. 6. 7. Open a table or query in Query Design view. Choose the field names you want to retrieve in the order you want to retrieve them. Choose the field names you want to sort by in the order you want to sort. Under the fields you want to sort by, choose Ascending or Descending. Deselect the Show button for columns you do not want to display. Enter your selection criteria on the Criteria line. Click the Run button. Access retrieves the columns you chose and displays the rows in the order you specified.

Criteria: Steps: 1. 2. 3. 4. 5. 6. 7. Open a table or query in Query Design view. Choose the field names you want to retrieve in the order you want to retrieve them. Choose the field names you want to sort by in the order you want to sort. Under the fields you want to sort by, choose Ascending or Descending. Enter your selection criteria on the Criteria line and the Or line, as needed. Deselect the Show button for columns you do not want to display. 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.

14

3. Choose the field names you want to sort by in the order you want to sort. Under the fields 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 rows in 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.

15

Potrebbero piacerti anche