Download presentation
Published byNicholas Baldwin Page Modified over 9 years ago
1
3 / 12 Databases MIS105 Lec13 Irfan Ahmed Ilyas CHAPTER Prepared By:
Mr. S. A. Raza Mr. Irfan A. Ilyas Delivered in: Week #1 (26 – 30 Jan, 2002)
2
Prepared By: Irfan Ilyas
Lecture Objectives Database Concepts Data Organization in databases Key Field Main activities in Database Maintenance Defining data Creating data Manipulating data Database Usage 02/3/2002 Prepared By: Irfan Ilyas
3
Prepared By: Irfan Ilyas
Database Concepts A database is a structured collection of related data, stored in some medium for some specific purpose. A database usually represents some real world environment, thus reflecting changes happening in that environment. Examples: Addresses/ telephone numbers stored in some indexed address book Course related data saved on a computer disk using some software like Microsoft Excel, Microsoft Access etc. 02/3/2002 Prepared By: Irfan Ilyas
4
Data Organization in Databases
Character Character Character Field Cha.. Field…… Cha.. Field Record Data File Record :………. Data File ……….. A Database 02/3/2002 Prepared By: Irfan Ilyas
5
Data Organization Example
In a University database A L I Field: ID … Field: Score 7 0 Field: Name Record for Ali File: Student Record for Rasheed Record for … University Database File: Course File: Faculty 02/3/2002 Prepared By: Irfan Ilyas
6
Prepared By: Irfan Ilyas
A Database Example 02/3/2002 Prepared By: Irfan Ilyas
7
Prepared By: Irfan Ilyas
….Database Concepts Key Field Searching a particular record uniquely in a data file requires at least one field unique in value for all records Example, in STUDENT file StudentNumber is such a field Common example of key values (in daily life databases) Social Security Number Driver’s License Student ID Numbers 02/3/2002 Prepared By: Irfan Ilyas
8
Prepared By: Irfan Ilyas
Electronic Databases Databases on some electronic media like disks Computer programs are needed to maintain/ use on disk databases Three main activities for electronic database maintenance Defining Specifying the data types, data validation rules etc. for the data values Creating Storing the data values (as defined by the user) on some physical medium Manipulating Querying/ searching/ updating the data values Checking the conformance with the defined data constraints (validation rules) 02/3/2002 Prepared By: Irfan Ilyas
9
Prepared By: Irfan Ilyas
Database Usage Databases are mostly used as an integral part of related Information Systems Accounting Staff Registration Staff Accounting Information System Registration Information System A shared database in a University environment 02/3/2002 Prepared By: Irfan Ilyas
10
Database Implementation Approaches
Flat File Approach Every data file is tried to be rich in all the relevant details Every data file is used on a localized basis (e.g. one file for each department). This makes every file independent of the other files in the database Benefit: Data Reporting is easily done on each file independently Disadvantage: Data inconsistencies may result due to data redundancies (duplications) 02/3/2002 Prepared By: Irfan Ilyas
11
Prepared By: Irfan Ilyas
A Flat File Database A Student Grade Database All the information needed is placed in one single data file For example, a spreadsheet containing a single student grade file No need to refer to any other file for data reporting Redundant data values In GRADE_REPORT: Student’s personal information includes: StudentNumber, StudentName, Class, Major Whenever a grade record for a student is inserted in the file, his personal information is repeated. 02/3/2002 Prepared By: Irfan Ilyas
12
.. A Student Grade Database
Possible Data Updation Anomalies (abnormality) When adding a grade for an already existing student, his personal information needs to be consistent with the existing ones (Insertion Anomaly) If all grade records for a specific student are deleted, other details for that student will also be lost (Deletion Anomaly) If any student’s number is modified, this needs a change in all other grade records of the same student (Modification Anomaly) 02/3/2002 Prepared By: Irfan Ilyas
13
Prepared By: Irfan Ilyas
02/3/2002 Prepared By: Irfan Ilyas
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.