You are on page 1of 12

K to 12 Basic Education Curriculum

Technical Vocational Livelihood Education

PROGRAMMING LANGUAGES (CSS 2)


Number of Sessions (Time Allotment): 60 Hours (1st Quarter)

INTRODUCTION TO DATABASE SYSTEMS


SUMMARY OF LEARNING OUTCOMES (LO):
➢ LO 01: File Systems
➢ LO 02: Database System
➢ LO 03: Database
➢ LO 04: Database Models
TANAUAN INSTITUTE, INC.
Senior High School Department
Modified Learning Scheme: Workbook
PROGRAMMING LANGUAGES (CSS 2)
1st Semester, S.Y. 2020-2021
Subject Teacher: LORENA A. AVILLANOZA

Name: ___________________________________ Score: ________________


Section: __________________________________ Date: _________________

Module 01: INTRODUCTION TO PROGRAMMING CONCEPTS

Topic : Lesson 01: File Systems Session :


Lesson 02: Database System WEEK 01
Lesson 03: Database 6 hrs.
Lesson 04: Database Models

Objectives of the Lesson :


At the end of the lesson, the student should be able to:
• Define file system and identify its disadvantages,
• Define database system and identify its five major parts,
• Define database and identify its advantages and disadvantages,
• Identify the database models,

Values Integration:

Nowadays, programming is already a large part of daily life-from games in gadgets to mainstream
movies, they are anywhere, However, a few decades ago, animation is very limited. Animation came a long way
before getting to gadgets, televisions and big screens. The industry of animation began less than 150 years ago,
but it has developed into multiple platforms and became very accessible to everyone.

Today, programming plays a big part in multimedia content. Animation can be used to strengthen all special
effects in motion picture and productions or to create a whole movie by itself. It comes anywhere and it can go
anywhere from a large production team working in a highly specialized studio to an individual who’s working out
on a bedroom from the big cinema screen or to a mobile phone.

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 1


Questions
1. What are the Database?

2. What are the importance of Database?

3. What are contributions of Database nowadays?

Discussion :

Lesson 01: FILE SYSTEMS

WHAT ARE A FILE SYSTEMS?


• are used by a manager of any small organization to track necessary data.

In the past, file systems are used by a manager of any small organization to track necessary data.
Traditionally, file systems are composed of a collection of file folders that are properly tagged,
kept in a filing cabinet and organized according to their logical relationships.

As an organization expands and data needs become larger, the file system was converted from manual to
a computerized one. From this, data processing (DP)specialists emerged to create necessary computer
file structures, write software that manage the data within those structures, and design the application
programs that produce reports based on the file data.

A small file system shown in the Figure 1.1 evolved as the number of files increased. As shown, each
file in the system used its own application programs to store, retrieve, and modify data. Also, each file
was owned by the individual or department that commissioned its creation.

Furthermore, as file systems grow larger, demands for more human resources as well as greater
computer resources also, heightens.

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 2


Computerized file systems have been a great improvement over the manual system. It served a useful
purpose in data management for over two decades in the computer era.

File systems became obsolete due to problems and limitations that come with it. It is necessary to be
informed about these shortcomings for it will let you understand the development of modern databases.

Disadvantages of a File System


• Lengthy development time
• Difficulty of getting quick answers
• Complex system administration
• Lack of security and limited data sharing
• Extensive programming

Lengthy development time - in file systems, even the simplest data-retrieval task requires extensive
programming. With older file systems, programmers needed to specify what must be done and
how it will be done.

Difficulty of getting quick answers - Generating ad hoc reports is impossible with file systems since
it requires extensive programming. It can even take weeks or months before DP specialists to
produce reports.

Complex system administration - Since ad hoc queries are impossible to make, file reporting programs
made by DP specialists tend to create programs for each reporting need. As the number of
files expand, system administration becomes more difficult.

Lack of security and limited data sharing - Data sharing and security are closely related. Data
sharing among several separated users may invite a lot of security risks. There are alternatives
for file security such as using spreadsheets. But then, users of file systems don’t use them that
often, thus, resulting to the dissolution of user level access.

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 3


Extensive Programming - changing an existing file structure in a file system environment is difficult
since it requires the DP specialist to:
• read the record from the original file,
• transform the original data to conform to the new structure’s storage requirements,
• write the transformed data into the new file structure, and
• repeat the second, third, and fourth steps for each record in the original file.
Because of these problems, using the database system became very desirable.

Lesson 02: DATABASE SYSTEMS

WHAT ARE DATABASE SYSTEMS?


• Database system is a term referring to an organization of components that define and regulate the
collection, storage, management, and use of data within a database environment. It is a computerized
system whose overall purpose is to maintain information and make that information available on
demand.

• A Database is a collection of organized data, information and records. Whenever you make a list of
anything – list of groceries to buy, books to borrow from the library, list of classmates, list of
relatives or friends, list of phone numbers etc...

• An example of a business manual database may consist of written records on paper and stored in a
filing cabinet, usually organized in chronological order, alphabetical order and so on.

• In simple words data can be facts related to any object inconsideration. For example, your age, age
height, weight, etc... are some data to you. A picture, image, file, PDF etc... can also be considered
data.
1. A database is a systematic collection of data. Since the data in a database is organized it
makes data management easy.
2. Database management system (DBMS) is a collection of programs which enables its users
to Access Database, Manipulate Database & Help in Representation of Data. It also, helps
control access to the database by various users.

Five major parts of a Database System


• Hardware
• Software
- Operating Systems Software
- DBMS Software
- Application programs and utility software
• People
- Systems Administrators
- Database Administrators
- Database Designers
- Systems Analysts and Programmers
- End Users

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 4


• Procedures
• Data

The five major parts of a database system from a general management point of view are: hardware,
software, people, procedures, and data.

Hardware - identifies all the system’s physical devices. The main hardware component of a database
system is the computer and all other peripherals that control computer input and output.

Software - refers to the collection of programs used by the computers within the database. There are
three types of software needed for the database system to fully function and these are
operating systems software, DBMS software, and application programs and utility software.
Operating systems software manages all the hardware components and makes all the other
software runs on the computer. Examples of this software are Microsoft Windows, Linux,
Mac OS, UNIX, and MVS. DBMS software manages the database within the database
system. Some examples are the MS SQL Server, Oracle, MySQL, and IBM’s DB2. Lastly,
application programs and utilities software are used to access and manipulate data in the
DBMS. It is also used to manage the computer environment where the data access and
manipulation take place. Application programs are mostly used to access data from within
the database and then, use that data to aid in the decision-making process through generating
reports, tabulations, and other information. On the other hand, utilities are software tools
used in helping manage the computer components of the database system.

People - the term “people” refers to all the users of the database system. The five types of database
system users based on primary job functions are the systems administrators who oversee the
general operations of the database system; the database administrators (DBAs) who manage
the use and proper functionality of the database system; the database structure; the systems
analysts and programmers who design and implement the application programs – through
which access and manipulation of the database’s is done; and the end users who use the
application programs for the daily operations of the organization.

Procedures - are the rules that govern the design and use of the database system. Procedures enforce
standards on how the business will be conducted with customers and within the organization
as well and are used to ensure that the monitoring and audit of both the data that enter the
database and the information produced by that data is organized.

Lesson 03: DATABASE

Data - The word “data” covers the collection of facts stored in the database.

Database - is a shared, integrated computer structure that stores a collection of :


• End-user data – raw facts of interest to the end user
• Metadata – data about data through which the end-user data are integrated and managed.

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 5


The metadata provides a description of the data characteristics and the set of relationships that link the
data found within the database. It provides information that complements and expands the value and use
of the data. In other words, it presents a more complete depiction of the data in the database. For
example, the metadata stores information about the data element and the type of value stored on that
element.

Simply said, a database is a collection of self-describing data, like a well-organized electronic filing
cabinet.

Advantages and Disadvantages of a Database:

Advantages - Reduced data redundancy Disadvantages - Complexity


- Data integrity - Expense
- Data independence - Vulnerability
- Data security - Size
- Data consistency - Training costs
- Easier use of data - Compatibility
- Less storage - Locking in of technology
- Lack of lower level control
Database Model
• defines the logical design of data that can be stored, organized, and manipulated in a database
system.
• defines the infrastructure offered by a particular database system

A database model defines the logical design of data that can


be stored, organized, and manipulated in a database system.
It thereby defines the infrastructure offered by a particular
database system.

Database models are grouped into two categories. The first one is the conceptual model which focuses
on the logical nature of the data representation. It is concerned with what is represented in the database.
The second one is the implementation model which places emphasis on how the data are represented in
the database or how the data structures are implemented to represent what is modeled.

Categories:
o Conceptual Model - focuses on the logical nature of the data representation
Example: Entity relationship (E-R) model

An example of a conceptual model is the entity relationship model while examples of an implementation
model are the hierarchical database model, network database model, relational database model, and
object-oriented database model.

o Implementation Model - places emphasis on how the data are represented in the database or how the
data structures are implemented to represent what is modeled.
Examples: » Hierarchical database model
» Network database model

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 6


» Relational database model
» Object-oriented database model

Basic building blocks of a Database Model


• Entity - is anything about which data are to be collected and stored

Entity is anything (a person, a place, a thing, or an event) about which data are to be collected and
stored. It represents a particular kind of object in the real world that may either be a physical or
conceptual object.

Relationship describes the association among entities. For example, a student-teacher relationship may
be described as: a student may attend classes conducted by several teachers, and each teacher may teach
several students in one class. There are three types of relationships used by database models and these
are:

o Relationship – describes the association among entities


Types:
» One-to-many (1:*) relationship
» Many-to-many (*:*) relationship
» One-to-one (1:1) relationship
o Constraints – is a restriction placed on the data

Constraint is a restriction placed on the data and is important because they help ensure data integrity.
They are usually written in the form of rules, for example:
» A student’s General Weighted Average (GWA) must be from 1.00 to 5.00
» One class must have 40 students only.

One-to-many (1:*) relationship


One-to-one relationship which is labeled as 1:1 may be described by this: a student may only be
assigned with one unique student number. In turn, a unique student number may only be owned by a
specific student.

One-to-many (1:*) relationship


One-to-many relationship which is labeled as 1:* may be illustrated by this example: a student attends
different classes. The student may attend many different classes but still, it is the same ‘one’ student
that attends each of those ‘many’ classes.

Many-to-many (*:*) relationship


Many-to-many relationship which is labeled as *:* may be described by this: a student may learn many
subjects, and each subject may be learned by many students.

• Attribute - is the characteristic of an entity

Attribute is the characteristic of an entity. In other words, it describes an entity. For example, a
STUDENT entity may have attributes such as student number, student name, student address, and
student contact number.

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 7


Lesson 04: DATABASE MODELS

Hierarchical Model - was developed in the 1960’s


- is used to manage large amounts of data for complex manufacturing projects.
- has a basic logical structure represented by an upside-down tree

The hierarchical database model was developed in the 1960’s. It was used to manage large amounts of
data for complex manufacturing projects and has a basic logical structure of an upside-down tree.

The structure of a hierarchical database has only one parent but can have several children: each parent
can have many children, but each child has only one parent as shown in the diagram on the slide.

In other words, this model depicts a set of one-to-many relationships between a parent and its children
segments. As depicted in the diagram, ‘Final Assembly’ or the root segment is the parent of the Level 1
segments, which, in turn, are the parents of the Level 2 segments and so on.

Network Model - was created to represent complex data relationships, improve database performance,
and impose a database standard. It is very similar to the hierarchical model such that
it also facilitates a 1:* relationships. However, the network database allows the child
to have several parents.
• was created to represent complex data relationships, improve database performance, and impose a
database standard.
• was defined by the Conference on Data Systems Language (CODASYL)

Conference on Data Systems Language (CODASYL)


• established database standards
• created the Database Task Group (DBTG) in the late 1960s

Database Task Group (DBTG)


• was charged to create standard specifications for an environment that would facilitate database
creation and data manipulation.

The lack of database standards made database designs and applications less portable for programmers.
So, to establish database standards, the Conference on Data Systems Language (CODASYL) established
database standards by creating the Database Task Group (DBTG) in the late 1960s to define standard
specifications for an environment that would facilitate database creation and data manipulation.

The final DBTG report contained specifications for three crucial database components such as the
network schema, network subschema, and data manipulation language.

The network schema is the conceptual organization of the entire database as viewed by the database
administrator, the network subschema defines the portion of the database ‘seen’ by the programs that
produce the desired information from the data contained within the database, and the DML
defines the environment in which data can be managed.

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 8


Relational Model - was introduced in 1970 by E.F. Codd of IBM collection of relations or two-
dimensional tables having distinct names.

In 1970, Edgar Frank Codd of IBM introduced the relational model in his landmark paper entitled ‘A
Relational Model of Data for Large Shared Databases’. The relational model produced an “automatic
transmission” database. It is a collection of relations or two-dimensional tables having distinct names. It
was considered ingenious but impractical because it required a higher computer power.

Relationship model - was introduced by Peter Chen in 1976


- yields a graphical representation of entities and their relationships in database
Structure.
- is usually represented by an entity relationship diagram

The entity relationship model was introduced by Peter Chen in 1976. It yields a graphical representation
of entities and their relationships in database structure. It is usually represented by an entity relationship
diagram (which will be discussed further on succeeding topics).

• The entity relationship model introduced the three types of relationships:


o One-to-many (1:*) relationship
o Many-to-many (*:*) relationship
o One-to-one (1:1) relationship

• is based on the following components:


o Entity
o Attributes
o Relationship

Object-oriented model - stores both data and their relationships in a single structure known an object.

The object-oriented model stores both data and their relationships in a single structure known as an
object. It is relationships in a single structure known as an object. It is based on the components such as:
object which is an abstraction of a real-world entity, attribute which describes the properties of an
object, class which is a collection of similar objects with shared attributes and methods, class hierarchy
which refers to the arrangement of classes, and inheritance which refers to the ability of an object within
the class hierarchy to inherit the attributes and methods of the classes above it.

Based on the components such as:


o Object – is an abstraction of a real-world entity
o Attribute – describes the properties of an object
o Class – is a collection of similar objects with shared attributes and methods
o Class hierarchy – refers to the arrangement of classes
o Inheritance – refers to the ability of an object within the class hierarchy to inherit the attributes and
methods of the classes above it.

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 9


Activity :

ACTIVITY 1: What you need to know?


At the end of the exercise, the students should be able to:
• learn more about their new classmates, and
• familiarize with the rules and regulations in using the computer
laboratory, the safety precautionary measures.

Materials:
-Pen -A sheet of paper

Basic Principles:
Rules and regulations in using the computer laboratory
The following rules and regulations are strictly implemented and must be followed by students:
1. Cleanliness and orderliness are a must and should be maintained at all times.
2. Eating, drinking and smoking are not allowed inside the laboratory.
3. Students must observe proper decorum inside the laboratory.
4. Silence must always be observed and avoid playing or joking around inside the laboratory.
5. Students are not allowed to bring and use stereo transistor, MP3 player, PSP or any electronic
gadgets for entertainment purposes inside the laboratory.
6. Students, without any laboratory schedule, are strictly prohibited from staying inside the laboratory
without the personnel’s approval for any valid reasons.
7. Students are not authorized to use any laboratory devices without the approval of the laboratory
personnel.
8. Students with incomplete or improper uniform will not be allowed to have their laboratory exercises
unless they have a permit from the Guidance Counselor or authorized school personnel.
9. Always follow the operating procedures in using electronic devices.
10. SAFETY must always be observed.

Basic information for safety precautions:


• Most common causes of accidents (burns and electric shocks) in electrical and electronic
laboratories are carelessness in handling laboratory equipment, inattentiveness in operating
the laboratory equipment, and lack of knowledge on the laboratory procedures and laboratory
materials’ specifications.

• Developing safety work habits depends on a right attitude, a feeling that you want to work safely.
With this, you need to understand the safety rules and practices for your activities as well as
follow the rules and practices. Failure in following safety rules and practices can injure you and
others and can even destroy properties. These may be prevented by using electric energy safely
and properly, and by strictly following the instructions.

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 10


References :

• Department of Technology Education at The University of Southern


Mississippi. (2007, February 26). Retrieved from
Dragon.ep.usm.edu/~it365/module/Basics/system.htm

• Hoffer J., George G., & Valacich J. (2008). In 5 Ed., Modern systems
analysis and design. Pearson Prentice Hall.

• Parsons J. J., & Oja D. (2010). In 8 Ed., Computer concepts Illustrated


Introductory. Cengage Learning.

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 11

You might also like