260 likes | 377 Views
Databases. Database. A database is an organized collection of related data. Types of Databases. There are manual databases and computerized databases. Manual Database.
E N D
Database • A database is an organized collection of related data.
Types of Databases • There are manual databases and computerized databases.
Manual Database • In a school, a filing cabinet in which student paper based files are placed within manila folders which are filed away in a particular order within the filing cabinet, is a common example of a Manual Database.
Manual Database • If you draw up a table in your book to keep track of your monthly expenses this is an example of a simple paper based (manual database).
Manual Database • Table of monthly expenses
Computerized Databases • A Computerized database is created and managed on a computer system using a software called a Database Management System (DBMS).
DBMS • A set of programs that allows the creation of data files and the alteration, extractioin and deletion of data within these files. • Eg. Access., Oracle, MySQL, Ms FoxPro, Dbase, SQL Server.
Types of DBMSs • The most common types of DBMSs are Relational DBMSs and Object Oriented DBMSs.
Relational Database • Relational DBMSs are the most common type and are used to create Relational databases. • A relational database is one in which the data is stored in the form of a table/s with rows and columns. Each table should contain data about one particular subject alone. • All the above named DBMSs are examples of Relational DBMSs.
Object Oriented Database • An Object Oriented DBMS is one in which the data is stored in the form of a set of interacting objects, this type of DBMS is not very common at this time.
Student Table Field Records
Field • A column in a database table that contains data on ONE specific data item only.
Record / Tuple • A row in a database table that consists of a group of related fields.
Primary Key • Each table must contain a field that uniquely identifies each record in a database. • In normal life persons are also assigned unique identifiers e.g. birth certificate number, id card number, credit card number, car license plate etc.
Data type • The data type is the type of data that can be permitted for a particular field.
Field Size • The amount of data can be entered into a particular field.
Class Exercise • You own a video club. Create a database to store data on movies and customers.
Foreign Key • This is the primary key of a table placed into another table, so as to create a link between the two tables.
Import • When data is imported into a database, the data from one file is inserted into the database. • Data can be inserted from several formats: excel, access, comma delimited text files, tab delimited text files.
Question • Import the files ExcelData and CommaData, into the database table Customers
Export • When data is exported into a database, the data from a database table is sent to another file format.
Question • Export the Movie table as a Rich Text format into My Documents.
Query • A query allows the user to ask the database questions about the data within the tables or allows changes to be made to the tables and the data within the tables.
Query types • Select Query: This is used to ask the database questions about the stored data within the tables. • Update Query: Makes changes to records in the tables. • Adds groups of records from one table to another. • Deletes records from a table.