Fundamentals of Information Systems: Media A. Ibrahim MSC: Software Engineering Ise Department

Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

Fundamentals Of Information Systems

Media A. Ibrahim
MSc: Software Engineering
ISE Department
[email protected]

2019-2020
1
 Data Management and modeling.
-Key aspects of organizing data and
information

2
Outlines
• The Hierarchy of Data
• Database.
• Data Model.
• Database Management System.

3
The Hierarchy of Data

Database
A character can be an
A bit (a binary digit) A byte Bits can be uppercase letter (A, B, C…
Z), lowercase letter(a, b, c…
the smallest piece of organized into units
z), numeric digit (0, 1, 2… 9),
data A byte=8bits or special symbol (., !, +, -, /,
…)

A field is typically a name, A record a collection of data


number, or combination
A file(Table) is a
fields all related to one object, collection of related records.
of characters that describes an activity, or Individual. E.g.
aspect of a business object E.g.
employee record=employee’s
(such as an employee, a an employee file is a
name, another field contains the
location, or a truck) or activity address, and still others the collection of all company
(such as a sale) phone number. employee records

4
The Hierarchy of Data (Continued)

The Hierarchy 5
of Data
Database
Database: collection of interrelated information about
world being modeled.

6
Database Types

 Flat File: A flat file is a simple database program whose records have no relationship to
one another. Flat file databases are often used to store and manipulate a single table or
file; they do not use any of the database models discussed previously, such as the
relational model. Many spreadsheet and word-processing programs have flat file
capabilities.

 Single User: A database installed on a personal computer is typically meant for a single
user. Microsoft Office Access and FileMaker Pro are designed to support single-user
implementations.

 Multiple Users: Small, midsize, and large businesses need multiuser DBMSs to share
information throughout the organization over a network. These more powerful,
expensive systems allow dozens or hundreds of people to access the same database
system at the same time. Popular vendors for multiuser database systems include Oracle,
Microsoft, Sybase, and IBM.

7
The Database Approach

Traditional
approach to data management. Database approach to data
At one time, information systems management (DBMS)
Whereby multiple information systems share a
referenced specific files pool of related data. A database offers the
containing relevant data. E.g. ability to share data and information resources.
a payroll system would use a Federal databases, for example, often include
payroll file. Each distinct the results of DNA tests as an attribute for
operational system used data convicted criminals. The information can be
shared with law enforcement officials around
files dedicated to that system. the country.

8
The Database Approach (Continued)

The Traditional Approach To Data Management


9
The Database Approach (Continued)

The Database Approach to Data Management


10
The Database Approach to Data Management Advantages

11
The Database Approach to Data Management Advantages
(Continued)

12
The Database Approach to Data Management Disadvantages

13
Data Modeling

 A data model is a representation of reality.


 It’s used to define the storage and manipulation of a data base.
 Planned data redundancy
 To have it available in more than one place
 To improve system performance
 Data model
 A diagram of entities and their relationships
 Entity-relationship diagrams
 Use graphs to show how data is organized and how it is related
 Goal: to create database tables that do not contain duplicate data values
that can become inconsistent
14
Database Models

 Hierarchical (tree)
 Data is organized top-down

 Network
 Owner-membership relationship
 A member can have many owners

 Relational
 Uses tabular format with 2-dimensional tables (relations)
 Relations resemble files

15
Hierarchical Database Model Example

Hierarchical Database
Model
16
Network Database Model Example

Network Database Model

17
Relational Models

Describe data using a standard tabular format with all data elements placed in two-
dimensional tables, called relations, that are the logical equivalent of files.
 Rows represent data entity (Employee, Customer)
 Columns represent attributes (Employee’s First Name or Last Name)

 Popular Database Management Systems


 IBM DB2, Oracle, Sybase, Microsoft
 SQL Server, Microsoft Access, and MySQL

18
Relational Models (Continued)

 Domain: Set of values an attribute can have


 Age: Between 0-100
 Gender: Male or female
 Selecting
 Pick rows based on certain criteria
 Select those whose gender is female
 Projecting
 Create a new table with a subset of attributes
 Joining
 Combine two or more tables

19
Relational Database Model Example

Relational Database Model 20


Entity/Relationship Modelling

• Graphical representation of entities and their relationships


in a database structure.
• Entity= Object, Concept or event (subject)
• Table = Entity = Relation
• Table row = tuple = instance=Record
• Table column = attribute

21
E-R Diagram Notation

22
Entity/Relationship Modelling (cont.)

• E/R Models are often Lecturer ID

represented as E/R Name Course


diagrams that
– Give a conceptual view
Tutors Student
of the database
– Are independent of the
choice of DBMS
– Can identify some Module Studies
problems in a design

23
Entities

• Entities represent objects or things of interest


– Physical things like students, lecturers, employees,
products
– More abstract things like modules, orders, courses,
projects
– Entity types do not have key attribute of their own are
called weak entity types

24
Diagramming Entities

• In an E/R Diagram, an Lecturer ID

entity is usually drawn as Name Course


a box with rounded
corners
Tutors Student
• The box is labelled with
the name of the class of
objects represented by that
entity Module Studies

25
Attributes

• Attributes are facts, • Attributes have


aspects, properties, or – A name
details about an entity – An associated entity
– Students have IDs, – Domains of possible
names, courses, values
addresses, …
– Values from the
– Modules have codes, domain for each
titles, credit weights, instance of the entity
levels, … they are belong to

26
Diagramming Attributes

• In an E/R Diagram Lecturer ID

attributes may be drawn as Name Course


ovals
• Each attribute is linked to
Tutors Student
its entity by a line
• The name of the attribute
is written in the oval
Module Studies

27
Relationships

• Relationships are an • Relationships have


association between two – A name
or more entities – A set of entities that
– Each Student takes participate in them
several Modules – A degree - the number
– Each Module is taught of entities that
by a Lecturer participate (most have
– Each Employee works degree 2)
for a single Department – A cardinality ratio

28
Cardinality Ratios

• Each entity in a • One to one (1:1)


– Each lecturer has a unique
relationship can office
participate in zero, one, or
• One to many (1:M)
more than one instances of – A lecturer may tutor many
that relationship students, but each student
• This leads to 3 types of has just one tutor
relationship… • Many to many (M:M)
– Each student takes several
modules, and each module
is taken by several students

29
Diagramming Relationships

• Relationships are links Lecturer ID

between two entities Name Course


• The name is given in a
diamond box
Tutors Student
• The ends of the link show
cardinality

Module Studies

One Many

30
Making E/R Models

• To make an E/R model • General guidelines


you need to identify – Since entities are
– Entities things or objects they
– Attributes are often nouns in the
– Relationships description
– Cardinality ratios – Attributes are facts or
properties, and so are
• from a description often nouns also
– Verbs often describe
relationships between
entities
31
Database Keys

• A key of a relation is a subset of attributes with the


following attributes:
• Unique identification
• Non-redundancy
• 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.

32
Database Keys Example

33
Example - E/R Diagram

An Entity-Relationship
(ER)Diagram for Department Database

Offers Department Employs

Course Includes Module Teaches Lecturer

Takes

Enrols In Student Tutors

Name
ID Course 34
Data Entities, Attributes, and Relationships Example

eBay assigns an “Item number” as a


primary key to keep track of each
item in its database

35
Database Management System

 A database management system, or simply DBMS, is a


set of software tools that control access, organize, store,
manage, retrieve and maintain data in a database.

36
Creating and Modifying the Database (User View)

 Schema: using a large database involves “telling” the DBMS the logical
and physical structure of the data and the relationships among the data for
each user. such as Oracle, typically use schemas to define the tables and
other database features associated with a person or user.

 Data definition language (DDL): is a collection of instructions and


commands used to define and describe data and relationships in a specific
database. A DDL allows the database’s creator to describe the data and
relationships that are to be contained in the schema.

 Data dictionary: a detailed description of all data used in the database.

37
Creating and Modifying the Database (User View)

Using a Data Definition Typical Data Dictionary Entry


Language to Define a Schema

38
Storing and Retrieving Data

 One function of a DBMS is to be an


interface between an application
program and the database. When an
application program needs data, it
requests the data through the DBMS.
o For example, a user might give a
command, such as LIST ALL
OPTIONS FOR WHICH PRICE IS
GREATER THAN 200 DOLLARS.
This is the logical access path (LAP).
Then, the DBMS might go to the
options price section of a disk to get
the information for the user. This is
the physical access path (PAP). Logical and Physical Access Paths

39
Manipulating Data and Generating Reports

 Query by Example (QBE): which is a visual approach to developing


database queries or requests. Like Windows and other GUI operating systems,
you can perform queries.
 Programming language(C++ commands): can be used in simple programs
that will access or manipulate certain pieces of data in the database.
 Structured Query Language (SQL): standardized data manipulation
language(query). SQL has many built-in functions, such as average (AVG),
the largest value (MAX), the smallest value (MIN),and others.

Examples of SQL Commands

40
Manipulating Data and Generating Reports (Continued)

Some of The Most Important SQL Commands:

•SELECT - extracts data from a database


•UPDATE - updates data in a database
•DELETE - deletes data from a database
•INSERT INTO - inserts new data into a database
•CREATE DATABASE - creates a new database
•ALTER DATABASE - modifies a database
•CREATE TABLE - creates a new table
•ALTER TABLE - modifies a table
•DROP TABLE - deletes a table
•CREATE INDEX - creates an index (search key)
•DROP INDEX - deletes an index

41
Manipulating Data and Generating Reports (Continued)

After a database has been


set up and loaded with data,
it can produce desired
reports, documents, and
other outputs.

Examples of SQL Output

42
Database Administration

 Role of the database administrator (DBA) is to plan, design, create, operate,

secure, monitor and maintain databases

 The DBA works with both users and programmers

 A data administrator is responsible for defining and implementing consistent

principles for a variety of data issues, including setting data standards and

data definitions; a nontechnical position.

43
Conclusion
• A database is a computerized system that makes it easy to
search, select and store information.

44

You might also like