Docsity

ICT - Lecture - Databases, Study notes of Information and Communications Technology (ICT)

Partial preview of the text

Download ICT - Lecture - Databases and more Study notes Information and Communications Technology (ICT) in PDF only on Docsity!

Introduction to Databases

What is a database

Database is an organized collection of data. Some examples you may encounter in your daily life are:  (^) A telephone directory  (^) T.V. Guide  (^) Airline reservation system  (^) NADRA record  (^) Motor vehicle registration records  (^) Papers in your filing cabinet  (^) Files on your computer hard drive  (^) Hospital patients  (^) Literature (published articles in a certain field)  (^) Student Information System 2

Types of Databases

 Non-relational databases

 (^) Non-relational databases place information in field categories that we create so that information is available for sorting and disseminating the way we need it.  (^) The data in a non-relational database, however, is limited to that program and cannot be extracted and applied to a number of other software programs, or other database files.  (^) Example: a spread sheet

 Relational databases

 (^) In relational databases, fields can be used in a number of ways (and can be of variable length), provided that they are linked in tables.  (^) It is developed based on a database model that provides for logical connections among files (known as tables) by including identifying data from one table in another table 4

5 A Simple Relational Database Example

Selecting a Database Management

System

Database management systems (or DBMS) can be divided into two categories –  (^) Desktop databases are oriented toward single-user applications and reside on standard personal computers (hence the term desktop).  (^) Server databases contain mechanisms to ensure the reliability and consistency of data and are geared toward multi-user applications. 7

Database Options

Consumer  (^) Flat Files  (^) Microsoft Excel

  • Limit of 65,536 Rows  (^) Microsoft Access  (^) FileMaker Pro  (^) MySQL (Open Source)  (^) Postgres (Open Source) Enterprise RDMS  (^) Oracle  IBM/DB  (^) MS SQL-server  (^) Sybase  Informix  (^) Lotus Notes  MySQL (Open Source)  (^) Postgres (Open Source) 8 Software package for defining and managing a database.

10 Databases and the Web

Database Terminology

Database Management System (DBMS) – Allows a user to deal with data in logical terms, without having to understand the computer's physical view. Logical data view – How humans see things Physical data view – How things are stored in a computer 11

Terminology cont’d

 (^) A record : one piece of data, i.e., one student's information, a recipe, a test question  (^) Each row represents an instance of an entity  (^) Each column represents an attribute of an entity  (^) A layout: a design for a database that contains field names and possibly graphics.  (^) Relationship --> Definitions linking two or more tables  (^) Relationships between entities are represented by values stored in the columns of the corresponding tables 13

File (Table) = Relation Rows (Tuples) = Records Columns (Attributes) = Fields Relationships between objects are defined by common Num Name Credits CS208 CS Fundamentals 3 MT360 Calculus 4 CS320 C Programming 3 Courses

Relational DB Terminology

Records (Rows, Tuples) Fields (Columns, Attributes) 14

Primary Key

  • (^) To ensure that each record is unique in each table, we can set one field to be a Primary Key field.
  • (^) A Primary Key is a field that will contain no duplicates and no blank values. 16

Other Types of Keys

 (^) Secondary Key  (^) A column that is used to aid in the retrieval of information from a table.  (^) A secondary key is not required to have unique values in each of its rows,  (^) Foreign Key  (^) Foreign Keys link to data in other tables  (^) A column used to retrieve information from one table (i.e., is a secondary key) that is also the primary key in another table.  (^) Foreign keys are a major tool in Relational DBs. 17

Data entry considerations

 (^) Define “must” enter fields – no record is complete unless: such and such is entered;  (^) Make data entry fool proof. Example: Grade level can be entered as a number (8 or 8th^ or eight). By using a pull-down menu with the correct data format these mistakes can be avoided. 19

Data Entry – additional considerations  (^) Barcode scanners  (^) USB or  (^) Wireless attached to a Palm or Pocket PC  (^) Pocket PC  (^) WiFi 802.11g, Bluetooth  (^) Wireless networks (real- time on demand systems) 20