25
DATABASE SYSTEM I Beta Noranita, S.Si., M.Kom. Computer Science – Diponegoro University.

01 Overview SBD.pptx

Embed Size (px)

Citation preview

DATABASE SYSTEMI

Beta Noranita, S.Si., M.Kom.Computer Science – Diponegoro University.

A database is ◦ a collection of data, typically describing the activities of one

or more related organizations. ◦ a collection of related data.

Data is a known fact that can be recorded and have implicit meaning.

A database has the following implicit properties:◦ A database represents some aspect of the real world,

sometimes called the miniworld or the universe of discourse (DoD).

◦ A database is designed, built, and populated with data for a specific purpose.

Database (1)

A database has some source from which data is derived, some degree of interaction with events in the real world, and an audience that is actively interested in the contents of the database.

Database (2)

software designed to assist in maintaining and utilizing large collections of data, and the need for such systems, as well as their use, is growing rapidly.

collection of programs that enables users to create and maintain a database.

The DBMS is a general-purpose software system that facilitates the processes of ◦ Defining : data type, structure◦ Constructing: storing the data◦ Manipulating : querying◦ sharing : access the databasedatabases among various users and applications.

A database management system (DBMS) (1)

A database system the database and DBMS software together.

The elements of database system:1. Hardware 2. Software3. Brainware4. Database

Database System

A simplified database system environment

example

Database Administratorsis responsible for authorizing access to the database, for coordinating and monitoring its use,

and for acquiring software and hardware resources as needed.

Database Designersresponsible for identifying the data to be stored in the database and for choosing appropriate structures to represent and store this data.

End Usersthe people whose jobs require access to the database for querying, updating, and generating reports; the database primarily exists for their use.

Software Engineers System Analysts determine the requirements of end users, especially naive and parametric end users, and develop specifications for canned transactions that meet these requirements.Application programmers implement these specifications as programs; then theytest, debug, document, and maintain these canned transactions. Such analysts and programmers- commonly referred to as software engineers

ACTORS ON THE SCENE

Data model is ◦ a collection of tools for describing

– Data, data relationship, data semantics, data constraints

◦ a collection of concepts that can be used to describe the structure of database – data types, relationships, constraints.

Data Model

High-level or conceptual data models provide concepts that are close to the way many users perceive data.use concepts such as entities, attributes, and relationships.

Representational (or implementation) data models, provide concepts that may be understood by end users but that are not too far removed from the way data is organized within the computer.

Low-level or physical data models provide concepts that describe the details of how data is stored in the computer.

Categories of Data Models

Entity-Relationship Model

Relational Model

Database schema : the description of a database which is specified during database design and is not expected to change frequently.

A displayed schema is called a schema diagram The diagram displays the structure of each record type but not the actual instances of records.

Each object in the schema-such as STUDENT or COURSE-is a schema construct.

Database Schema

Database example:

Schema diagram for the database

A schema diagram displays only some aspects of a schema, such as the names of record types and data items, and some types of constraints ~ not displays relationships among the various files.

Many types of constraints are not represented in schema diagrams.

Schema Diagram

The data in the database at a particular moment in time is called a database state or snapshot.

It is also called the current set of occurrences or instances in the database.

In a given database state, each schema construct has its own current set of instances; for example, the STUDENT construct will contain the set of individual student entities (records) as its instances.

Every time insert or delete a record or change the value of a data item in a record, we change one state of the database into another state.

Database State

When we define a new database, we specify its database schema only to the DBMS. at this point, the corresponding database state is the empty state with no data.

The initial state of the database is get when the database is first populated or loaded with the initial data.

From then on, every time an update operation is applied to the database, we get another database state. At any point in time, the database has a current state.

Database schema and Database state

The internal level has an internal schema, which describes the physical storage structure of the database. ◦ The internal schema uses a physical data model and describes the complete

details of data storage and access paths for the database. The conceptual level has a conceptual schema, which describes

the structure of the whole database for a community of users. ◦ The conceptual schema hides the details of physical storage structures and

concentrates on describing entities, data types, relationships, user operations, and constraints.

The external or view level includes a number of external schemas or user views.◦ Each external schema describes the part of the database that a particular user

group is interested in and hides the rest of the database from that user group.

◦ External schema is typically implemented using a representational data model, possibly based on an external schema design in a highlevel data model.

The Three-Schema Architecture(1)

The three-schema architecture

Can be defined as the capacity to change the schema at one level of a database system without having to change the schema at the next higher level

Two types of data independence:◦ Logical data independence is the capacity to

change the conceptual schema without having to change external schemas or application programs.

◦ Physical data independence is the capacity to change the internal schema without having to change the conceptual schema.

Data Independence

In many DBMSs where no strict separation of levels is maintained, one language, called the data definition language (DDL), is used by the DBA and by database designers to define both schemas.

DDL create table, change table, create index, etc a collection of tables.

A collection of tables stored in specify file data dictionary.

DATABASE LANGUAGES (1)

Once the database schemas are compiled and the database is populated with data, users must have some means to manipulate the database.

Typical manipulations include retrieval, insertion, deletion, and modification of the data. The DBMS provides a set of operations or a language called the data manipulation language (DML) for these purposes.

DATABASE LANGUAGES (2)

Menu-Based Interfaces for Web Clients or Browsing.

Forms-Based Interfaces. Graphical User Interfaces. Natural Language Interfaces. Interfaces for Parametric Users Interfaces for the DBA.

DBMS Interfaces (1)

Component modules of a DBMS and their interactions.