Introduction to Database Concepts

37
1 Intro to Database Concepts BUAD/American University Introduction to Database Concepts

description

Introduction to Database Concepts. Levels of System Development. Analysis - describes the problem domain: use cases, classes, object, relationships and interactions that model the Real World entities. (Business Objects) Free from technical or implementations details - PowerPoint PPT Presentation

Transcript of Introduction to Database Concepts

Page 1: Introduction to Database Concepts

1Intro to Database ConceptsBUAD/American University

Introduction to Database Concepts

Page 2: Introduction to Database Concepts

2Intro to Database ConceptsBUAD/American University

Levels of System Development• Analysis - describes the problem domain: use cases, classes, object,

relationships and interactions that model the Real World entities. (Business Objects) Free from technical or implementations details

• Design - Technical expansion and adaptation of the analysis models. How the analysis is to be implemented and the constraints of the implementation environment are considered. Along with the objects discovered in analysis, new “technical” classes (e.g. relational database mapping classes, user interface classes etc.) are created to support the requirements defined during the analysis.

• Implementation - Actual writing, testing and running of the code and implementation of the database based on the Design. Mapping the design to one or more Languages (e.g. Java, C++, Ada95) and to databases

Page 3: Introduction to Database Concepts

3Intro to Database ConceptsBUAD/American University

Activities in Design

• Architectural Design - Analysis classes are divided into functional groups (packages) and described across the hardware. New functional groups such as user interface, database management, security etc. are defined

• General Design - Reworking the analysis, adding new technical classes, addresses issues of output format, database Design and access, communication, class libraries, exceptions etc

• Detailed Design - Specification of all classes, including the needed implementation attributes and operation, and physical database layout

Page 4: Introduction to Database Concepts

4Intro to Database ConceptsBUAD/American University

What is a Database?

• A database is an integrated and structured collection of stored operational data used (shared) by application systems of an enterprise:

• Manufacturing Product data• University Student data, courses• Hospital Patient data, facilities• Bank Account data

Page 5: Introduction to Database Concepts

5Intro to Database ConceptsBUAD/American University

What is a Database?

• A database (DB) is a structured collection of data about the entities that exist in the environment that is being modeled.

• The structure of the database is determined by the data model that is used.

• A database management system (DBMS) is the generalized tool that facilitates the management of and access to the database.

Page 6: Introduction to Database Concepts

6Intro to Database ConceptsBUAD/American University

Definitions

• Data: Meaningful facts, text, graphics, images, sound, video segments.

• Database: An organized collection of logically related data.

• Information: Data processed to be useful in decision making.

• Metadata: Data that describes data.

Page 7: Introduction to Database Concepts

7Intro to Database ConceptsBUAD/American University

History of Database Management Systems

Page 8: Introduction to Database Concepts

8Intro to Database ConceptsBUAD/American University

File Processing

• Data are stored in files with interface between programs and files.

• Various access methods exist (e.g., sequential, indexed, random)

• One file corresponds to one or several programs.

Page 9: Introduction to Database Concepts

9Intro to Database ConceptsBUAD/American University

Page 10: Introduction to Database Concepts

10Intro to Database ConceptsBUAD/American University

Issues with File Systems

• Computer file system stores data in independent, unrelated files on disk.– Data are still high redundant– Sharing limited and at the file level– Data is unstructured (“flat” files)

• The sharing, security and integrity of the data can't be enforced efficiently because of data redundancy and data dependence problems.– Ensuring data consistency and controlling access to data

(Sharing granularity is very coarse, difficulties in developing new applications)

– High maintenance costs (data dependence; accessing data is difficult)

Page 11: Introduction to Database Concepts

11Intro to Database ConceptsBUAD/American University

What is Data Redundancy?

• Exists when unnecessarily duplicated data are found in the database.

• For example, a customer's telephone number may be found in the customer file, in the sales agent file, and in the invoice file.

• Data redundancy is symptomatic of a (computer) file system, given its inability to represent and manage data relationships.

• Data redundancy may also be the result of poorly-designed databases that allow the same data to be kept in different locations.

Page 12: Introduction to Database Concepts

12Intro to Database ConceptsBUAD/American University

Types of Data Redundancy

• Data inconsistency. Data inconsistency is the lack of data integrity.

• Data anomalies. Ideally, a field value• change should be made only in a single

place. Data redundancy, however, fosters an abnormal condition by forcing field value changes in many different locations.

Page 13: Introduction to Database Concepts

13Intro to Database ConceptsBUAD/American University

What is Data independence?

• Exists when changes in the data characteristics don't require changes in the programs that access those data.

• File systems exhibit data dependence because file access is dependent on a file's data characteristics.

• Therefore, any time the file data characteristics are changed, the programs that access the data within those files must be modified.

Page 14: Introduction to Database Concepts

14Intro to Database ConceptsBUAD/American University

Database Management System

• A DBMS is a data storage and retrieval system which permits data to be stored non-redundantly while making it appear to the user as if the data is well-integrated.

Page 15: Introduction to Database Concepts

15Intro to Database ConceptsBUAD/American University

Database Management Systems

• Goals of a DBMS– Provides an environment that is both convenient and

efficient to store and retrieve information to and from a computer system

– Help an organization to perform its mission and to achieve its

goals.• Proper database system eliminates data

dependence and improves data integrity by minimizing data redundancy.

Page 16: Introduction to Database Concepts

16Intro to Database ConceptsBUAD/American University

Advantages of the Database Approach

• Data Independence/Reduced Maintenance• Improved Data Sharing• Increased Application Development

Productivity• Enforcement of Standards• Improved Data Quality (Constraints)• Better Data Accessibility/ Responsiveness• Security, Backup/Recovery, Concurrency

Page 17: Introduction to Database Concepts

17Intro to Database ConceptsBUAD/American University

The Range ofDatabase Applications

• Personal Database

• Workgroup/Department Database

• Enterprise Database

Page 18: Introduction to Database Concepts

18Intro to Database ConceptsBUAD/American University

Workgroup database with local area network

Page 19: Introduction to Database Concepts

19Intro to Database ConceptsBUAD/American University

An enterprise data warehouse

Page 20: Introduction to Database Concepts

20Intro to Database ConceptsBUAD/American University

Components of the Database Environment

• CASE Tools

• Repository

• Database Management System (DBMS)

• Database

• Application Programs

• User Interface

Page 21: Introduction to Database Concepts

21Intro to Database ConceptsBUAD/American University

Components of the database environment

Page 22: Introduction to Database Concepts

22Intro to Database ConceptsBUAD/American University

Database stakeholders

• Database administrator (DBA)– A person who is responsible for the

management of the entire database environment

• System Developers

• Database users– Casual users– Naive users– Application programmers

Page 23: Introduction to Database Concepts

23Intro to Database ConceptsBUAD/American University

What is a Database Model?

• Collection of logical constructs used to represent the database's

• Data structure as well as the data relationship(s) found within that structure.

Page 24: Introduction to Database Concepts

24Intro to Database ConceptsBUAD/American University

Steps in the Database Development Process

• Enterprise Modeling• Conceptual Data Modeling

– Cuts across Project Initiation and Planning & Analysis phases of SDLC

• Logical Database Design• Physical Database Design and Creation• Database Implementation• Database Maintenance

Page 25: Introduction to Database Concepts

25Intro to Database ConceptsBUAD/American University

Functional and Database Development life-cycles

Page 26: Introduction to Database Concepts

26Intro to Database ConceptsBUAD/American University

Conceptual and logical database models

• E-R, object oriented, and semantic database models.

• Describes the data and what the relationships

• Types of relationships represented include:– One-to-many relationship– Many-to-many relationship

– One-to-one relationship

Page 27: Introduction to Database Concepts

27Intro to Database ConceptsBUAD/American University

Implementation (Physical) database models

• Describes how data are actually stored in the database

• Types of Implementation (physical) database models include:

• Hierarchical,

• Network,

• Relational, and

• Object oriented

Page 28: Introduction to Database Concepts

28Intro to Database ConceptsBUAD/American University

Hierarchical database Model

• Data redundancy is avoided by using an upside-down tree structure composed of parents and their children.

• Since a parent can have many children, but each (hierarchical) child can have only one parent, the parent data is identical for all of its children and need not be repeated.

Page 29: Introduction to Database Concepts

29Intro to Database ConceptsBUAD/American University

Network Database Model

• The network model allows a record to have more than one parent.

• Handles more relationship types then a Hierarchical database. – Many to Many relationships are easier to

implement in the than in the hierarchical model.

• Improved data access flexibility

Page 30: Introduction to Database Concepts

30Intro to Database ConceptsBUAD/American University

Network Model

Page 31: Introduction to Database Concepts

31Intro to Database ConceptsBUAD/American University

Issues with the Hierarchical and Network Models

• The hierarchical and network models yield some data independence, but they still exhibit database structure dependency.

• For example, changes in segments or their location require data managers and programmers to perform complex system management tasks and extensive maintenance coding.

Page 32: Introduction to Database Concepts

32Intro to Database ConceptsBUAD/American University

The Relational Model

• A Relational Database Management System (RDBMS) is a single data repository that provides both structural and data independence while maintaining conceptual simplicity.

• The manages all of the complex physical details

• The relational database model is perceived by the user to be a collection of tables in which data are

• stored.

• Each table resembles a matrix composed of row and columns. Tables are related to each other by sharing a common value in one of their columns

Page 33: Introduction to Database Concepts

33Intro to Database ConceptsBUAD/American University

Some advantages of Relational Model

• Structural independence. Does not use a navigational data access system,

• Provides excellent ad hoc query capability. End users find it easier to visualize their data as a collection of data organized as a matrix.

• Designers find it easier to deal with conceptual data representation, freeing them from the complexities associated with physical data representation.

Page 34: Introduction to Database Concepts

34Intro to Database ConceptsBUAD/American University

Structured query language (SQL)

• Is a fourth-generation language (4GL). • allows the user to specify what must be

done without specifying how it must be done.

• Based on work done by IBM.• Comprise of three parts: a user

interface, a set of tables within the database, and the SQL “engine.”

Page 35: Introduction to Database Concepts

35Intro to Database ConceptsBUAD/American University

Object-Oriented Database model

• Excellent for capturing Complex data such as graphics, video, and sound

• Objects contain all operations that can be performed on it, such as changing its data values, finding a specific data value, and printing data values.

• Because objects include data, various types of relationships, and operational procedures, the object becomes self-contained

• Ad hoc query and navigation can be a challenge compared to a relational database

• Hybrid databases called Object/relational database model (O/RDM) or universal servers are starting to appear

Page 36: Introduction to Database Concepts

36Intro to Database ConceptsBUAD/American University

Why is database design so important?

• Yields a detailed database blueprint. This blueprint

• Usually in the form of an E-R or object model, is used as the basis for database implementation.

• A database created without the benefit of a detailed blueprint is unlikely to be satisfactory.

Page 37: Introduction to Database Concepts

37Intro to Database ConceptsBUAD/American University

Points to Remember

• Good applications can't overcome bad database designs

• The existence of a DBMS does not guarantee good data management, nor does it

• ensure that the database will be able to generate correct and timely information

• Ultimately, the end user decides what data will be stored in the database