MS ACCESS DATABASE DATA TYPES



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

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

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

Field Name Data Type Description Field Size Format

MS Access Lab 2. Topic: Tables

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

Field Properties Quick Reference

sqlite driver manual

Using Microsoft Access Databases

A table is a collection of related data entries and it consists of columns and rows.

Database Migration from MySQL to RDM Server

Using SQL Server Management Studio

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

A list of data types appears at the bottom of this document. String datetimestamp = new java.sql.timestamp(system.currenttimemillis()).

Microsoft Access Basics

Microsoft Access 2010

Databases and Microsoft Access II

Chapter 5. Microsoft Access

10+ tips for upsizing an Access database to SQL Server

!"# $ %& '( ! %& $ ' &)* + ! * $, $ (, ( '! -,) (# *&23. mysql> select * from from clienti;

Creating a Database in Access

How To Create A Table In Sql (Ahem)

Microsoft Access 2003 Module 1

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

Specifications of Paradox for Windows

MySQL+HandlerSocket=NoSQL

Access Creating Databases - Fundamentals

MySQL 5.1 INTRODUCTION 5.2 TUTORIAL

Database Administration with MySQL

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

NATIONAL INSTITUTE OF HOTEL MANAGEMENT, KOLKATA

3 Data Properties and Validation Rules

DDL is short name of Data Definition Language, which deals with database schemas and descriptions, of how the data should reside in the database.

B.1 Database Design and Definition

Microsoft Access 2010 Tables & Field Properties

Customized Reports using Microsoft Access 2010

Microsoft. Access HOW TO GET STARTED WITH

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

Introduction to Microsoft Access 2010

SQL Server An Overview

Microsoft Access 2007 Module 1

How to set up a database in Microsoft Access

Linas Virbalas Continuent, Inc.

Microsoft SQL Server to Infobright Database Migration Guide

Introduction to Relational Databases and SQL

Introduction to Microsoft Access 2013

SQL Server Table Design - Best Practices

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

Services. Relational. Databases & JDBC. Today. Relational. Databases SQL JDBC. Next Time. Services. Relational. Databases & JDBC. Today.

SQL. Short introduction

MYSQL DATABASE ACCESS WITH PHP

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

Ken Goldberg Database Lab Notes. There are three types of relationships: One-to-One (1:1) One-to-Many (1:N) Many-to-Many (M:N).

ODBC Client Driver Help Kepware, Inc.

A Basic introduction to Microsoft Access

C++ Wrapper Library for Firebird Embedded SQL

Microsoft Access 2010 Part 1: Introduction to Access

Conventional Files versus the Database. Files versus Database. Pros and Cons of Conventional Files. Pros and Cons of Databases. Fields (continued)

IN THIS PROJECT, YOU LEARN HOW TO

Topic: Relationships in ER Diagram and Relationships in MS Access

Database Database Management System (DBMS)

MICROSOFT OFFICE ACCESS LEVEL 2

What is a database? The parts of an Access database

Access Part 2 - Design

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)

The Answer to the 14 Most Frequently Asked Modbus Questions

Table of Contents. Introduction: 2. Settings: 6. Archive 9. Search Browse Schedule Archiving: 18

- Suresh Khanal. Microsoft Excel Short Questions and Answers 1

4 Logical Design : RDM Schema Definition with SQL / DDL

Setting up a basic database in Access 2007

INFORMATION BROCHURE Certificate Course in Web Design Using PHP/MySQL

Microsoft SQL Server Connector for Apache Hadoop Version 1.0. User Guide

Guide to Upsizing from Access to SQL Server

The column containing phone numbers is a field

Websense SQL Queries. David Buyer June 2009

Financial Data Access with SQL, Excel & VBA

Jet Data Manager 2012 User Guide

Information Technology NVEQ Level 2 Class X IT207-NQ2012-Database Development (Basic) Student s Handbook

Creating a Database using Access 2007

Once the schema has been designed, it can be implemented in the RDBMS.

Microsoft Access Glossary of Terms

not at all a manual simply a quick how-to-do guide

Data Warehousing With Microsoft Access

Access Queries (Office 2003)

Extracting META information from Interbase/Firebird SQL (INFORMATION_SCHEMA)

INTRODUCTION TO MICROSOFT ACCESS MINIMAL MANUAL

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

Microsoft Access XP Session 1 Week 8

Technology Foundations. Conan C. Albrecht, Ph.D.

2/3/04 Doc 7 SQL Part 1 slide # 1

Ontrack PowerControls User Guide Version 8.0

IT2305 Database Systems I (Compulsory)

Creating a New Database

Black Hat Briefings USA 2004 Cameron Hotchkies

MySQL Storage Engines

Microsoft SQL connection to Sysmac NJ Quick Start Guide

Introduction to SQL for Data Scientists

Transcription:

MS ACCESS DATABASE DATA TYPES Data Type Use For Size Text Memo Number Text or combinations of text and numbers, such as addresses. Also numbers that do not require calculations, such as phone numbers, part numbers, or postal codes. Lengthy text and numbers, such as notes or descriptions. Numeric data to be used for mathematical calculations, except calculations involving money (use Currency type). Set the FieldSize property to define the specific Number type. Date/Time Dates and times. 8 bytes. Currency AutoNumber Yes/No OLE Object Hyperlink Lookup Wizard Currency values. Use the Currency data type to prevent rounding off during calculations. Accurate to 15 digits to the left of the decimal point and 4 digits to the right. Unique sequential (incrementing by 1) or random numbers automatically inserted when a record is added. Fields that will contain only one of two values, such as Yes/No, True/False, On/Off. Objects (such as Microsoft Word documents, Microsoft Excel spreadsheets, pictures, sounds, or other binary data), created in other programs using the OLE protocol, that can be linked to or embedded in a Microsoft Access table. You must use a bound object frame in a form or report to display the OLE object. Field that will store hyperlinks. A hyperlink can be a UNC path or a URL. Creates a field that allows you to choose a value from another table or from a list of values using a combo box. Choosing this option in the data type list starts a wizard to define this for you. Up to 255 characters. Microsoft Access only stores the characters entered in a field; it does not store space characters for unused positions in a Text field. To control the maximum number of characters that can be entered, set the FieldSize property. Up to 64,000 characters. 1, 2, 4, or 8 bytes. 16 bytes for Replication ID (GUID) only. 8 bytes. 4 bytes. 16 bytes for Replication ID (GUID) only. 1 bit. Up to 1 gigabyte (limited by disk space). Up to 64,000 characters. The same size as the primary key field that is also the Lookup field; typically 4 bytes.

For numeric data types, the field size enables you to further define the type of number, which in turn determines the storage size. The table below shows the seven possible settings in the Numeric Field Size property. You should make the field size the smallest one possible; Access runs faster with smaller field sizes. Note the first three settings don t use decimal points, but allow increasingly larger positive or negative numbers. Single and Double permit even larger numbers: Single gives you 7 decimal places, and Double allows 15. Use the Double setting when you need many decimal places or very large numbers. Numeric Field Size Properties Setting Description Decimal Precision Storage Size Byte Stores numbers from 0 to 255 (no fractions). None 1 byte Integer Stores numbers from 32,768 to 32,767 (no fractions). None 2 bytes Long Integer (Default) Stores numbers from 2,147,483,648 to 2,147,483,647 (no fractions). None 4 bytes Decimal Stores numbers from-10^28-1 through 10^28-1 28 12 bytes Single Double Stores numbers from 3.402823E38 to 1.401298E 45 for negative values and from 1.401298E 45 to 3.402823E38 for positive values. Stores numbers from 1.79769313486231E308 to 4.94065645841247E 324 for negative values and from 1.79769313486231E308 to 4.94065645841247E 324 for positive values. 7 4 bytes 15 8 bytes Replication Globally unique identifier (GUID) N/A 16 bytes ID Caution: If you convert a large FieldSize setting to a smaller one in a field that already contains data, you might lose data. For example, if you change the FieldSize setting for a Text data type field from 255 to 50, data beyond the new 50-character setting will be discarded. If the data in a Number data type field doesn't fit in a new FieldSize setting, fractional

MYSQL DATA TYPES TEXT TYPES CHAR( ) VARCHAR( ) TINYTEXT TEXT BLOB MEDIUMTEXT MEDIUMBLOB LONGTEXT LONGBLOB A fixed section from 0 to 255 characters long. A variable section from 0 to 255 characters long. A string with a maximum length of 255 characters. A string with a maximum length of 65535 characters. A string with a maximum length of 65535 characters. A string with a maximum length of 16777215 characters. A string with a maximum length of 16777215 characters. A string with a maximum length of 4294967295 characters. A string with a maximum length of 4294967295 characters. NUMBER TYPES TINYINT( ) SMALLINT( ) MEDIUMINT( ) INT( ) BIGINT( ) FLOAT DOUBLE(, ) DECIMAL(, ) -128 to 127 normal 0 to 255 UNSIGNED. -32768 to 32767 normal 0 to 65535 UNSIGNED. -8388608 to 8388607 normal 0 to 16777215 UNSIGNED. 0 to 4294967295 UNSIGNED. -9223372036854775808 to 9223372036854775807 normal 0 to 18446744073709551615 UNSIGNED. A small number with a floating decimal point. A large number with a floating decimal point. A DOUBLE stored as a string, allowing for a fixed decimal point. DATE TYPES DATE DATETIME TIMESTAMP TIME YYYY-MM-DD. YYYY-MM-DD HH:MM:SS. YYYYMMDDHHMMSS. HH:MM:SS. MISC TYPES ENUM ( ) SET Short for ENUMERATION which means that each column may have one of a specified possible values. Similar to ENUM except each column may have more than one of the specified possible values. ENUM is short for ENUMERATED list. This column can only store one of the values that are declared in the specified list contained in the ( ) brackets. ENUM('y','n') You can list up to 65535 values in an ENUM list. If a value is inserted that is not in the list, a blank value will be inserted. SET is similar to ENUM except SET may contain up to 64 list items and can store more than one choice.

Access Data Type MySQL Equivalent Type Limits Auto-Number - Long Integer Int with auto-increment enabled 0 to 4294967295 UNSIGNED Auto-Number - ReplicationID CHAR(36) 1 N/A Text VARCHAR or TINYTEXT 255 characters Memo Text 65535 characters Number - Byte TinyInt -128 to 127 normal 0 to 255 UNSIGNED. Number - Integer SMALLINT -32768 to 32767 normal 0 to 65535 UNSIGNED. Number - Long Integer INT 0 to 4294967295 UNSIGNED Number - Single FLOAT? 7-digits Number - Double DOUBLE 15 digits Number - Replication ID CHAR(36) 1 N/A Number - Decimal DECIMAL? Date/Time DATETIME N/A Currency N/A? Yes/No N/A 2 0 or 1 OLE Object BLOB? 3 Hyperlink N/A 4? Some notes about the table above: 1. VARCHAR(36) is not exactly equivalent to the proprietary Replication ID (or UUID or GUID) format. A Replication ID is actually a 128-bit, 36-character unique identifier. CHAR(36) is the closest you can currently get with MySQL. 2. There is no MySQL equivalent for the Access Yes/No data type, unfortunately. The closest you can get is to set a TINYINT(1) data type and use your backend scripting language to restrict it to strictly 0 and 1. 3. The BLOB, MEDIUMBLOB and LONGBLOB data types in MySQL are much more efficient and versatile than the OLE Object data type in Access. 4. There is no MySQL equivalent to the Access Hyperlink data type. You don t really need one, either. The closest you can get is the VARCHAR data type. 5. Very Important - As you can see in the table above, the Text data type has a limit of 255 characters. It is not equivalent to the TEXT data type in MySQL. The Memo field, is equivalent to the TEXT data type in MySQL. There is no Access equivalent to the MySQL LONGTEXT data type. Some other notes Please be aware, if you are brand new to working with Access, that there are some major differences in the use of SQL statements, as well. In MySQL, you should always wrap your database entity names (table name, column name, etc.) in accent marks (`). In Access, as long as there are no spaces in the entity name, no wrappers are required. However, if there is a space in the name of your entity (yes, that s allowed in Access), then it needs to be wrapped by square brackets ([Your Name]).

In MySQL, all data can be wrapped with single quotes, no matter its type. In Access, only strings can be wrapped in single quotes. Numbers need to be sent through with no wrappers, and dates must be wrapped by pound/number symbols (#). OPERATORS AND MORE Operator Meaning = Equals < Less than > Greater than <= Less than or equal to >= Greater than or equal to!= Not equal to IS NOT NULL Has a value IS NULL Does not have a value BETWEEN Within a range NOT BETWEEN Outside of a range OR Where one of two conditionals is true AND Where both conditionals are true NOT Where the condition is not true LIKE NOT LIKE For character matching (i.e., LIKE 'Stanfo%') To rule out characters