Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 24 pages
Exam (elaborations)

C170 Data Management Chapter 2.2Questions with 100% Verified Correct Answers

Document preview thumbnail
Preview 3 out of 24 pages

C170 Data Management Chapter 2.2Questions with 100% Verified Correct Answers

Content preview

C170 Data Management Chapter 2.2Questions
with 100% Verified Correct Answers
character

string

CHAR(N)

CHAR(N)N bytes

Fixed-length string of length N; 0 ≤ N ≤ 255VARCHAR(N)Length of characters + 1

bytesVariable-length string with maximum N characters; 0 ≤ N ≤ 65,535

VARCHAR

VARCHAR(N)

Length of characters + 1 bytes

Variable-length string with maximum N characters; 0 ≤ N ≤ 65,535

Storing a city's population, which ranges from a dozen to 24 million people.

unsigned MEDIUMINT

unsigned INTEGER

unsigned BIGINT

An INTEGER requires 4 bytes and is sufficient to represent populations that are up to 4.3

billion people. The next smallest data type, MEDIUMINT, can only represent populations up

to 16.8 million.

Storing the annual gain or loss in a city's population, which ranges from -1 million to 1

million.

signed SMALLINT

,unsigned MEDIUMINT

signed MEDIUMINT

A signed MEDIUMINT requires 3 bytes and can store -8,388,608 to 8,388,607.

Storing the price of an item that ranges from a few dollars to a few hundred dollars.

FLOAT

DECIMAL(2,5)

DECIMAL(5,2)

M = 5 and N = 2, so the number of significant digits is 5, and the number of places after the

decimal point is 2. A price like $599.27 has 5 significant digits and 2 numbers after the

decimal point.

Storing the date and time an item is purchased.

DATE

TIME

DATETIME

DATETIME stores both a date and a time. Ex: If an item is purchased on July 4, 2020 at 2:30

pm, the value stored in DATETIME is '2020-07-04 14:30:00'.

Storing a student's assigned letter grade, like A or D.

TINYINT

CHAR(1)

VARCHAR(1)

CHAR

A grade is a single character, and N = 1 uses 1 byte to store each grade.

, Storing a student's email address.

VARCHAR(100)

VARCHAR(10)

CHAR(100)

Each student's email address varies in length, so a VARCHAR is ideal. Using N = 100 means

no email address can exceed 100 characters, which is a reasonable assumption.

Storing a yes or no value.

TINYINT

CHAR(3)

VARCHAR(3)

Typically, a yes/no or true/false value is stored as a 1-byte TINYINT, where 1 means

yes/true, and 0 means no/false. A common term that refers to yes/no is Boolean.

create table

The CREATE TABLE statement creates a new table by specifying the table name, column

names, and column data types.

DROP TABLE

The DROP TABLE statement deletes a table, along with all the table's rows, from a database.

Ex: DROP TABLE Employee; deletes the Employee table.

The Employee table is created with 4 columns.

True

False

the columns are: ID, Name, BirthDate, and Salary.

Document information

Uploaded on
August 8, 2026
Number of pages
24
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$13.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
KenAli
2.6
(18)
Sold
101
Followers
5
Items
21209
Last sold
2 days ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions