INL 120 - Theme 5 - 2024
INL 120 - Theme 5 - 2024
INL 120 - Theme 5 - 2024
2
What is a database?
• Definitions:
• Organized collection of logically related data
• Data
• Known facts
• Types: text, graphics, images, sound, videos
• It is built using a Database Management System (DBMS)
• Software package for defining and managing a database
Other definitions
In computer science a database is a structured collection of
records or data stored in a computer system so that a computer
programme or person using a query language can consult it to
answer queries.
P.O.Box 57
123456 Brown Jane Janeb@gmail.com
Pretoria
66 Willow way
98765 Nduli Kay Ndulika@yahoo.com
Brooklyn
Examples of Basic Databases
• Class roster
• Company employees
• Literature (published articles in a certain field)
Designing a Database Structure
• Identify goals
• Determine output requirements
• Determine input requirements
Identifying Goals
Determine output requirements
Determining input requirements
1. Names
2. Emails
3. Phone Nr
4. Gender
5. Hobbies
Building a Database
• Name the database
• Create new tables
• Define fields
• Enter initial data
Modifying an existing database
structure
• Add and delete tables
• Rename the database and tables
• Modify field structure
• Modify records (rows in tables)
Reports, documents and other output
• Types of output
• Document
• Page layout
• Content layout
• Saving on database
Database Models
There are several database models.
We look at four models namely:
1. Flat File Database
2. Hierarchical Model
3. Network Model
4. Relational Model
1. Flat File Model
• It consists of a single table.
• You can set up a basic flat-file database table in a wide variety
of different types of applications, including a table in a word
processor or an HTML document, or a worksheet in a
spreadsheet application.
• Many of these types of tables can be sorted by the values in
any column; spreadsheet tables can also be queried and
manipulated in other ways.
• These applications are adequate for simple database tasks.
Example
2. Hierarchical Database Model
• Data is organized into a tree-like structure.
• A single upward link in each record to describes the
nesting.
• A sort field keeps the records in a particular order in each
level
• It collects all the instances of a specific record together as a
record type.
• To create links between these record types, the hierarchical
model uses Parent Child Relationships
• This structure is very efficient to describe many
relationships in the real world - any nested and sorted
information.
• This structure implies that a record can have repeating
information.
• Hierarchical DBMSs were popular from the late 1960s
3. Networked Database Model
• The Network Database Model was invented by Charles
Bachman in 1969 to enhance the existing hierarchical
database model
• Created to represent complex data relationships more
effectively than the hierarchical model.
• The network model permits the many-to-many relationships
in data M:M
• Improves database performance.
• Network databases generally implement the set
relationships by means of pointers