The Computer Revolution/Databases/basic structure

From Wikibooks, open books for an open world
< The Computer Revolution
Jump to: navigation, search

[edit] Data Base Storage Hierarchy

Data Bases
A data base is more than a collection of information. It is logical rather than random organization of info designed for a specific purpose. Data bases can be any size or degree of detail, they can be stored manually or by computer. As you will see below they are hierarchical in structure.
Bits & Characters
A bit is the smallest unit of data a computer can store. These representations are made with 0 meaning off and 1 meaning on. Bit is short for "binary digit". When bits are combined into groups of 8 they are called a byte or character. A character can be a letter (A,B,C) number (1,2,3)or special character (+,=,$.) For example the letter G in bits is 01000111. A computer's memory is stored in multiples of bytes like kilobytes, megabytes, gigabytes and so on. Bits and bytes not what the user sees, they are what "the hardware sees" and uses to store info.
Fields
Fields make the binary digits meaningful to users. Examples of a fields are names, addresses, or social security number. A field is comprised of one or more characters. They are useful in storing different types of data like, dates, text only, numbers only, web links only, pictures, sound, or video.
Records
A record is made up of several fields. It's purpose is to store multiple pieces of information about a single entity.
Stephen Harper 24 Susex Drive; Ottawa Ontario, is an example of a record.
Files
At the top of the data base hierarchy is the File. As you may have guessed a File is a collection of related records. A company may keep various types of files which record information about employees. A filed named "Past Employees" may contain information such as date hired, date released, reason for release, salary at time of release and so on. Examples of other types of files are: payroll, retirement benefits,and sales.
There are two types of files known as Program and Data. A program file contains software and instructs the computer to act on information in the data files. Two of the most important types of program files are source and executable. Data files contain several types of data like text, graphics, audio, and video. But unlike program files they do not instruct the computer to do anything. They are used to store data only.

Database Query

Queires are the primary mechanism for retrieving information from a database. They consist of questions presented to the database in a predefined format. A database query can be either a select query or an action query. A select query is simply a data retrieval query. An action query can ask for additional operations with the data, such as insertion, updating, or deletion. Languages used to interact with databases are called query languages. The most popular query language standard is Structured Query Language (SQL).

Official Logo of Database Query MySQL
Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
Sister projects
Print/export