































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Introduction to Databases What is a database Why do we need a database? Types of Databases
Typology: Study notes
1 / 71
This page cannot be seen from the preview
Don't miss anything!
































































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
(^) 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
(^) 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
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
Consumer (^) Flat Files (^) Microsoft Excel
10 Databases and the Web
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
(^) 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
Records (Rows, Tuples) Fields (Columns, Attributes) 14
Primary Key
(^) 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
(^) 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