Illustrate the usage of Tinyint datatype and also name the default datatype used in LibreOffice base.
Answers
Answer:
Explanation:
By default LibreOffice Base uses the HSQLDB database management system. Like any database system, HSQLDB has a rich set of data types to choose from when building your database. An understanding of the types and when you might, if ever, use them will help you as you create your tables for your database projects. We will look at five categories of data types in LibreOffice base: integers, floating point, text, time, and other.
Integers
An integer is a whole number. There are four integer types, and their differences are mostly related to size.
TINYINT – the smallest of the integer types. Its size is 28. That is 1 to 256 if there are no negatives, and -128 to 127 if there are negatives. You shouldn’t use this type unless you can guarantee the numbers will always fall into this range.
SMALLINT – with a size of 216, this integer type gives you a little more breathing room. If you don’t need negatives, you get 65,536, but if you need negatives, the range is -32,768 to 32,767. Like the TINYINT, make sure your numbers will fall into this range.
INTEGER or INT – the most commonly used integer type, with a size of 232. That’s 4,294,967,296 without negatives and -2,147,483,648 to 2,147,483,647 with negatives. This is the type usually used for record identities. You are pretty safe using this type for most of your integer needs. The one exception is when you need extremely large integer numbers.
BIGINT – rarely used. Size is 264 = big, whopping whole numbers (i.e. 1.84467440737 X 1019). Unless you using some extremely big numbers (calculating the distance to the next parallel world) or extremely small numbers (the size of a pit on an electron), you will not ever need to use this type.
Floating-Point
Floating-point numbers are numbers with decimals, or real numbers. They are made of a whole part and a partial part separated by a decimal point. There are four floating-point types. The basic difference between them is the level of accuracy.