We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10
What is a database?
A database is an organized collection of data. A
database program is software which stores and retrieves data in a structured way. There are two types: flat-file databases and relational databases. Flat-file databases A flat-file database stores its data in one table, which is organized by rows and columns. • All databases store data using a system of files, records and fields: • A field is a single item of data, such as a Name or DateofBirth . Each field contains one type of data, for example numbers, text or a date. • A record is a collection of fields, for example, all the information about one person or one item. • A file is an organised collection of records. A file can have one or more tables within it. • Primary Most tables will have a primary key field that holds unique and is the field used to identify that record. • Foreign key fields Some tables will have one or more foreign key fields. A foreign key field in one data table stores values from a primary key field in another table. Data types and sub-types Text : Alphanumeric data can store characters (text) or numeric data (numbers) that will not be used for calculations. Number: A numeric data type is used to store numeric values that may be used for calculations. There are different types of numeric field including: – an integer field or a long integer field. long integer field: if it is going to contain three or more digits – decimal sub-type, which will allow a large number of decimal places. currency :which will allow currency formatting to be added to the display. This includes currency symbols and regional symbols. date and time: which stores a date and/or time as a number. Boolean : stores data as 0/-1 but can display it as Yes/ No (or True/False, 0/1). • Relational databases A relational database stores data in more than one linked table, stored in a file. Relational databases are designed so that the same data is not stored many times. Advantages of relational databases • Duplicated Data is reduced. • Database space is not wasted (due to unnecessary duplicated data. • Quicker to enter Data as there are less duplicates. • Quicker to update Data • One to One relational database • One to many relational database