Sunteți pe pagina 1din 32

DATABASE DESIGN

AND IMPLEMENTATION

By Dr. Kenny Wong Meng Seng

Week 21 Introduction to Database and DBMS


1

2 Module Aims
To provide the knowledge and practical skills to create a database system using a suitable modern database management system.

Summary of Content:
This module examines the process of relational database design and implementation using relevant theory in a series of lectures and teaching hands-on database skills in PC lab sessions. Applications of modern databases will be studied and all students will be required to create a database system, fully documented, to solve a given problem.

Assessment
DDI is assessed by
One 1-hour multiple choice exam (30%); 3000 words group project (70%)
In a group of 4 to 5 people

Tutorials
4 lab tutorials
Note that tutorials do not start until week 23.

Text Book
Rob, P & Coronel, C. (2009). Database Systems: Design, Implementation & Management 8th ed. Thomson.
3

Session 1 2 3

Lecture Introduction to Database & DBMS Relational Database & Building a data model 1 Building a data model 2 resolving relationships The data dictionary Relational algebra Design Review Building dynamic webpages Applications of databases data mining

Reading Chs 1,2 Chs 3, 5 & 6 Chs 5 & 6

Tutorials

Tutorial 1- Creating tables

Ch 3 Chs 4,8 & 9 Notes Ch 13

Tutorial 2 Writing queries 1& design review

5 6

Tutorial 3 Writing queries 2

Business Process ReEngineering


Customer relationship management Transaction processing

Notes

Tutorial 4 review

Ch 12

Data vs. Information


Data: Raw facts; building blocks of information Unprocessed information Information: Data processed to reveal meaning Accurate, relevant, and timely information is key to good decision making Good decision making is the key to survival in a global environment
5

2
Data: 1000 or 5%

Information: Principal in the savings account : RM1000 Interest rate: 5%


Knowledge: If I deposited RM1000 into my bank account, and the bank pays 5% interest yearly. At the end of the first year the bank will compute the interest of RM50 and add it to my principal and I will have RM1050 in my bank account.

Transforming Raw Data into Information

Transforming Raw Data into Information 2 (continued)

Information in Summary Format

Information in Graphical Format

10

Introducing the Database and the DBMS


Databaseshared, integrated computer structure that stores:
End user data (raw facts) Metadata (data about data)

11

Introducing the Database and the DBMS


DBMS (database management system):
Collection of programs that manages database structure and controls access to data Possible to share data among multiple applications or users Makes data management more efficient and effective

12

Role and Advantages of the DBMS

13

Why Database Design is Important


Avoid redundant data
Poorly designed database generates errors leads to bad decisions can lead to failure of organization Defines the databases expected use Different approach needed for different types of databases
14

Historical Roots: Files and File Systems


Conversion from manual file systems to computer system:
Could be technically complex

Resulted in numerous home-grown systems being created


Initially, computer files were similar in design to manual files
15

Figure 1.3: Contents of the CUSTOMER file


Field Data
Record 1 Record 2 Record 3

16

Historical Roots: Files and File Systems (continued)


Other departments requested databases be written for them
SALES database created for sales department AGENT database created for personnel department

17

Historical Roots: Files and File Systems (continued)


As number of databases increased, small file system evolved Each file used its own application programs Each file was owned by individual or department who commissioned its creation

18

Historical Roots: Files and File Systems (continued)

19

Database Systems

20

The Database System Environment


Database system is composed of five main parts:
Hardware Software
Operating system software DBMS software Application programs and utility software

People Procedures Data

21

The Database System Environment (continued)

22

Data Models
Designers, programmers, and end users see data in different ways Different views of same data lead to designs that do not reflect organizations operation

Data modeling reduces complexities of database design


Various degrees of data abstraction help reconcile varying views of same data
23

Data Model Basic Building Blocks


Entity: anything about which data are to be collected and stored Attribute: a characteristic of an entity Relationship: describes an association among entities
One-to-many (1:M) relationship Many-to-many (M:N or M:M) relationship One-to-one (1:1) relationship

24

Relational Database Management System (RDBMS)

Database Systems, 8th Edition

25

26

Entity Relationship Diagram (ERD)

27

The External Model: End users view of the data environment

28

2 The Conceptual Model


Represents global view of the entire database

All external views integrated


into single global view: conceptual schema ER model most widely used ERD graphically represents the conceptual schema

29

The Internal Model

30

Summary
Data are raw facts

Data usually stored in a database


DBMS implements a database and manages its contents Database design defines the database structure

31

Summary (continue..)
A data model is an abstraction of a complex real-world data environment

Basic data modeling components: Entities Attributes Relationships


Data modeling requirements are a function of different data views and abstraction levels Three abstraction levels: external, conceptual, internal

32

S-ar putea să vă placă și