Download presentation
Presentation is loading. Please wait.
Published byJoella Arnold Modified over 9 years ago
1
MS Access Database Tables SQL Reports Queries Plus One Commerce
2
MIS CAS DBMS Database Database structure Relations MS Access MS Access components -detailing Practical Overview
3
Data: Are known facts that can be recorded and which have implicit meaning. It represent facts concerning people, places, objects, entities, events.... Structuring Database for Accounting
4
Database: A database is a collection of data that is organized so that its contents can easily be accessed, managed and updated according to user needs Database Design for Accounting
5
Data Base Management System : It is a collection of programs that enables users to create and maintain a database. It is defined as a general purpose software system that facilitates the process of defining constructing and manipulating databases for various applications Database Design for Accounting
6
Data processing cycle, in the context of accounting involves the following steps: i) Source Documents ii)Input of Data iii)Data Storage iv)Manipulation of data v)Output of data Data Processing Cycle:
7
The process of designing database for accounting begins with an ACCOUNTING REALITY expressed using elements of a conceptual data model. Designing Database for Accounting
8
THE ELEMENTS OF A CONCEPTUAL DATA MODEL: Reality Entity Relationship Design Relational Data Model Normalisation
9
It implies some aspect of a real world situation for which data base is to be designed REALITY ACCOUNTING REALITY It implies a real world accounting situation
10
ACCOUNTING REALITY-EXAMPLE Transactions are documented using VOUCHER VOUCHERS are assigned numbers ( Voucher Number) VOUCHERS document date of transaction, account name, account code etc. Each VOUCHER is Prepared by an employee and authorised by another Employee( EMPLOYEE ) Transactions are documented with respect to ACCOUNTS Each ACCOUNT carries a Unique Code Each ACCOUNT is classified as belonging to ACCOUNT TYPES : Assets/Liabilities/Capital/Income/Expenses
11
Job Card contains JOBDETAILS of employees in various departments Work done by EMPLOYEES are documented using muster rolls Each employees have a unique ID called EmpCode Muster Rolls are Prepared by Supervisor and Authorised by heads of DEPARTMNTS and forwarded to HR Dept. Each Dept has a Dept. Code. HR Dept. Prepares job sheet of each employees using PAY MASTER and forward to Finance Dept/Accounts Dept Accounts Dept updates the SERVICE MASTER and PAY DETAIL ACCOUNTING REALITY – EXAMPLE (PAY ROLL ACCOUNTING)
13
A blueprint or pictorial presentation of accounting reality through ER Model concepts. ER DESIGN
14
It is Representational data model which transforms ER Design in to inter - related data tables Relational Data Model
15
Refining a data base to reduce or avoid data redundancy Normalisation
16
A model that describes the relationships which exist among entities(things) and databases, that are used to express a reality for which a database is to be designed entities Entity Relationship Model (ER Model)
17
Entity Relationship Model (ER Model) Diagram An entity-relationship (ER) diagram is a specialized graphic that illustrates the relationships between entities in a database
18
Entity Relationship Model (ER Model) Diagram Example
19
Entities Attributes Identifiers Relationships Elements of ER Model
20
ENTITY Anything in the real world with independent existence is called entity. ( Person, job, voucher, account etc ) 1. Physical existence : Eg: Person, Car, House 2. Conceptual existence : Eg: Company, Job, Voucher
21
ATTRIBUTE Attributes are characteristics of entities to describe it further. ( Person has name, ID,job, age)
22
TYPES OF ATTRIBUTES Simple or Atomic attributes : Attribute that cannot be further sub divided in to smaller parts. Eg. height of a person
23
TYPES OF ATTRIBUTES Composite attributes : Attribute that can be sub divided in to smaller sub parts. Eg. Name in to First name, Middle name, Last name
24
TYPES OF ATTRIBUTES Single valued attribute : An attribute with single value for an entity. Eg. age has only single value
25
TYPES OF ATTRIBUTES Multi valued attribute : An attribute with multiple values. Eg Educational qualifications
26
Stored Attribute : A basic attribute that contains some stored value is called a stored attribute. E.g. From date of birth age is derived.
27
Derived attribute: The attribute derived from a stored attribute is called a derived attribute. E.g. From date of birth age is derived, and age is called a derived attribute.
28
Complex attribute: A multi valued attribute may be nested or grouped within parentheses () or curly braces {} to constitute complex attribute
29
ENTITY AND ATTRIBUTES ENTITY TYPELIST OF ATTRIBUTES Accounts TypeCatId, Category AccountsCode, Name, Type EmployeesEmpId, Name, Sex, Designation VouchersVno, Date, Debit, Credit, Amount
31
Entity Type, Entity Set, Entity Instance Entity: A real world object Entity Type: Collection of Entities Entity Instance: The values of attributes in an entity Entity Set: Collection of All Entity instances <C123 Avinash Krishna24Accountant Sales DeptAdithyaB001 C124Ammu C A20Clerk Sales DeptAdithyaB001 C125Araya26Cashier Sales DeptAdithyaB001 B101Gomez A35Auditor Finance DeptS JayaA002>
32
Entity….Attributes……Entity Instance………….Entity Set
33
PRIMARY KEY(IDENTIFIER ) OR KEY ATTRIBUTE UNIQUE VALUE
34
Different Entities are related or connected so as to simplify the data storage as well as make it easily accessible. RELATIONSHIP
36
ER PRSENTATION OF ACCOUNTING REALITY EMPLOYEE Prep. By VOUCHER Debit Credit Account Classify Account Type Support Auth By
41
Establishing relationships ………
42
Establishing relationships …… Contd…..
44
Relational Data Model
45
We can interact with different databases using a standard language which is presented in written statements INTERACTING WITH DATABASES
46
o Stands for Structured Query Language o Originally called SEQUEL (Structured English Query Language) o Designed and implemented at IBM as an interface for experimental relational database system called SYSTEM-R SQL
47
Introduction to Microsoft Access 2007
48
Powerful Relational Database Management System (RDBMS) design to run in Microsoft Windows Data can be organized as a set of related tables Integration with other Office applications allows seamless exchange of data with centralized database What is Microsoft Access?
49
Collection of data objects stored with filename extension.mdb (Microsoft database) Main Access data objects Tables Queries Forms Reports Macros Modules Pages What is an Access Database?
50
Access basic Data Objects Tables Queries Forms Reports
51
Data processing cycle, in the context of accounting involves the following steps: i) Source Documents ( Vouchers) ii) Input of Data (Forms) iii) Data Storage (Tables) iv)Manipulation of data (Queries) v)Output of data ( Reports) Data Processing Cycle:
52
How to open Access? Access opens with the dialog box shown here
53
Database Window –Main database design/manageme nt window –Displayed when creating or opening an Access database –You can use the Objects toolbar to access the different objects that make up a database
54
Basic container for data, arranged as a grid of rows and columns Each row contains a single record Each column represents a field within the record Tables A collection of records that identify a category of data, such as Customers, Orders, or Inventory.
56
Creating Tables
57
Creating a new table In the database window, select the Tables tab, then click on New Table creation options Design View Manual table creation by user Table Wizard Automated table creation facility Import table Import data from external tables Link Table Link to data in external tables Create New Table
58
For each field in new database,specify the following items Field Name Data Type Description Creating a new table in Design View
59
Access Data Types. Data TypeUsageSize TextAlphanumeric dataUp to 255 characters MemoAlphanumeric data—sentences and paragraphsUp to 64,000 characters NumberNumeric data1, 2, 4, or 8 bytes (16 bytes for ReplicationID and Decimal) Date/TimeDates and times8 bytes CurrencyMonetary data, stored with 4 decimal places of precision8 bytes AutoNumberUnique value generated by Access for each new record4 bytes (16 bytes for ReplicationID) Yes/NoBoolean (true/false) data OLE ObjectPictures, graphs, or other ActiveX objects from another Windows-based application Up to about 1 gigabyte HyperlinkA link "address" to a document or file on the World Wide Web, on an intranet, on a local area network (LAN), or on your local computer Up to 2048 characters
61
Fields properties Field PropertyPurpose/Note or Example Field sizeSpecifies amount of storage for data in field Note: Test maximum field size = 255 characters FormatPredefined formats for field data Ex: Short date =11/25/97 Input MaskFormatting mask for user data input Ex:Phone number input mask = (XXX)-XXX-XXX Default ValueSpecifies default value in field Note: Speeds up data entry. RequiredSpecifies that a value must be entered in field IndexedTells Access to create an index for this data field Note: Speeds up data searches based on this field
62
What is a primary key? Main index for table Must be unique for each record in table Example: Product number, Employee number, etc. If no such field exist, create a new field with the data type “Autonumber” and specify it as the primary key Access will automatically create unique numbers for this field Assigning a field as the primary key Select field Click on Primary Key button on toolbar (or use “Edit /Primary Key”) A key symbol will appear next to selected field Setting a Primary Key
63
Select “File/Save” or click on the close button for the Table Design View window Access will prompt you to enter a name for the new table Table name can be up to 64 characters Saving the table
64
Entering data using Datasheet view From the Access database window, select the table of interest Click on Open The table will be displayed in datasheet view Type new data directly into fields on datasheet Adding/Deleting records Add new records in empty record at bottom of datasheet Delete records by selecting record, then use Edit/Delete Record Sorting records Click on data field to be sorted Click on sort buttons on toolbar (Ascending and Descending) Disadvantages of datasheet data entry Clumsy to enter data into tables with large number of fields Forms are usually a better choice Entering data into a Table
65
A relational database is a collection of tables that are related to one another based on a common field. A field, or a collection of fields, is designated as the primary key. The primary key uniquely identifies a record in the table. When the primary key of one table is represented in a second table to form a relationship, it is called a foreign key. Relational database and keys
66
Relating tables using a common field
67
You can navigate through the records by using the navigation buttons displayed at the bottom of the Datasheet view window. The navigation bar allows you to: Go to the first record in the table Go to the previous record in the table Go to the next record in the table Go to the last record in the table Create a new record for the table (sometimes called an append record) Navigate a database table
68
A table in datasheet view
69
The navigation bar buttons
70
The Save button in Access differs from the Save button in other Windows programs. When you press the Save button in Access, you are saving the design of the Access objects and NOT the data itself. Access saves data as it is entered For this reason, the location at which you are storing your database must always be accessible while working with a particular database. If the database is located on a diskette, the diskette must be in the diskette drive at all times while working with this particular database Learn how Access saves a database
71
Forms
72
What is form Electronic version of paper form Used to simplify entry of data into an Access database
73
Form advantages Simplifies data entry process Able to display many entry fields on one screen Most commonly used form creation options Creating Forms New form optionsDescription Design ViewManual form creation (maximum control) Form WizardAutomated form creation assistant Auto formAutomatically creates form without user intervention
74
Using Form Wizard From the Access database window, click on the Forms tab, then click on New The New Form dialog box will be displayed Select the name of the table or query to be used to create the new form Form creation steps Field selection Form layout Style Creating forms with Form Wizard
75
Field selection Form layout Style
76
Form navigation The form wizard displays the new form at the end of the form creation process The contents of the first record are displayed Record navigation controls(lover left corner of form Using the New Form Record navigation controlAction |<Move to first record <Move to previous record >Move to next record >|Move to last record >*Move to new blank record
77
Access Form View
78
Queries
79
What is query? Structured request for specific ingomation from database Created in Access using New Query Query created with graphical tools(Query by example) Underlying code produced in SQL Creating a query in design view From Access database window, select Queries tab, then click on New Select Design View Creating queries
80
What is a Query? A question asked of the database Used to extract specific information from database Queries are composed of structured query language(SQL) statements Access allows queries to be created graphically Hides complexity of SQL language Queries
81
Specify fields to show Select the fields to be displayed by clicking on the Show checkbox Specify criteria Enter the criteria expression for the desired field in the query grid In this example, we want to select all products whose price is less than$4.75 We will set the criteria for the Price column to “<4.75” if multiple fields have criteria set, they must all be satisfied to select record (logical AND) Viewing SQL Use View/SQL to see a listing of the SQL statements produced by the design Queries
82
If you want to see just a portion of the data in a table you can create a query. A query is a question you ask about the data stored in a database table. Access responds by displaying the data according to your question. For example, if you ask to see all the customers from New York, the response would be to display only the records whose state field matches with NY What is an Access query?
83
You can open an existing query by clicking Queries on the Objects bar and then selecting the query you want to open. You can also create your own queries by clicking New on the Database window. To create a new query, you can use the Simple Query Wizard, which will bring you through the selections you want for your query. Open an existing query and create new queries
84
When you run and get the results of your query, you can reorganize the data by sorting the datasheet in either ascending or descending order. Click the pointer anywhere in the column you wish to sort Click the Sort Ascending or Sort Descending buttons on the Query Datasheet toolbar to sort the results in the desired sequence You can navigate through the records by using the navigation buttons on the Navigations toolbar. Navigating a query and sorting the results
85
Sample Query Datasheet view
86
You can create a query that will display only selected fields from a table instead of displaying all fields. In the Simple Query Wizard dialog box, select which fields you want included in the query. Move all the fields into the Selected Fields box Move the fields one at a time Remove fields out of the Selected Fields box by pressing one of the remove buttons If you wanted to select all the fields except one, you can move them all to the selected fields list and then remove the one field you don't want. Once you have made your selections, press Next to move to the next dialog box in the Wizard. Selecting fields to include in a query
87
The Simple Query Wizard
88
Reports
89
What is report? Formatted template used to print reports of database or query results Allows user to specify fields, grouping levels, arrangement of printed data Report
90
Using the Report Wizard From the Access database window, click on Reports tab,then click Report creation steps Field selection Sort order Layout Style Title/preview Creating Reports
91
You can create a report, which is a printed version of your data, that is formatted according to your specifications. The data in the report can consist of data from a single table or multiple tables. Access has a Reports Wizard that allows you to easily create a report. The report can be based on a table or it can be based on a query. If the report is based on a query, it will contain the same fields that were selected for the query Create, preview, and navigate a report
92
The Report Preview window
93
THANK YOU HSSLIVE.IN
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.