7/2/2024 1 Fundamentals of Database System Dilla University College of Engineering and Technology Department of Computer Science
Introduction 7/2/2024 2  Data: What is data?  Facts concerning people, objects, events or other entities.  Can be in the form of text, graphics, sound and video segments  They are difficult to interpret or make decisions based on  Unprocessed, raw facts and can be stored in database  Information: What is Information?  Data presented in a form suitable for interpretation.  Data processed to be useful in decision making.  Processed data  Can’t be stored in database
Introduction … cont’d 7/2/2024 3  Database: What is database?  An organized collection of logically related data.  A shared collection of logically interrelated data designed to meet the varied information needs of an organization.  A shared collection – can be used simultaneously by many department and user  Logically related - comprise the important objects and the relationships between these objects  A computerized means of record keeping system
Introduction …. cont’d 7/2/2024 4 A database has the following implicit properties:  A database represents some aspect of the real world, sometimes called the mini world or the Universe of Discourse (UoD).  Changes to the mini world are reflected in the database.  A database is a logically coherent collection of data with some inherent meaning.  A random assortment of data cannot correctly be referred to as a database.  A database is designed, built, and populated with data for a specific purpose.
Introduction …. cont’d 7/2/2024 5 Course Section Semester Name Rank MIS 3353 100 Su 01 Kemp Instr MIS 3353 200 Su 01 Schwarzkopf Assoc P MIS 3373 200 Su 01 Kemp Instr MIS 4663 900 Fa 01 Schwarzkopf Assoc P MIS 4663 901 Fa 01 Van Horn Prof Data
Introduction … cont’d 7/2/2024 6  Meta Data: What do we mean by meta data?  Descriptions of the properties or characteristics of the data, including data types, field sizes, allowable values, and documentation  Data that describes data  Data about data  Description of fields  Display and format instructions  Structure of files and tables  Security and access rules  Triggers and operational rules
Introduction …. cont’d 7/2/2024 7 Metadata Data Item Value Name Type Length Min Max Description Course Char 7 Three digit depart- ment reference and 4 digit Section Integer 3 001 900 Section number Semester Char 10 Semester and year Name Char 30 Instructor name Rank Char 10 Instructor rank
Data management approaches 7/2/2024 8  Data management : keeping your data records We have three approaches  Manual Approach  File-Based Approach  Database Approach Manual File Handling Systems  The primitive and traditional way of information handling  This may work well if the number of items to be stored is small.  Includes intensive human labor  Events and objects are written on files (paper)  Each of the files containing various kinds of information is labeled and stored in one or more cabinets  The cabinets could be kept in safe places for security
Manual File Handling Systems ..cont’d 7/2/2024 9 Limitations of Manual File Handling  Problem of Data Organization  Problem of Efficiency  Prone to error  Difficult to update, retrieve, integrate  You have the data but it is difficult to compile the information  Significant amount of duplication of data  Cross referencing is difficult Two computerized approaches evolved to overcome the limitations of the above approaches  File based approach  decentralised  Database approach centralised
7/2/2024 10  File based systems were an early attempt to computerize the manual filing system.  It is a decentralized computerized data handling method i.e. to develop a program or a number of programs for each different application.  Since every application defines and manages its own data, the system is subjected to serious data duplication problem. File based Approach
Limitations of File-Based systems 7/2/2024 11  Data Redundancy (Duplication of data)  Same data is held by different programs  Staffsalary(staffno, name, sex, salary)  Staff(staffno,name,position,sex,dateofb,salary)  Wasted space (Uncontrolled duplication of data)  Separation and isolation of data – Each program maintains its own set of data. Users of one program may be unaware of potentially useful data held by other programs.  Limited data sharing- No centralized control of data  Data Inconsistency and confusion  Data dependence  File structure is defined in the program code and is dependent on the application programming language.
Limitations of File-Based systems .. Cont’d  Incompatible file formats - Lack of data sharing and availability)  Programs are written in different languages, and so cannot easily access each others files. E.g. Personnel write in C, Payroll writes in COBOL  Poor Security and administration  Update Anomalies  Modification Anomalies  Deletion Anomalies  Insertion Anomalies 7/2/2024 12
Database Approach 7/2/2024 13  Here, a single repository of data is maintained.  What emerged were the database and database management systems  Basic Database terminologies  Enterprise: an organization like library, bank, university, etc.  Entity: Person, place, thing, or event about which we wish to keep data  Attribute (Field): Property of an entity. E.g. Name, age, telephone, grade, sex, etc.  Record: A logically connected set of one or more Attributes that describe a person, place or thing. (Logically related data)  File: A collection of related records. E.g. Student file  Relationship: an association among entities (entity records)  Query: question asked for database
Benefits of Database systems 7/2/2024 14  Data can be shared: two or more users can access and use.  Improved data accessibility: By using structured query languages, the users can easily access data without programming experience.  Redundancy can be reduced: Isolated data is integrated in database.  Quality data can be maintained: the different integrity constraints in the database approach will maintain the quality leading to better decision making.  Inconsistency can be avoided: controlled data redundancy will avoid inconsistency of the data in the database to some extent.  Transaction support can be provided: basic demands of any transaction support systems are implanted in a full scale DBMS.
Benefits of Database systems … cont’d 7/2/2024 15  Integrity can be maintained: Data at different applications will be integrated together with additional constraints.  Security measures can be enforced: The shared data can be secured by data security mechanisms.  Improved decision support: the database will provide information useful for decision making  Standards can be enforced: ways of using different data by users  Less Labor: data maintenance will not demand much resource  Centralized information control: Since relevant data in the organization will be stored at one repository, it can be controlled and managed at the central level.  Data Independence - Applications insulated from how data is structured and stored
Limitations and risk of database approach 7/2/2024 16  Introduction of new professional and specialized personnel  High cost to be incurred to develop and maintain the system  Complex backup and recovery services from the users perspective  High impact on the system when failure occurs to the central system
Users and Actors of Database System 7/2/2024 17  Actors on the scene: The people whose jobs involve the day-to-day use of a large database  Workers behind the scene: Those who work to maintain the database system environment, but who are not actively interested in the database itself. Actors on the Scene  Database Administrators  Database Designers  End Users  System Analysts and Application Programmers (Software Engineers)
Database Administrators 7/2/2024 18  In a database environment, the primary resource is the database itself and the secondary resource is the DBMS and related software.  Administering these resources is the responsibility of the Database Administrator (DBA).  The DBA is responsible for authorizing access to the database, for coordinating and monitoring its use, and for acquiring software and hardware resources as needed.  The DBA is accountable for problems such as breach of security or poor system response time.
Database Designer 7/2/2024 19  Database designers are responsible for identifying the data to be stored in the database and for choosing appropriate structures to represent and store this data.  It is the responsibility of database designers to communicate with all prospective database users, in order to understand their requirements, and to come up with a design that meets these requirements.  In many cases, the designers are on the staff of the DBA and may be assigned other staff responsibilities after the database design is completed.  The final database design must be capable of supporting the requirements of all user groups.
End Users 7/2/2024 20  End users are the people whose jobs require access to the database for querying, updating, and generating reports;  The database primarily exists for their use. There are several categories of end users:  Casual end users:- occasionally access the database. They are typically middle or high-level managers or other occasional browsers.  Naive or parametric end users:- Their main job revolves around constantly querying and updating the database, using standard types of queries and updates called canned transactions that have been carefully programmed and tested.  Bank tellers check account balances and post withdrawals and deposits  Reservation clerks for airlines, hotels, and car rental companies check availability for a given request and make reservations
End Users … Cont’d 7/2/2024 21  Sophisticated end users: Include engineers, scientists, business analysts, and others who thoroughly familiarize themselves with the facilities of the DBMS so as to implement their applications to meet their complex requirements.  Stand-alone users: Maintain personal databases by using ready made program packages that provide easy to use menu or graphics based interfaces.  An example is the user of a tax package that stores a variety of personal financial data for tax purposes.
System Analysts and Application Programmers (Software Engineers) 7/2/2024 22  System analysts: Determine the requirements of end users, especially naive and parametric end users, and develop specifications for canned transactions that meet these requirements.  Application programmers implement these specifications as programs; then they test, debug, document, and maintain these canned transactions.  Such analysts and programmers (nowadays called software engineers) should be familiar with the full range of capabilities provided by the DBMS to accomplish their tasks.
Workers behind the Scene 7/2/2024 23  These persons are typically not interested in the database itself. These include:  DBMS system designers and implementers:-are persons who design and implement the DBMS modules and interfaces as a software package.  A DBMS is a complex software system that consists of many components or modules, including modules for implementing the catalog, query language, interface processors, data access, concurrency control, recovery, and security.  The DBMS must interface with other system software, such as the operating system and compilers for various programming languages
Workers behind the Scene … cont’d 7/2/2024 24  Tool developers: Include persons who design and implement tools  Tools are software packages that facilitate database system design and use, and help improve performance.  Tools are optional packages that are often purchased separately.  They include packages for database design, performance monitoring, natural language or graphical interfaces, prototyping, simulation, and test data generation.  Operators and maintenance personnel: are the system administration personnel who are responsible for the actual running and maintenance of the hardware and software environment for the database system.
Some Common uses of Databases 7/2/2024 25 In a university  Containing information about a student, the course she/he is enrolled in, the dormitory she/he has been given.  Containing details of Staff who work at the university at personnel, payroll, etc. In a library  There may be a database containing details of the books in the library and details of the users,  The database system handles activities such as  Allowing a user to reserve a book  Notifying when materials are overdue:
Some Common uses of Databases … Cont’d 7/2/2024 26 In travel agencies  When you make inquiries about a travel, the travel agent may access databases containing flight details  Flight no., date, time of departure, time of arrival Insurance  When you wish to take out insurance, there is database containing  Your personal details: name, address, age  information on whether you drink or smoke,  Your medical records to determine the cost of the insurance Supermarkets  When you buy goods from some supermarkets, a database will be accessed.  The checkout assistant will run a barcode reader over the purchases.
7/2/2024 27

Chapter 1 - Introduction to Database Systems.ppt

  • 1.
    7/2/2024 1 Fundamentals of DatabaseSystem Dilla University College of Engineering and Technology Department of Computer Science
  • 2.
    Introduction 7/2/2024 2  Data: Whatis data?  Facts concerning people, objects, events or other entities.  Can be in the form of text, graphics, sound and video segments  They are difficult to interpret or make decisions based on  Unprocessed, raw facts and can be stored in database  Information: What is Information?  Data presented in a form suitable for interpretation.  Data processed to be useful in decision making.  Processed data  Can’t be stored in database
  • 3.
    Introduction … cont’d 7/2/2024 3 Database: What is database?  An organized collection of logically related data.  A shared collection of logically interrelated data designed to meet the varied information needs of an organization.  A shared collection – can be used simultaneously by many department and user  Logically related - comprise the important objects and the relationships between these objects  A computerized means of record keeping system
  • 4.
    Introduction …. cont’d 7/2/2024 4 Adatabase has the following implicit properties:  A database represents some aspect of the real world, sometimes called the mini world or the Universe of Discourse (UoD).  Changes to the mini world are reflected in the database.  A database is a logically coherent collection of data with some inherent meaning.  A random assortment of data cannot correctly be referred to as a database.  A database is designed, built, and populated with data for a specific purpose.
  • 5.
    Introduction …. cont’d 7/2/2024 5 CourseSection Semester Name Rank MIS 3353 100 Su 01 Kemp Instr MIS 3353 200 Su 01 Schwarzkopf Assoc P MIS 3373 200 Su 01 Kemp Instr MIS 4663 900 Fa 01 Schwarzkopf Assoc P MIS 4663 901 Fa 01 Van Horn Prof Data
  • 6.
    Introduction … cont’d 7/2/2024 6 Meta Data: What do we mean by meta data?  Descriptions of the properties or characteristics of the data, including data types, field sizes, allowable values, and documentation  Data that describes data  Data about data  Description of fields  Display and format instructions  Structure of files and tables  Security and access rules  Triggers and operational rules
  • 7.
    Introduction …. cont’d 7/2/2024 7 Metadata DataItem Value Name Type Length Min Max Description Course Char 7 Three digit depart- ment reference and 4 digit Section Integer 3 001 900 Section number Semester Char 10 Semester and year Name Char 30 Instructor name Rank Char 10 Instructor rank
  • 8.
    Data management approaches 7/2/2024 8 Data management : keeping your data records We have three approaches  Manual Approach  File-Based Approach  Database Approach Manual File Handling Systems  The primitive and traditional way of information handling  This may work well if the number of items to be stored is small.  Includes intensive human labor  Events and objects are written on files (paper)  Each of the files containing various kinds of information is labeled and stored in one or more cabinets  The cabinets could be kept in safe places for security
  • 9.
    Manual File HandlingSystems ..cont’d 7/2/2024 9 Limitations of Manual File Handling  Problem of Data Organization  Problem of Efficiency  Prone to error  Difficult to update, retrieve, integrate  You have the data but it is difficult to compile the information  Significant amount of duplication of data  Cross referencing is difficult Two computerized approaches evolved to overcome the limitations of the above approaches  File based approach  decentralised  Database approach centralised
  • 10.
    7/2/2024 10  File basedsystems were an early attempt to computerize the manual filing system.  It is a decentralized computerized data handling method i.e. to develop a program or a number of programs for each different application.  Since every application defines and manages its own data, the system is subjected to serious data duplication problem. File based Approach
  • 11.
    Limitations of File-Basedsystems 7/2/2024 11  Data Redundancy (Duplication of data)  Same data is held by different programs  Staffsalary(staffno, name, sex, salary)  Staff(staffno,name,position,sex,dateofb,salary)  Wasted space (Uncontrolled duplication of data)  Separation and isolation of data – Each program maintains its own set of data. Users of one program may be unaware of potentially useful data held by other programs.  Limited data sharing- No centralized control of data  Data Inconsistency and confusion  Data dependence  File structure is defined in the program code and is dependent on the application programming language.
  • 12.
    Limitations of File-Basedsystems .. Cont’d  Incompatible file formats - Lack of data sharing and availability)  Programs are written in different languages, and so cannot easily access each others files. E.g. Personnel write in C, Payroll writes in COBOL  Poor Security and administration  Update Anomalies  Modification Anomalies  Deletion Anomalies  Insertion Anomalies 7/2/2024 12
  • 13.
    Database Approach 7/2/2024 13  Here,a single repository of data is maintained.  What emerged were the database and database management systems  Basic Database terminologies  Enterprise: an organization like library, bank, university, etc.  Entity: Person, place, thing, or event about which we wish to keep data  Attribute (Field): Property of an entity. E.g. Name, age, telephone, grade, sex, etc.  Record: A logically connected set of one or more Attributes that describe a person, place or thing. (Logically related data)  File: A collection of related records. E.g. Student file  Relationship: an association among entities (entity records)  Query: question asked for database
  • 14.
    Benefits of Databasesystems 7/2/2024 14  Data can be shared: two or more users can access and use.  Improved data accessibility: By using structured query languages, the users can easily access data without programming experience.  Redundancy can be reduced: Isolated data is integrated in database.  Quality data can be maintained: the different integrity constraints in the database approach will maintain the quality leading to better decision making.  Inconsistency can be avoided: controlled data redundancy will avoid inconsistency of the data in the database to some extent.  Transaction support can be provided: basic demands of any transaction support systems are implanted in a full scale DBMS.
  • 15.
    Benefits of Databasesystems … cont’d 7/2/2024 15  Integrity can be maintained: Data at different applications will be integrated together with additional constraints.  Security measures can be enforced: The shared data can be secured by data security mechanisms.  Improved decision support: the database will provide information useful for decision making  Standards can be enforced: ways of using different data by users  Less Labor: data maintenance will not demand much resource  Centralized information control: Since relevant data in the organization will be stored at one repository, it can be controlled and managed at the central level.  Data Independence - Applications insulated from how data is structured and stored
  • 16.
    Limitations and riskof database approach 7/2/2024 16  Introduction of new professional and specialized personnel  High cost to be incurred to develop and maintain the system  Complex backup and recovery services from the users perspective  High impact on the system when failure occurs to the central system
  • 17.
    Users and Actorsof Database System 7/2/2024 17  Actors on the scene: The people whose jobs involve the day-to-day use of a large database  Workers behind the scene: Those who work to maintain the database system environment, but who are not actively interested in the database itself. Actors on the Scene  Database Administrators  Database Designers  End Users  System Analysts and Application Programmers (Software Engineers)
  • 18.
    Database Administrators 7/2/2024 18  Ina database environment, the primary resource is the database itself and the secondary resource is the DBMS and related software.  Administering these resources is the responsibility of the Database Administrator (DBA).  The DBA is responsible for authorizing access to the database, for coordinating and monitoring its use, and for acquiring software and hardware resources as needed.  The DBA is accountable for problems such as breach of security or poor system response time.
  • 19.
    Database Designer 7/2/2024 19  Databasedesigners are responsible for identifying the data to be stored in the database and for choosing appropriate structures to represent and store this data.  It is the responsibility of database designers to communicate with all prospective database users, in order to understand their requirements, and to come up with a design that meets these requirements.  In many cases, the designers are on the staff of the DBA and may be assigned other staff responsibilities after the database design is completed.  The final database design must be capable of supporting the requirements of all user groups.
  • 20.
    End Users 7/2/2024 20  Endusers are the people whose jobs require access to the database for querying, updating, and generating reports;  The database primarily exists for their use. There are several categories of end users:  Casual end users:- occasionally access the database. They are typically middle or high-level managers or other occasional browsers.  Naive or parametric end users:- Their main job revolves around constantly querying and updating the database, using standard types of queries and updates called canned transactions that have been carefully programmed and tested.  Bank tellers check account balances and post withdrawals and deposits  Reservation clerks for airlines, hotels, and car rental companies check availability for a given request and make reservations
  • 21.
    End Users …Cont’d 7/2/2024 21  Sophisticated end users: Include engineers, scientists, business analysts, and others who thoroughly familiarize themselves with the facilities of the DBMS so as to implement their applications to meet their complex requirements.  Stand-alone users: Maintain personal databases by using ready made program packages that provide easy to use menu or graphics based interfaces.  An example is the user of a tax package that stores a variety of personal financial data for tax purposes.
  • 22.
    System Analysts andApplication Programmers (Software Engineers) 7/2/2024 22  System analysts: Determine the requirements of end users, especially naive and parametric end users, and develop specifications for canned transactions that meet these requirements.  Application programmers implement these specifications as programs; then they test, debug, document, and maintain these canned transactions.  Such analysts and programmers (nowadays called software engineers) should be familiar with the full range of capabilities provided by the DBMS to accomplish their tasks.
  • 23.
    Workers behind theScene 7/2/2024 23  These persons are typically not interested in the database itself. These include:  DBMS system designers and implementers:-are persons who design and implement the DBMS modules and interfaces as a software package.  A DBMS is a complex software system that consists of many components or modules, including modules for implementing the catalog, query language, interface processors, data access, concurrency control, recovery, and security.  The DBMS must interface with other system software, such as the operating system and compilers for various programming languages
  • 24.
    Workers behind theScene … cont’d 7/2/2024 24  Tool developers: Include persons who design and implement tools  Tools are software packages that facilitate database system design and use, and help improve performance.  Tools are optional packages that are often purchased separately.  They include packages for database design, performance monitoring, natural language or graphical interfaces, prototyping, simulation, and test data generation.  Operators and maintenance personnel: are the system administration personnel who are responsible for the actual running and maintenance of the hardware and software environment for the database system.
  • 25.
    Some Common usesof Databases 7/2/2024 25 In a university  Containing information about a student, the course she/he is enrolled in, the dormitory she/he has been given.  Containing details of Staff who work at the university at personnel, payroll, etc. In a library  There may be a database containing details of the books in the library and details of the users,  The database system handles activities such as  Allowing a user to reserve a book  Notifying when materials are overdue:
  • 26.
    Some Common usesof Databases … Cont’d 7/2/2024 26 In travel agencies  When you make inquiries about a travel, the travel agent may access databases containing flight details  Flight no., date, time of departure, time of arrival Insurance  When you wish to take out insurance, there is database containing  Your personal details: name, address, age  information on whether you drink or smoke,  Your medical records to determine the cost of the insurance Supermarkets  When you buy goods from some supermarkets, a database will be accessed.  The checkout assistant will run a barcode reader over the purchases.
  • 27.