0% found this document useful (0 votes)
22 views41 pages

Database Management Systems

Uploaded by

Mick lee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views41 pages

Database Management Systems

Uploaded by

Mick lee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 41

11/13/24

Prepared by: S. K. M. Njovu


DATABASE MANAGEMENT
SYSTEMS
ELECTRONIC FILING SYSTEMS
OVERVIEW OF DATABASE
MANAGEMENT SYSTEMS (DBMS)

11/13/24
 Database management system is a set of
programs that deals with

Prepared by: S. K. M. Njovu


 Storage of information/records
 Modification of stored information/records
 Extraction of the stored information/records
 It also provides users with tools to
 Add, delete records
 Access records
 Update records
 Analyze stored information
TYPES/MODELS OF DBMS

11/13/24
 the hierarchical model:treelike model, is
confined to a one-to-many relationship

Prepared by: S. K. M. Njovu


 the network model: consists of more complex

relationships, allows for many-to-many


relationships
 the relational model: uses two-dimensional

rows and columns to store data


 the object relational model: has the ability to

handle graphics, pictures, voice and text


COMMON DBMS

11/13/24
 What is DBMS?
 Common DBMS

Prepared by: S. K. M. Njovu


 MS Access
 MySQL
 Oracle
 SQL Server
 PostgreSQL
MICROSOFT ACCESS 2007 DBMS

11/13/24
 This is a relational database model
 Data is stored in tabular form

Prepared by: S. K. M. Njovu


 Columns represent ATTRIBUTES e.g. age, sex,

marital status
 Rows represent ENTITIES e.g. individual and

identifiable objects like Juma, Esther, Julieth


 Examples of such databases include

TELEPHONE DIRECTORY, ADDRESS BOOK,


etc.
RELATIONAL DATABASE
 Definition:
 Data stored in tables that are associated by
shared attributes (keys).
 Any data element (or entity) can be found in the
database through the name of the table, the
attribute name, and the value of the primary key.
RELATIONAL DATABASE DEFINITIONS
 Entity: Object, Concept or event (subject)
 Attribute: a Characteristic of an entity

 Row or Record: the specific characteristics of

one entity
 Table: a collection of records

 Database: a collection of tables

Registration No Name Course


1245/T.18 Elizabeth LLB
5478/T.18 Tonny Engineering
THE RELATIONAL MODEL
 Each attribute has a unique name within an
entity
 All entries in the column are examples of it

 Each row is unique

 Ordering of rows and columns is unimportant

 Each position (tuple) is limited to a single

entry.
DATA MODEL: WHAT’S A MODEL?
 A data model is a representation of reality
 It’s used to define the storage and

manipulation of a data base.


 Data Models have two components:
 Structure:the structure of the data stored within
 Operations: Facilities for manipulation of the
data.
CRUD !
 Refers to the most common Database
Operations:
 Create
 Read
 Update
 Delete
 Operations occur at all levels: Tables,
Records, Columns
ATTRIBUTES
 Characteristics of an entity
 Examples:
 Vehicle (VIN, color, make, model, mileage)
 Student (SSN, Fname, Lname, Address)
 Fishing License (Type, Start_date, End_date)

 Text, date, real, integer


DATABASE TABLE EXAMPLE

Figure 1: A simple – and flawed – table design.

Figure 2: An improved database table..


DATABASE RELATIONSHIPS
 How is one entity related to another entity?
 Real-world sources:
 Ownership
 Parentage
 Assignment
 Regulation
Database Table Keys

Definition:
A key of a relation is a subset of attributes with the following
attributes:
• Unique identification
• Non-redundancy
TYPES OF KEYS
PRIMARY KEY
 Serves as the row level addressing mechanism in
the relational database model.
 It can be formed through the combination of
several items.
FOREIGN KEY
 A column or set of columns within a table that
are required to match those of a primary key of a
second table.
These keys are used to form a RELATIONAL
JOIN - thereby connecting row to row across
the individual tables.
Relational Database Management
System (RDBMS)
Table A

Name Address Parcel #


John Smith 18 Lawyers Dr. 756554
T. Brown 14 Summers Tr. 887419

Table B

Parcel # Assessed Value


887419 152,000
446397 100,000
DATABASE KEYS
 Primary Key - Indicates uniqueness within
records or rows in a table.
 Foreign Key - the primary key from another

table, this is the only way join relationships


can be established.
 There may also be alternate or secondary

keys within a table.


ICT IN LEGAL (LAW) SECTOR

11/13/24
 Digital legal documents
 Electronic filing system

Prepared by: S. K. M. Njovu


 Digitalized legal systems
 Proceedings in court –recording -Case
management systems
 Case reports, user-opinions, etc
 Searching and summarizing
 Prediction –simulation
 Digitalized legal councilor –Advocate

 Digital Legal clinic

 Limitations
11/13/24 Prepared by: S. K. M. Njovu
STOP
CONSTRUCTING JOIN RELATIONSHIPS
 One-to-many relationships include the
Primary Key of the ‘one’ table and a Foreign
Key (FK) in the ‘many’ table.
GETTING STARTED WITH MADBMS

11/13/24
 Point and click at WINDOWS BUTTON
 Point and click at ALL PROGRAMS

Prepared by: S. K. M. Njovu


 Locate and point at Microsoft Office

 Locate, point and click at Microsoft Access

2007
 Wait to see the following initial screen …
11/13/24 Prepared by: S. K. M. Njovu
MICROSOFT ACCESS 2007
CREATING A NEW BLANK DATABASE

11/13/24
 Click at NEW BLANK DATABASE
 Specify the database file name e.g.

Prepared by: S. K. M. Njovu


students2013
 Specify storage area of your database e.g.

your flash disk


 Click at the CREATE button to get the

following screen …
11/13/24 Prepared by: S. K. M. Njovu
DATABASE CREATION WINDOW
CREATING TABLES

11/13/24
 Assume the database is open, proceed as
follows:

Prepared by: S. K. M. Njovu


 Click at CREATE, TABLE
 Click at VIEW, choose DESIGN VIEW
 Save the table to be created i.e. type table name
and click OK … the fields screen appears
 Define the fields – field name, data type, other
field properties
 Close the fields’ definition window, SAVE
CHANGES
 Check the following three screens …
11/13/24 Prepared by: S. K. M. Njovu
CREATE TABLE SCREEN
11/13/24 Prepared by: S. K. M. Njovu
TABLE DESIGN VIEW
11/13/24 Prepared by: S. K. M. Njovu
FIELDS DEFINITION SCREEN
DEFINING THE FIELDS

11/13/24
 Type the field name e.g. reg-number
 Specify its data type e.g. text

Prepared by: S. K. M. Njovu


 Specify general properties
 Fieldlength: 10
 Required: yes
 Indexed: yes, no duplicate
 Repeat the above process for the remaining
fields as required by your table
 Save your table once more
CREATING A SAMPLE DATABASE

11/13/24
 Let us assume it is an MU staff database
 Database name: MU-STAFF

Prepared by: S. K. M. Njovu


 Tables: main table and subsidiary tables as follows
 Employees: main table – pfno, names, codes for sex,
marital status, education level and department
 Sex: subsidiary table – sexcode, description

 Marital status: subsidiary table – maritalcode, description

 Education level: subsidiary table – educationcode,

description
 Department: subsidiary table – departmentcode,

description
 Thenumber of subsidiary tables will depend on the
complexity of the main table and the nature of data
5-9/1: CREATING RELATIONSHIPS

11/13/24
 Once the tables are created, they have to be
linked

Prepared by: S. K. M. Njovu


 Each subsidiary table have to be linked to the

main table
 Linking fields should have some properties

identical, like field type and length


 Check the demonstration …
11/13/24 Prepared by: S. K. M. Njovu
SAMPLE RELATIONSHIP OF TABLES
CREATING FORMS

11/13/24
 Access forms are much like paper forms
 You can use them to enter, edit, or display

Prepared by: S. K. M. Njovu


data
 They are based on tables

 When using a form, you can choose the

format, the arrangement, and which fields


you want to display.
 How to do it, see the following slides …
STEPS TO CREATE FORMS …

11/13/24
 Open your database
 Select a TABLE to be used

Prepared by: S. K. M. Njovu


 Click at CREATE

 Click at FORM

 Use it for data entry OR

 Just save it for future use

 As easy as taking AZAM COLA …

 Demonstration …
11/13/24 Prepared by: S. K. M. Njovu
CREATING FORM SCREEN
CREATING A QUERY

11/13/24
 Use a query to view a subset of your data
 Use a query to answer questions about your

Prepared by: S. K. M. Njovu


data
 For example, if you want to view a list of

student names and email addresses


 You can create a query that displays the

student’s first name, last name, and email


address only
 And so much more extraction of data …
HOW TO CREATE QUERIES

11/13/24
 Open your database
 Click at CREATE

Prepared by: S. K. M. Njovu


 Click at QUERY DESIGN

 Add tables of interest

 Close the add tables window

 Select fields to extract data from

 Set criteria to filter your data set

 Run your query

 Quit or save the query

 See the following slide …


11/13/24 Prepared by: S. K. M. Njovu
ADD TABLES FOR QUERY
11/13/24 Prepared by: S. K. M. Njovu
SELECT FIELDS SCREEN
CREATING REPORTS

11/13/24
 Reports organize and summarize data for
viewing online or for printing

Prepared by: S. K. M. Njovu


 A detail report displays all of the selected

records
 You can include summary data such as totals,

counts, and percentages in a detail report


 Check the steps on how to do it …
HOW TO CREATE A REPORT

11/13/24
 Open a database to use
 Click at CREATE, REPORT WIZARD, next

Prepared by: S. K. M. Njovu


 Select TABLE or QUERY to use, next

 Add fields to include in the report, next

 Decide how to view your report e.g. by

employees, next,next
 Choose report layout, next

 Choose report style, next

 Click at FINISH: you can view or just print the

report

You might also like