From the course: Programming Foundations: Databases

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Columns and data types

Columns and data types

From the course: Programming Foundations: Databases

Start my 1-month free trial

Columns and data types

- We've spent some time thinking about what information we'll store in our database, what different tables we want to create, and what fields we'll need. And now it's time to decide what sort of information each of the fields will hold. This might seem a little strange. Our name fields will store names, descriptions will store descriptions, and so on. But when working with a database, we need to tell it specifically what sort of information we're dealing with. This allows the database to store the information more efficiently, and to offer us helpful features based on the type of information. The kind of information stored in each column is called a data type. And these data types break down into a few categories. The first category is strings. A string represents a collection of characters, or individual letters, numbers, and symbols. For string types and for some other types, the length of the information we're storing becomes important. Databases generally accept a handful of…

Contents