0% found this document useful (0 votes)
20 views4 pages

DATABASE APPIAN Notes

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views4 pages

DATABASE APPIAN Notes

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

A database is an organized or structured set of data, generally stored in a computer.

Databases are mainly used to make searching and retrieving data quick and efficient.

An entity is an abstract concept for something that you want to store information
about. This could be a thing, person, organization, place, unit, object, or item. As an
example, for a vehicle management company, possible entities include vehicle or
customer.
A row in a table is sometimes referred to as a record. While columns provide the
structure for a table, the rows contain the data.
A schema is known as a database’s “blueprint,” and describes how data is organized
within a relational database.

There are different types of schemas.

1. Schemas can be conceptual and offer a big-picture view of what a database


system will look like.
2. Schemas can also be more logical and less conceptual, and include table
names, field names, relationships, and constraints.

Constraints are rules enforced on the columns of a table. These rules help limit the
type of data that can go into a column. The purpose of constraints is to ensure the
data in a database is accurate and reliable
Correct! A primary key is a way to uniquely identify a row in a table. While the Employee ID uniquely
identifies rows in the Employee table, the Department ID uniquely identifies rows in the Department
table.

Data types are an important concept in databases. From an earlier lesson, you know that
data types are used to define what kind of value can be stored in a column. Only one kind,
or type, of value can be stored in any one column.

Play Video
String

There are a few different data types for strings of text. One type is CHAR. This is a fixed
length string, which means every value must contain the same number of characters.
Another type is a VARCHAR. This is a variable length string. You have to set an upper limit on
how many characters the value can be, so if you have a VARCHAR(100), the values in that
column can be any length up to 100. There is also TEXT, which is useful for storing long-form
text strings or when you don’t want to specify a specific length.
Numeric

Numeric types can be exact values or approximate values. Integers and decimals are exact
values, while floating point numbers are approximate values. The difference between exact
and approximate values is precision. A DECIMAL is more precise than a FLOAT or DOUBLE.

Numerics can also have an extra option: UNSIGNED. If a numeric data type is unsigned,
MySQL does not allow negative values. For example, in MySQL, TINYINT is an integer whose
range is from -128 to 127. If the TINYINT is UNSIGNED, the range is now 0 to 255.
Date and Time

Date and Time data types include either a date, a time, or both. An example is DATE. In
MYSQL, if a column is designated as DATE, all the values must be DATE and in the format
YYYY-MM-DD.
Boolean

In databases, a boolean data type is used when you need to store information as either true
or false. In MySQL, if you use BOOLEAN, a zero indicates false and a one is used to indicate
true.
These are the most common primitive data types. Remember that every column must have
a data type and all values in that column must conform to that data type. Different
databases may allow all of these data types, or only some of them.

The CHAR data type is used to store strings with fixed lengths, and TEXT is used to store longer strings of
text.

The above scenario exemplified a process called data normalization. Data


normalization is the process of structuring information in a database to reduce
redundancy and make it more efficient. Data normalization is important for ensuring
that your data is accurate and doesn’t contain any duplicate records. When your data
is efficient and well-structured, it makes it easier to find and use the information you
need.

Domain Prefix Description Where to Use It Examples


To reference a field: recordType!AA
Vehicle.fields.year
Used to reference a record
Functions, such as a!
type object and its
recordType! queryRecordType(), and interface To reference a field in a related
properties: fields, actions,
components record: recordType!AA
filters, and relationships
Vehicle.relationships.
maintenance.fields.issue
rv! Record variable Record type object rv! allows you to reference two
Used to reference record properties
values within the record
type object itself (for rv!record references the data
example, a summary view’s within a specific field: rv!
header)
Domain Prefix Description Where to Use It Examples

record[recordType!Vehicle.make]

rv!identifier references a record’s id


Function variable fv!row is used in grids to reference
Used as a variable input into the data for an entire row
Only available as an input in
fv! certain functions certain functions and interface
Then, you can get the data for a
components, such as grids
particular column in that row: fv!
row[vehicle.vin]

You might also like