Key Unit Competency: To be able to identify concepts of database and differentiate
    database models


    Observe the following diagram showing the collection of files for the school. Answer
    to the questions below:

    4.1. Definitions of key terms

    Activity 4.1 1.

    1. Interview someone from the administration office at your school who
        is dealing with student’s information on daily basis. In your interview,
        include the following questions:

       a. How do you collect data of students?

       b. What are the data do you need from the student?

       c. Where are you keeping that data?

       d. How do you call the set of all information related to students?

       e. Have you full information about students

        f. With whom else do you share that information?

    2. After you have done the interview, write up findings in the form of report
        to be presented to the class.

           i. Data

    Data is commonly referred to as ‘raw’ data – a collection of text, numbers and
    symbols, images with no meaning. Data therefore has to be processed, or provided
    with a context, before it can have meaning.

         ii. Information

    Information is the result of processing data, usually by computer. This results in
    facts, which enables the processed data to be used in context and have meaning.
    Information is data that has meaning.

    iii. Database

    Database is an organized collection of related data. It is considered to be
    organized because the data is stored in categories that are accessible in a logical
    manner. A database is a collection of one or more relations, where each relation is a
    table made of rows and columns.

    Note: An information system is a combination of computer hardware and software
    that is designed to create, store, process and present information. The heart of all
    information systems is a database.

    In general data management consists of following tasks:
    Data capture, Data classification, Data storage, Data arranging, Data retrieval, Data
    maintenance, Data verification, Data coding, Data editing, Data transcription, Data

    Application Activity 4.1

    Using the following exam results of S5MCE students:

    1. KANEZA has 39/40 in Math, 37/40 in C++, 20/20 in ICT and 15/20 in English,

    2. CYUSA has 40/40 in C++, 35/40 in Math, 18/20 in ICT, and 17/20 in English

    3. KEZA has 35/40 ni Math, 38/40 in C++, 19/20 in ICT and 16/20 in English,

    4. NTWARI has 35/40 in Math, 35/40 in C++, 16/20 in ICT and 15/20 in English,

    5. MUTESI has 37/40 in Math, 37/40 in C++, 20/20 in ICT and 20/20 in English

    Using spreadsheet:

    a. Organize the students’ marks in a table

    b. Calculate total marks

    c. Calculate the Calculate the percentage

    d. Arrange their marks by descending order

    4.2. Different area where database can be applied

    Databases touch all aspects of our lives such as:

    1. Human resources: to track information about employees

    2. Banking: to keep customer information, accounts, and loans, and banking

    3. Airlines: to keep for reservations and schedule information. Airlines were
        among the first to use databases in a geographically distributed manner

    4. Universities: to keep student information, course registrations, and grades.

    5. Credit card transactions: to keep purchases on credit cards and generation
    of monthly statements.

    6. Telecommunication: to keep records of calls made, generating monthly
        bills, maintaining balances on prepaid calling cards, and storing information
        about the communication networks.

    7. Finance: to keep storing information about holdings, sales, and purchases
       of financial instruments such as stocks and bonds.

    8. Manufacturing: to keep management of supply chain and for tracking
       production of items in factories, inventories of items in warehouses / stores,
       and orders for items. etc.

    Application activities 4.2

    1. Research and identify the impact of database in society

    2. Present your findings to the class

    4.3. Database approaches

    Activity 4.2

    Mr. Mugabo is managing a shop in our village. All daily sold products are recorded
    manually in book note so that he can know how much money he got. Sometimes
    he uses to write that the payment is cash or not. However, when it is time to make a
    verification of the whole week so that he can buy new products for the shop, he uses
    to meet serious problems related to calculations, to know how much sold, how much
    remain and who have not reimbursed the depts.

    1. How Mr. Mugabo can improve his shop management?

    2. Identify approaches of database which are replacing manual database

    3. After that replacement of systems where Mugabo will puts some useless
        hard copy files?

    4.3.1 Traditional File Processing Systems (TFPS) approach

    This is an approach which was used earlier, prior to DBMS. With this approach, users
    had to write their application programs to store data in form of files on the computer
    permanent storage device (Hard Disk). A user must have knowledge of programming
    languages but this is not easy for a common computer user, even an experienced
    programmer would find it difficult to write a program each time a new database was
    to be created. Each application program written by a user had to define and manage
    its own data.

    a. Advantages of the Traditional File Processing

    Compared to manual management of information, the Traditional File
    Processing presents the following advantages:

    Simplicity: the design of file processing is more simple than designing

    Efficiency: file processing cost less and can be more speed than Database

    Customization: you can customize file processing more easily and efficiently
      than Database because files are related with the application and it have all the
       data needed for that application.

    b. Disadvantages of Traditional File Processing System

    • Separation and Isolation of Data: In file-based approach, data is stored in
      separate files, hence it is difficult to access it.

    Duplication of Data: Duplication of data means same data being stored more
      than once. This can also be termed as data redundancy.

    Misuse of storage space: Duplication of data leads to misuse of storage space.
      If the storage space is not properly it will have a direct impact on cost. The cost
      will increase.

    Loss of data integrity: Data integrity means that the data contained in the
      database is both accurate and consistent (Data inconsistency means different
      copies of the same data will have different values).

    Data Dependence: In traditional file processing, the structure of data files is
      embedded in the application programs, so any changes to the structure of a
      file may require changing all programs that access this file.

    Security problems: File based approach is not secured because different files
    are stored in different locations.

    Application activity 4.3

    Located in Nyarugenge District, Lycee de Kigali has 50 teachers and there are
    different departments within. There are 3 departments that need information
    about those teachers namely Salaries, Restaurant and Dispensary. The information
    for salaries is represented as follows:

    MUNEZA is from Huye district, Salary is 11000, born on 1/3/1991and his bill is 10000.
    UMUTESI was born on 7/9/1992, in Gisagara district, Salary is 11000 and his bill is 15000
    MUKANTWARI is from Gatsibo district, she was born on 3/2/1990, Salary is 12000, her bill is 12000.
    NYINAWUMUNTU is from Gasabo and born on 3/1/1992 her Salary is 15000 and bill is 11000.
    KABALISA is from Musanze district, born on 3/2/1980, Salary is 13000 and bill is 10000

    Information for Dispensary is:

    MUNEZA from, Huye , Salary is 11000, born on 1/3/1991, bill is 5000.
    UMUTESI born on 7/9/1992, from Gisagara, Salary is 11000, bill is 1000
    MUKANTWARI from Gatsibo born on 3/2/1990 Salary is 12000, bill is 2000
    NYINAWUMUNTU from Gasabo born on 3/1/1992 Salary is 15000, bill is 1000
    KABALISA from Musanze born on 3/2/1980 Salary is 13000, bill is 1200

    In groups do the following:

    a. Analyze how information is organized in 3 departments

    b. Write down your critics about this information management in respective

    c. What do you propose as a solution to minimize the cost of information
        management at Lycee de Kigali?

    4.3.2 Database Management System (DBMS)

    Database Management system (DBMS) is referred to as a software system that
    is used to store, access, manage, organize, maintain, modify and delete data from
    databases. Some of the most popular software include, Microsoft Access, Oracle,
    Microsoft SQL Server, MySQL

    MySQL is, one of the most popular database management systems used when there
    is a need to have access to information online.

    a. The advantages of database management system

    There are many advantages of database management system.

    1. Reduce data redundancy: Data redundancy refers to the duplication or
       repetition of data. The database system is used to eliminate the problems
        of data redundancy and data inconsistency.

    2. Data integration: Data integrity means that the data contained in the
        database is both accurate and consistent.

    3. Data Independence: Data independence means that programs are isolated
       from changes in the way the data are structured and stored.

    4. Reduce data inconsistency: Actually, data redundancy and data
       inconsistency are inter-related. If data redundancy is controlled, then data
       inconsistency will also be controlled automatically. Data inconsistency
       means different copies of the same data will have different values.

    5. Data sharing: Due to the fact that data is centralized, many different users
       from different locations can share data.

    6. Data recovery after a crash (a break down): DBMS allows to recover data
       after a crash. The crash may depend on power failure or hardware failure.

    7. Concurrent transaction control: A transaction means a collection of
      operations that perform a single action in a database.

    8. Increased Data security and safety: DBMS allows data to be highly
        protected against unauthorized access.

    b. Disadvantages of DBMS

    The disadvantages of the database approach are summarized as follows:

    1. Complexity: The provision of the functionality that is expected of a good
       DBMS makes the DBMS an extremely complex piece of software. Database
      designers, developers, database administrators and end-users must
      understand this functionality to take full advantage of it.
      Failure to understand the system can lead to bad design decisions, which can
      have serious consequences for an organization.

    2. Size: The complexity and breadth of functionality makes the DBMS an
    extremely large piece of software, occupying many megabytes of disk
    space and requiring substantial amounts of memory to run efficiently.

    3. Performance: Typically, a File Based system is written for a specific
    application, such as invoicing. As a result, performance is generally very

    However, the DBMS is written for general purpose, to cater for many applications
    rather than just one. The effect is that some applications may not run as fast as
    they used to.

    4. Higher impact of a failure: The centralization of resources increases
       the vulnerability of the system. Since all users and applications rely on
       the availability of the DBMS, the failure of any component can bring
       operations to a halt.

    5. Cost of DBMS: The cost of DBMS varies significantly, depending on
        the environment and functionality provided. There is also the regular
        maintenance costs.

    6. Additional Hardware costs: The disk storage requirements for the DBMS
       and the database may necessitate the purchase of additional storage

    Furthermore, to achieve the required performance it may be necessary to
    purchase a specicalised computer (server), dedicated to running the DBMS.
    The procurement of additional hardware results in further expenditure.

    7. Cost of Conversion: In some situations, the cost of the DBMS and extra
        hardware may be insignificant compared to the cost of converting existing
        applications to run on the new DBMS and hardware.

    This cost also includes the cost of training staff to use these new systems
    and possibly the employment of specialist staff to help with conversion and
    running of the system.

    This cost is one of the main reasons why some organizations feel tied to their

    current systems and cannot switch to modern database technology.

    Application activity 4.4

    1. Compare Database Management System and traditional File processing system
    Check the DBMS existing in computers of the school computer lab. If they are more
    than one, discuss the similarities and differences of them.

    4.4 Database access levels and users

    Activity 4.3

    Activity 4.3

    Observe and interpret the following figure.

    4.4.1. Database access levels

    A major purpose of a database system is to provide users with an abstract view
    of the data. That is, the system hides certain details of how the data are stored
    and maintained. There are three-levels that form the basis of modern database

    The internal level has an internal schema, which describes the physical storage
    structure of the database. The internal schema uses a physical data model and
    describes the complete details of data storage and access paths for the database.
    The conceptual level has a conceptual schema, which describes the structure of
    the whole database for a community of users.

    The conceptual schema hides the details of physical storage structures and
    concentrates on describing entities, data types, relationships, user operations,
    and constraints. Usually, a representational data model is used to describe the

    conceptual schema when a database system is implemented. This implementation
    conceptual schema is often based on a conceptual schema design in a high-level
    data model.

    The external or view level: The external view level is closest to the users. It is
    concerned with the way the data is viewed by individual users. A user can either
    be an application programmer or an end-user. The external level consists of many
    different external views of database. At the view level, computer users see a set of
    application programs that hide details of the data types.

    The purpose of the three-level architecture is to separate the user application and
    the physical database. Different users need different views of the same data.

    For example users should not have to deal directly with the physical database
    storage details. While the database administrator should be able to change the
    database storage structure or storage device without affecting other user’s views.

    4.4.2 Database users

    When considering users of a Database system, there are three broad classes to

    a. Database administrator (DBA):

    Responsible for authorizing access to the database, for coordinating and
    monitoring its use, acquiring software and hardware resources, controlling its use
    and monitoring efficiency of operations.

    b. The database designer:

    Responsible to define the content, the structure, the constraints, and functions or
    transactions against the database. They must communicate with the end-users
    and understand their needs.

    c. The end-user:

    End-users, They use the data for queries, reports and some of them update the
    database content.

    Application Activity 4.5

    From the above figure, explain different access level and right form your school
    hierarchy such as headmaster, DOS, teachers, students, visitors.

         a. Assign each user from the hierarchy what is supposed to do. Example:
             Everything happening in your school is hidden from the visitors.

        b. What is responsibility of DBA?

    4.4.3. Data Independence

    Activity 4.4

    The modification of an application used to access a database does not modify the
    database itself.

    In groups, discuss this assertion

    Data Independence: The ability to modify a scheme definition in one level without
    affecting a scheme definition in a higher level is called data independence.
    There are two kinds of data independence:

    a. Logical data independence

    The ability to modify the conceptual scheme without causing application programs
    to be rewritten.
    Immunity of external schemas to changes in the conceptual schema usually done
    when logical structure of database is altered.

    b. Physical data independence

    The ability to modify the internal scheme without having to change the conceptual
    or external schemas. Modifications at this level are usually to improve performance.

    Application activity 4.6

    1. Discuss about logical independence and physical independence

    2. Compare data dependence and data independence in database 4.5.4.
        Data models

    4.4.4. Database models

    Activity 4.5

    Search and summarize found information on Data Models focusing on:

    a. Common data models

    b. Definition of common data models

    A data model is a collection of concepts and rules for the description of the structure
    of the database. Structure of the database means the data types, the constraints
    and the relationships for the description or storage of data respectively.
    The most often used data models arenHierarchical model network model and

    Relational model

        i. Hierarchical Model

    The hierarchical model organizes its data using a tree structure. The root of the
    tree is the parent followed by child nodes. A child node cannot have more than
    one parent, though a parent can have many child nodes.

    ii. Network Model

    In the network model, entities are organized in a graph, in which some entities
    can be accessed through several paths.

    iii. Relational Model

    In this model, data is organized in two-dimensional tables called relations.
    The tables or relation are related to each other.
    A relational database is a collection of relational tables.
    The following is a graphical representation of entities and their relationships in a
    database structure.

    Notice that since more than three decades, the most used database model is the
    Relational models. This justifies the fact that most of the currently used DBMS are
    all relational. They are hence called relational Database Management Systems

    The database systems in their differences and similarities all serve to manage
    databases. The tables bellow present in summary the Database models Time
    frame and description, the Database Models Physical Structure, the Database
    models Structural Changes, the Database models Relationships, the Database
    models Advantages, the Database models Disadvantages, the Database models
    Examples and the Database models Status Today.

    Database models Comparison

    Application Activity 4.7

    In groups, do a research on Relational Database Management Systems. Present the
    report in class using presentation software.


    1. What is the purpose of managing information?

    2. Give the difference between File Processing System and Database
         Management System approach.

    3. Discuss data independence and explain its importance in database

    4. Discuss the uses of databases in business environment.