# Types of Data: Text, Numbers & Multimedia

An error occurred trying to load this video.

Try refreshing the page, or contact customer support.

Coming up next: Structured Query Language: Manipulating Databases Using SQL

### You're on a roll. Keep up the good work!

Replay
Your next lesson will play in 10 seconds
• 0:43 Analog vs. Digital Data
• 2:24 Character Strings
• 3:27 Numeric Data Types
• 5:17 Boolean Data
• 5:40 Date and Time
• 6:49 Multimedia Types

Want to watch this again later?

Timeline
Autoplay
Autoplay

#### Recommended Lessons and Courses for You

Lesson Transcript
Instructor: Paul Zandbergen

Paul has a PhD from the University of British Columbia and has taught Geographic Information Systems, statistics and computer programming for 15 years.

Discuss the basic types of data found in databases. These include character strings, integers, decimals, images, audio, video and other multimedia types.

## Data Types

Computer systems work with different types of digital data. In the early days of computing, data consisted primarily of text and numbers, but in modern-day computing, there are lots of different multimedia data types, such as audio, images, graphics and video. Ultimately, however, all data types are stored as binary digits. For each data type, there are very specific techniques to convert between the binary language of computers and how we interpret data using our senses, such as sight and sound.

## Analog vs. Digital Data

There are two general ways to represent data: analog and digital. Analog data are continuous. They are 'analogous' to the actual facts they represent. Digital data are discrete, broken up into a limited number of elements. Nature is analog, while computers are digital. Many aspects of our natural world are continuous in nature. For example, think of the spectrum of colors. This is a continuous rainbow of an infinite number of shades.

Computer systems, on the other hand, are not continuous, but finite. All data are stored in binary digits, and there is a limit to how much data we can represent. For example, a color image on a computer has a limited number of colors - the number might be very large, but it is still finite.

Consider the example of color in a bit more detail. The very first monitor displays were essentially text terminals with only a single color. White or light green text appeared on a black background.

Newer monitors used more colors, enough to represent basic images, but were still quite limited. Modern displays have millions of colors and look much more natural. Still, the number of colors is finite. The finite nature of data stored on a computer influences how different types are stored as binary digits. You will see examples of this as the different types are discussed.

## Character Strings

One of the most basic data types is plain text. In database terminology, this is referred to as a character string, or simply a string. A string represents alphanumeric data. This means that a string can contain many different characters, but that they are all considered as if they were text and not put into calculations, even if the characters are numbers.

Consider the following database table:

All of these fields are strings. Fields like the first and last name consist only of text characters, so it makes sense they are stored as a string. The field for the street address contains both numbers and characters and is also stored as a string. The student ID looks like a number, but it really represents a code. It is not a number you want to do any calculations with, so it is stored as a string. Similarly, the ZIP code looks like a number, but is also stored as a string.

## Numeric Data Types

The second most important data type is numeric data. As a general rule, you store numbers only as a numeric data type if they represent a count or measurement of some kind and if it makes sense to perform calculations with them. A ZIP code is a number assigned to a geographic area by the postal service. It would not make much sense to determine the average value for multiple ZIP codes.

There are several different types of numeric data. An integer is a numeric value without a decimal. Integers are whole numbers and can be positive or negative. In a database, a distinction is made between short and long integers, referring to how much data storage is used for the number. A short integer is typically stored using 16 bits, which means that you can store up to 2^16, or 65,536 unique values. For any number larger than that, you would need to use a long integer, which uses 32 bits or more.

A number with a decimal is referred to as a decimal, a float or a double. The terminology varies somewhat with the software being used. The term float comes from 'floating point,' which means you can control where the decimal point is located. The term double refers to using double the amount of storage relative to a float.

In the example table of students below, the field credits completed is an integer, while GPA is a decimal. In both these examples, it would make sense to do calculations. For example, you could use credits completed to calculate how many more credits a student needs to graduate. Or, you could determine the average GPA for all the students.

## Boolean Data

The Boolean data type can only represent two values: true or false. Typically, a zero is used to represent false and a one is used to represent true. In the example table of students, the field Financial Aid is stored as a Boolean, since a student is classified as having financial aid or not.

## Date and Time

Dates and times have their own data type to distinguish them from numeric data. There are many different ways to format dates and times. Some common ways to format dates are:

YYYY-MM-DD - for example 2012-04-01

Month/Day/Year - for example 4/1/2012

Day of the week, month and day, year - for example Sunday, April 1, 2012

Some common ways to format time are:

HH:MM:SS AM/PM - for example 2:45:31 PM

HH:MM:SS - for example 14:45:31

Once a database table has been created using date or time as the data type, you can typically display the values in different ways.

To unlock this lesson you must be a Study.com Member.

### Register for a free trial

Are you a student or a teacher?

#### See for yourself why 30 million people use Study.com

##### Become a Study.com member and start learning now.
Back
What teachers are saying about Study.com

### Earning College Credit

Did you know… We have over 160 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.