Database and Table

 

A database is a collection of related data organized and stored in the form of tables consisting of rows and columns. The rows in a database table are called records and the columns are called fields. For example a college maintains a database consisting of student details and another database consisting of the faculty details. When students take admission in college or when a new faculty to joins the college, the database dose not overlap but is linked together.

         A database contains many tables and each table contains a set of related data. A typical financial database can contain tables for accounts payable, customer records, accounts receivable, vendor, employee records and payroll details. The separate tables are used to eliminate redundant data. Some keywords involved with databases are Database File, table, Records, Field, Data-type and Value. Here is the hierarchy that any DBMS uses in breaking down a database.

 

Database file

 

This is the main file that encompasses the entire database and is saved in the hard-disk, floppy disk or CD Rome.

Example: Class database.mdb in case of MS Access.

 

Table:

 

Imagine your family’s financial records are put into a filing cabinet without organizing. What is the result; you would have a total mass. Hence it is worthwhile to organize the file cabinets by butting related records into specific file folders. Similarly data is not thrown into a database but is separated into related groups called tables analogous to a file folder stored in a filing cabinet. There can be multiple tables in a database.

Example: Students _table; Class_ table.

 

Field:

 

To keep track of data, a table is split into records and fields. A table’s structure looks similar to an Excel worksheet because of the rows and columns present in it. Tables have records (rows) and fields (columns) and can contain multiple fields. Example: Student Last Name; Student First Name; Student Telephone No.

 

Data Types:

 

Data Types are properties of each field and has only one data type. Example: Field Name:

Student Last Name Data Type: Text.

Field Name: Student Telephone No. Data Type: Numeral.

When you design the database, you need to inform the DBMS which data type is associated with each field in the data base tables. Accordingly memory spaces are allocated for the table entries.

  Here is the list of the most common data types and the type of values they hold:

CHAR:

 

Holds between value 0 and 255 characters while creating a column in a table the maximum amount of characters to be stored should be specified

 

LONG VARCHAR:

 

Hold characters which can occupy memory space of maximum of 2 Gigabytes.

 

BIT:

 

Boolean field holds a value of 0 or 1. It is used for yes/no and true/false situations.

 

FLOAT:

 

Stores decimal numbers and is used for mathematical calculations.

 

INT:

 

Stores any whole number between -2147483648 and 2147483648

 

SMALL INT:

 

Same as above except that numbers are limited between -32768 and 32768.

 

DATE:

 

Stores a data

 

DATE TIME:

 

Stores data and time it is also called as TIME STAMP because it is used to time stamp entries or updates to a row or table.

 

VALUE:

 

It is the value which is associated with a data type.

  

 

     

                  

 
Make a Free Website with Yola.