1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital Two...

61
1 Basic database terminology and concept

Transcript of 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital Two...

Page 1: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

1

Basic database terminology and concept

Page 2: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

2

DATA REPRESENTATIONDATA REPRESENTATION

Analog vs. Digital Digital

Two states (1) on (0) off

Page 3: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

3

DATA REPRESENTATIONDATA REPRESENTATION

Binary number system Combination of ones and zeroes

represent characters

Page 4: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

4

Bit and Byte

Bit Short for binary digit Smallest element of data Either zero or one

Byte Group of eight bits, which operate as a

single unit Represents one character or number

Page 5: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

5

Representing Characters in Bytes

Page 6: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

6

Using Binary Code to Calculate

Page 7: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

7

Hierarchy of Data

Bit Byte (Character) Field Record File Database

Page 8: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

8

Database objects/tools

Table Form Query Report

Page 9: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

9

Table

A table is a grid of rows and columns

R O WCOLUMN

Page 10: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

10

Field

A single trait or characteristic about a subject of a table

NAMA TARIKH LAHIR

JANTINA NO TEL GAJI

Page 11: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

11

Data type

Characteristic designate for an Access field Text Number Currency Date/time Yes/No Memo OLE object Hyperlink

Page 12: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

12

Exercise

Salutation (Mr., Mrs., Ms.) Date of birth Home address Whether a student is allergy to

medication The words to describe type of allergy Photo of a student How many sibling in the house Salary

Page 13: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

13

Record

A group of traits about a particular item Simply a row in a table!

NAMA TARIKH LAHIR

JANTINA NO TEL GAJI

Page 14: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

14

Value

The actual data entered at the intersection of a row and column

Page 15: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

15

Primary keys

Key is a field that serves a specific function within a table.

AutoNumber Requirement for a relational database.

Means, in a field that is the primary key, there can never be duplicate data

example

Page 16: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

16

It’s about nothing: Null values and Zero-Length strings

“Report that say something hasn’t happen are always interesting to me because, as we know, there are known knowns, there are things we know we know. We also know there are known unknowns; that is to say, we know there are some things we do not know. But there are also unknown unknowns-the ones we don’t know we don’t know”

At a press conference in 2003Donald Rumsfeld

Secretary of Defense(in the Bush Administration)

Page 17: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

17

It’s about nothing: Null values and Zero-Length strings

Example:

Student Name Has Tel. No.? Tel. No.

Jasman Yes 018-1234567

Asmah No Does not exist

Syafiq Yes Exist, but we don’t know it

Elangovan Don’t know Don’t know if there’s one

Page 18: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

18

Activity 2

Page 19: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

19

Creating a Database

Page 20: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

20

Three main steps

Determine the data you need You describe the data You enter the data into the database

Page 21: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

21

Determine Data Needs

Two basic approaches can be used to determine data needs: A process-oriented approach An enterprise modeling approach

Page 22: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

22

A process-oriented approach

To define data needs in a process-oriented approach:

1. Define the problem

2. Identify necessary decisions

3. Describe information needs

4. Determine the necessary processing

5. Specify data needs

Page 23: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

23

A process-oriented approach

Sometimes called the problem-oriented approach

Because it begins with a problem A problem can be good or bad

Page 24: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

24

A process-oriented approach

Once problems are identified, the data and processes dealing with problem solutions can be determined

The strength is that it addresses problems well

Page 25: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

25

A process-oriented approach

Although the process-oriented approach enables the data needs of each system to be defined in a logical manner, its weakness is the difficulty of linking the data from one problem to another

IS cannot easily share data if they are isolated from other IS dealing with other kind of problems.

Page 26: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

26

Enterprise modeling approach

Page 27: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

27

Data Planning Process

Database development is a top-down process Develop an enterprise model that defines the

basic business process of the enterprise

Define the information needs of end users in a business process

Identify the key data elements that are needed to perform specific business activities (entity relationship diagrams)

Page 28: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

28

Enterprise modeling approach

The strength of this approach is that it takes advantages of a broad view of data resources

All areas are considered, and synergy of data resources between areas can be leveraged

Page 29: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

29

Enterprise modeling approachStrategic Planning for information resources

Create an enterprise data

model Determining all of the org.’s data needs

Create database

Storing that datain the database

Page 30: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

30

Data Modeling Techniques

Modeling the org.’s data needs is supported by techniques that describe the data, how the data aggregates into tables, and how tables relate to each other.

A number of techniques: entity-relationship diagrams and class diagrams

Page 31: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

31

Entity-relationship diagrams

Are used to describe relationships between conceptual collections of data so that their related records can be joined together

Page 32: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

32

Class diagrams

Are used to describe both the data relationship and the actions that operate on the data in the relationships

Page 33: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

33

Entity-relationship diagrams

ERDs Deal with data in entities and the

relationships between entities Entities – conceptual collections of

related data fields Tables are the result of breaking

entities into smaller units that conform to the rules for database structures

Page 34: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

34

Entity-relationship diagrams

An entity may turn into table, but frequently an entity is broken into several tables

ERDs are a higher level conceptualization of data than tables

Page 35: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

35

Entity-relationship diagrams

Entities in ERDs will have names and relationship links

ERD relationships will denote if a record in one entity will relate to one or more records in other entity

Page 36: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

36

Entity-relationship diagrams

Let us assume that we need to describe the data needed for a new IS: IS Sekolah SAYA

3 separate data entities will exist: … … …

Page 37: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

37

Page 38: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

38

1 1

M M

Page 39: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

39

To read the relationship:

One-to-many relationship - “one school record may relate to many staff records and one staff record may relate to only one school record”

Page 40: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

40

M

M

Many-to-many relationship

Page 41: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

41

Many-to-many relationship

A single subject could have many staff, and a single staff could be on many subject

Page 42: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

42

M

M

1

M

1

M

Page 43: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

43

Class Diagrams

clsStaf

Name

Salary

HireDate

addStaf

deleteStaf

updateStaf

clsMataPel

Title

Ting

addMataPel

deleteMataPel

updateMataPel

1…*

1…*

clsSchool

SchoolName

Adress

addSchool

deleteSchool

updateSchool

clsStud

Name

IC

StudAdd

addStud

deleteStud

updateStud

ExamStud

1…*

1…*1

1

Page 44: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

44

Using the database

Forms, reports and queries are common methods for accessing the database held in database management system

Page 45: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

45

Database Structures

In all IS, data resources must be organized and structured in some logical manner so that they can be accessed easily, processed efficiently, retrieved quickly, and managed effectively.

Page 46: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

46

Database Structures

Common database structures… Hierarchical

Network

Relational

Object-oriented

Multi-dimensional

Page 47: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

47

Hierarchical Structure

Early DBMS structure Records arranged in tree-like structure Relationships are one-to-many

Page 48: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

48

Network Structure

Used in some mainframe DBMS packages Many-to-many relationships

Page 49: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

49

Relational Structure

Most widely used structure Data elements are stored in tables Row represents a record; column is a field Can relate data in one file with data in another,

if both files share a common data element

Page 50: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

50

Relational Operations

Select Create a subset of records that meet a stated

criterion Example: employees earning more than $30,000

Join Combine two or more tables temporarily Looks like one big table

Project Create a subset of columns in a table

Page 51: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

51

Multidimensional Structure

Variation of relational model Uses multidimensional structures to

organize data

Data elements are viewed as being in cubes

Popular for analytical databases that support Online Analytical Processing (OLAP)

Page 52: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

52

Multidimensional Model

Page 53: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

53

Object-Oriented Structure

An object consists of Data values describing the attributes of an entity Operations that can be performed on the data

Encapsulation Combine data and operations

Inheritance New objects can be created by replicating some

or all of the characteristics of parent objects

Page 54: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

54

Object-Oriented Structure

Source: Adapted from Ivar Jacobsen, Maria Ericsson, and Ageneta Jacobsen, The Object Advantage: Business Process Reengineering with Object Technology (New York: ACM Press, 1995), p. 65. Copyright @ 1995, Association for Computing Machinery. By permission.

Page 55: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

55

Object-Oriented Structure

Used in object-oriented database management systems (OODBMS)

Supports complex data types more efficiently than relational databases Examples: graphic images, video clips,

web pages Example use for product design

Page 56: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

56

Evaluation of Database Structures Hierarchical

Works for structured, routine transactions Can’t handle many-to-many relationship

Network More flexible than hierarchical Unable to handle ad hoc requests

Relational Easily responds to ad hoc requests Easier to work with and maintain Not as efficient/quick as hierarchical or network

Page 57: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

57

Database Development

Database Administrator (DBA) In charge of enterprise database development

Improves the integrity and security of organizational databases

Uses Data Definition Language (DDL) to develop and specify data contents, relationships, and structure

Stores these specifications in a data dictionary or a metadata repository

Page 58: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

58

Data Dictionary A data dictionary

Contains data about data (metadata) Relies on specialized software component to

manage a database of data definitions

It contains information on.. The names and descriptions of all types of data

records and their interrelationships Requirements for end users’ access and use of

application programs Database maintenance Security

Page 59: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

59

Based on database structure above, describe the characteristics of the IS or the organization which hold the IS. Use the following table for discussion:

Page 60: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

60

System typesSimple Complex

Has few components, and the relationship or interaction between elements is uncomplicated and straightforward

Has many elements that are highly related and interconnected

Open Closed

Interact with its environment Has no interaction with the environment

Stable Dynamic

Undergoes very little change over time Undergoes rapid and constant change over time

Adaptive Non-adaptive

Is able to change in response to changes in the environment

Is not able to change in response to changes in the environment

Permanent Temporary

Exists for a relatively long period of time Exists for only relatively short period of time

Page 61: 1 Basic database terminology and concept. 2 DATA REPRESENTATION Analog vs. Digital Digital  Two states (1) on (0) off.

61

Database Structures

Source: Management Information Systems by James A. O'Brien and George Marakas. McGraw-Hill Higher Education