Utility Software II lab 1 Jacek Wiślicki, jacenty@kis.p.lodz.pl original material by Hubert Kołodziejski



Similar documents
Databases with Microsoft Access. Using Access to create Databases Jan-Feb 2003

MS Access: Advanced Tables and Queries. Lesson Notes Author: Pamela Schmidt

MS Access Lab 2. Topic: Tables

3 Data Properties and Validation Rules

Field Properties Quick Reference

Field Name Data Type Description Field Size Format

Table and field properties Tables and fields also have properties that you can set to control their characteristics or behavior.

Chapter 5. Microsoft Access

Microsoft Access 2010 Part 1: Introduction to Access

How to set up a database in Microsoft Access

Microsoft Access 2010 Tables & Field Properties

Introduction to Microsoft Access 2010

4. The Third Stage In Designing A Database Is When We Analyze Our Tables More Closely And Create A Between Tables

- Suresh Khanal. Microsoft Excel Short Questions and Answers 1

Creating a Database in Access

Introduction to Microsoft Access 2013

If the database that is required is similar to a template then whole database can be generated by using a template that already exists.

How To Understand The Basic Concepts Of A Database And Data Science

MS ACCESS DATABASE DATA TYPES

Microsoft Access Basics

Database Database Management System (DBMS)

Lab Manual. Databases. Microsoft Access. Peeking into Computer Science Access Lab manual

Using Microsoft Access Databases

What is a database? The parts of an Access database

Exploring Microsoft Office Access Chapter 2: Relational Databases and Multi-Table Queries

Access I Tables, Queries, Forms, Reports. Lourdes Day, Technology Specialist, FDLRS Sunrise

Lesson 07: MS ACCESS - Handout. Introduction to database (30 mins)

Microsoft Access 2003 Module 1

Access Creating Databases - Fundamentals

Microsoft Access 2007 Module 1

User Services. Microsoft Access 2003 II. Use the new Microsoft

MICROSOFT ACCESS A. CREATING A DATABASE B. CREATING TABLES IN A DATABASE

Microsoft Access 2010

NATIONAL INSTITUTE OF HOTEL MANAGEMENT, KOLKATA

A Basic introduction to Microsoft Access

Microsoft Access XP Session 1 Week 8

Microsoft Using an Existing Database Amarillo College Revision Date: July 30, 2008

Microsoft Access Part I (Database Design Basics) ShortCourse Handout

ACCESS Importing and Exporting Data Files. Information Technology. MS Access 2007 Users Guide. IT Training & Development (818)

INTRODUCTION TO MICROSOFT ACCESS Tables, Queries, Forms & Reports

IN THIS PROJECT, YOU LEARN HOW TO

Using SQL Server Management Studio

Databases and Microsoft Access II

Access Queries (Office 2003)

Lab 9 Access PreLab Copy the prelab folder, Lab09 PreLab9_Access_intro

How To Create A Database For Employee Records In A Club Account In A Computer System In A Cell Phone Or Cell Phone With A Cell Computer (For A Cell)

Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick Reference Guide

PROJECT ON MICROSOFT ACCESS (HOME TAB AND EXTERNAL DATA TAB) SUBMITTED BY: SUBMITTED TO: NAME: ROLL NO: REGN NO: BATCH:

How to Design a Form Report (RTF) Output

European Computer Driving Licence

To determine the fields in a table decide what you need to know about the subject. Here are a few tips:

Creating Database Tables in Microsoft SQL Server

Creating a New MS-Access Database

Microsoft Access 2007 Introduction

Physical Design. Meeting the needs of the users is the gold standard against which we measure our success in creating a database.

Instruction manual. testo easyheat Configuration and Analysis software

Creating a Database using Access 2007

Microsoft Access 2010 Overview of Basics

Using Microsoft Access

Microsoft. Access HOW TO GET STARTED WITH

Microsoft Access Glossary of Terms

Introduction to Microsoft Office Access 2010

testo easyheat Configuration and Analysis software Instruction manual

The column containing phone numbers is a field

Create a New Database in Access 2010

A database is a collection of data organised in a manner that allows access, retrieval, and use of that data.

C omputer D riving L icence

Aras Corporation Aras Corporation. All rights reserved. Notice of Rights. Notice of Liability

Use Find & Replace Commands under Home tab to search and replace data.

.NET Standard DateTime Format Strings

MICROSOFT OFFICE ACCESS LEVEL 2

MS Access. Microsoft Access is a relational database management system for windows. Using this package, following tasks can be performed.

Microsoft Access 3: Understanding and Creating Queries

Parameter Fields and Prompts. chapter

Getting Started With Microsoft Access

2012 Teklynx Newco SAS, All rights reserved.

ECDL. European Computer Driving Licence. Database Software BCS ITQ Level 1. Syllabus Version 1.0

Setting up a basic database in Access 2007

Information Technology Services Kennesaw State University

Global Search v.2.8 for Microsoft Dynamics CRM 4.0

COGNOS Query Studio Ad Hoc Reporting

Business Objects Version 5 : Introduction

BusinessObjects: General Report Writing for Version 5

ICDL Module 5: David Varley

Introduction to. Microsoft Access Practicals

Introduction to Microsoft Jet SQL

GCSE Database Projects in Access

MEDIAplus administration interface

Data Warehousing With Microsoft Access

Customized Reports using Microsoft Access 2010

Using AD fields in Policy Patrol

User Services. Intermediate Microsoft Access. Use the new Microsoft Access. Getting Help. Instructors OBJECTIVES. July 2009

SQL Server An Overview

Creating an Access Database. To start an Access Database, you should first go into Access and then select file, new.

Computer Science 125. Microsoft Access Project

Transcription:

MS ACCESS - INTRODUCTION MS Access is an example of a relational database. It allows to build and maintain small and medium-sized databases and to supply them with a graphical user interface. The aim of the exercise is to get acquainted with MS Access environment and basic techniques of creating a database. MS Access database objects MS Access databases consist of a single file (.mdb). The file contains the following objects: TABLES data sets related to the same subject (each subject should be given a separate table). Data in tables is organized in records (rows) and fields (columns). QUERIES stored database queries retrieving data from tables or requests for performing some specific database operation (create or drop an object, insert, update or delete records). They allow to find data from different tables according to some given criteria and perform some operation on it. FORMS GUI structures meant for manual data management (displaying, entering, updating or deleting). The operate on a one or more tables and can be based on the queries. Forms can be created manually or with a wizard. REPORTS they are meant form data analysis (with some calculations) or presentation (usually in printed form) according to user criteria. They also can be based on the queries. DATA ACCESS PAGES HTML pages performing operations similar to forms. They can also use different data sources, e.g. MS Excel worksheets. MACROS predefined actions (sets of actions) responsible for operations such as form opening or report printing. They introduce some automation without need of programming (although typing or correcting the macro code is still possible). MODULES VBA structures, similar to the ones in MS Excel. Creating a database Launch MS Access, select New from File menu (or click on a toolbar icon, Ctrl + N). Choose empty database option and save it (.mdb file). Once a database is created, one can manage it and all its objects with the object manager: object actions tables queries object-group specific actions forms reports data access pages macros existing objects modules Exercise 1 Create a database with a database wizard. Check options available in the wizard. Exercise 2 Create an empty database and save it as collector. page 1 of 6

TABLES Table is an object meant for storing data related to the same subject. Each record of a table contains information about a particular object within the subject and consists of fields with the detailed data. Tables consist on many fields separately for each portion on information that can be stored in the table. Creating a table requires naming each field and assigning it a specific type. Fields in MS Access tables can be assigned one of the following types: TEXT alphanumeric string with the maximum length on 255 characters. Even if the field consists of a digits (its value looks like a number), it cannot be used for calculations. MEMO as above, but with the maximum length if 65535 characters. NUMBER a numeric field whose value can be used for calculations (except for the financial ones). The number can be 1, 2, 4 or 8-byte long. DATE/TIME date or time, 8 bytes. CURRENCY similar to a number, however during the calculations they are not rounded. Accuracy: 15 integer places and 4 decimal, 8 bytes. AUTONUMBER unique uneditable number automatically assigned to a new row, 4 bytes. YES/NO logical (boolean) values, i.e. true/false, yes/no, on/off, 1 bit. OLE OBJECT object created with any software compliant withe OLE protocol (linked or embeded), e.g. MS Word document, MS Excel document, picture, sound, video, up to 1 GB. HYPERLINK hyperlink, maximum length 3 2048 characters. LINK CREATOR creates a field enabling selecting value from another table or from a list, usually 4 bytes. When designing a a table and choosing a data type for the fields it is necessary to consider the following: what values will be allowed for the field? how long will be the maximum data (bytes)? what operations will be performed on the field values? will the field values be sorted (and how) or indexed? will the field be used for grouping data in queries or reports? Field attributes Besides the data type, the fields can be assigned additional attributes responsible for data presentation and entering. SIZE a maximum character count for a text or a number. Number type Range Precision Memory byte 0 255 N/A 1 B integer -32768 32767 N/A 2 B long integer -2147483648 2147483647 N/A 4 B single precision 1.4 10-45 3.4 10 45 4 4 B double precision 4.9 10-324 1.8 10 308 15 8 B decimal -10-28 -1 10-28 -1 28 12 B FORMAT a standard data presentation (display) format number, currency 6 versions, date/time 7 versions, page 2 of 6

yes/no 3 versions. The most common symbols are: for numeric fields:. decimal separator,, thousand separator, 0 arbitrary digit, # arbitrary digit or no digit, $ dolar symbol, % percent symbol, E-, e- exponential notation, E+, e+ exponential notation, [colour] number colour; for text fields: @ obligatory character, & optional character, < all letters will be converted to lower case, > all letters will be converted to upper case; for date/time fields : hour separator (separators are dependent on Windows settings), / date separator, d one or two digit month day (from 1 to 31), dd two digit month day (from 01 to 31), ddd first three letters of a week day (from Sun do Sat), dddd full week day (from Sunday do Saturday),, m one or two digit month (from 1 to 12), mm two digit month(from 01 to 12), mmm first three letters of a month (from Jan to Dec), mmmm full month (from January to December), k date displayed as a quarter (from 1 to 4), r day number in the year (from 1 to 366), rr last two digits of year (from 01 to 99), rrrr full year (from 0100 to 9999), g one or two digit hour (from 0 to 23), gg two digit hour (from 00 to 23), n one or two digit minutes (from 0 to 59), nn two digit minutes (from 00 to 59), s one or two digit seconds (from 0 to 59), ss two digit seconds (from 00 to 59), AM/PM twelve hour clock with AM or PM (upper case), am/pm twelve hour clock with am or pm (lower case), A/P twelve hour clock with A or P (upper case), a/p twelve hour clock with a or p (lower case); for logical fields (text displayed instead of yes and text displayed instead of no ). DECIMAL PLACES displayed (not stored) number of decimal places for numbers and currencies. Auto according to the format settings or number from 0 to 15 (does not matter in case of undefined or general format). page 3 of 6

INPUT MASK a pattern that the entered data must match. It allows to control a way of entering information. The mask can be designed with a mask creator (text or data/time fields) or manually according to the pattern. The most common symbols are: 0 digit (obligatory), 9 digit or space character (optional), # digit, space, + or - (optional, in edition mode spaces are displayed as empty places but they are removed when saving data), L letter (obligatory),? letter (optional), A letter or digit (obligatory), a letter or digit (optional), & arbitrary character or space (obligatory), C arbitrary character or space (optional),., : ; - / separators, < all letters will be converted to lower case, > all letters will be converted to upper case, n any following character will be displayed as a regular one; Setting the input mask property to Password creates a format for entering passwords. Any character will be displayed as an asterisk *. TITLE displays a column header different from the actual field name (up to 2048 characters). DEFAULT VALUE a value automatically inserted into a field in order to accelerate data entering. Ctrl+Alt+Space restores the default value, Ctrl+' inserts a value from the record above. VALIDATION RULE a criterion responsible for preventing erroneous data. ERROR MESSAGE a message displayed when attempting to enter some data not complying with the validation rule. OBLIGATORY defines if a field must contain some data or may be empty (Null value). If this property is set to No, the integrity rule must be extended with a condition Is Null. ZERO LENGTH ALLOWED defines if an empty string is a valid value (for text, memo and hyperlink fields). Together with the previous property it enables to distinguish between non-existing information and existing unknown information. The combination of both properties results in: Obligatory Zero length allowed Null Empty string No No OK - No Yes OK OK Yes No - - Yes Yes - OK INDEXED indices accelerate data finding and sorting when performing queries. Indexing of memo, hyperlink and OLE object fields is not supported, usually it is useless to index yes/no fields, autonumber fields are indexed by default. The available options are: No no index, Yes (Duplicates OK) field values may duplicate, Yes (No duplicates) field values must be unique. A field should be indexed if: page 4 of 6

data searching or sorting will involve a field, field values will be various, a field will be used as a one of query condition. Index edition is possible from View Indices. Its properties are: Primary if yes, index is automatically set for a field being a primary key, Unique if yes does not allow field values duplicates, Null determines if null-values should be also indexed (affects memory consumption), Multifield index does not rely on a single field, but on a set of fields constituting to the indexed value (e.g. none of the fields is unique, but the set is). Be aware, that indices may deteriorate database state updates (inserting, updating or deleting data), therefore they should be created very carefully, only if really needed. Creating a table In order to create a table follow the steps: choose Tables in object manager and then open Designer (or Create table in designer view), enter the subsequent fields (names and data types), define attributes and properties of all the fields, create indices and primary keys (by means of a manager) keys and indices Exercise 3 Create tables according to the description: page 5 of 6

Exercise 4 Fill the tables with sample data (each table minimum 10 rows). Identifiers in STAMPS table should refer to existing records in ALBUMS and COUNTRIES. page 6 of 6