7. Database storage

It has been mentioned that a database needs to store its data as efficiently as possible and that it is able to insert, update and process that data in a sensible way.

But there are all kinds of data needing to be stored such as '1', 'true/false', 'to be or not to be', 21/11/05 and so on

Therefore a database supports the idea of 'data types'. There are a number of standard data types that fit the requirements of most items.

Some of these are

  • NUMERIC : supports the storage of a variety of different numbers such as Integer and floating point
  • DATE: Date and time storage
  • TEXT: Can hold single words
  • STRING: Can hold long phrases
  • BOOLEAN: Stores True / False very efficiently
  • BINARY: Can hold collections of bytes such as an image or a music track, sometimes called a BLOB, Binary Large Object.
  • VARCHAR: Variable length item. You define the maximum size during set up.

When you set up the fields of a table, you normally need to consider the data type of that field.

There are many other data types supported, depending on the particular database application.

 

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: data types in a database

 

 

 

Copyright © www.teach-ict.com