Introduction to Data bases concepts

12
Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences Introduction to Data bases concepts IS 320: Introduction to Database Hatoon AlSagri IS Department

description

Introduction to Data bases concepts. IS 320: Introduction to Database Hatoon AlSagri. Basic Definitions. Data : Known facts that can be recorded and have an implicit meaning. What does 3421 means? Database : A collection of related data. - PowerPoint PPT Presentation

Transcript of Introduction to Data bases concepts

Page 1: Introduction to Data bases concepts

IS Department

Kingdom of Saudi ArabiaMinistry of Higher Education

Al-Imam Muhammad Ibn Saud Islamic UniversityCollege of Computer and Information Sciences

Introduction to Data bases conceptsIS 320: Introduction to Database

Hatoon AlSagri

Page 2: Introduction to Data bases concepts

IS Department

Basic Definitions• Data: Known facts that can be recorded and have an

implicit meaning. What does 3421 means?• Database: A collection of related data.• Mini-world: Some part of the real world about which data

is stored in a database. For example, student grades at a university.

• Database Management System (DBMS): A software package/ system to facilitate the creation and maintenance of a computerized database.

• Database System: The DBMS software together with the data itself. Sometimes, the applications are also included.

2

Page 3: Introduction to Data bases concepts

IS Department 3

Example of a Database

• Mini-world for the example: Part of a UNIVERSITY environment.

• Some mini-world entities:• STUDENTs• COURSEs• SECTIONs (of COURSEs)• (academic) DEPARTMENTs• INSTRUCTORs

Page 4: Introduction to Data bases concepts

IS Department 4

Example of a Database (with a Conceptual Data Model)

• Some mini-world relationships:• SECTIONs are of specific COURSEs• STUDENTs take SECTIONs• COURSEs have prerequisite COURSEs• INSTRUCTORs teach SECTIONs• COURSEs are offered by DEPARTMENTs• STUDENTs major in DEPARTMENTs

Page 5: Introduction to Data bases concepts

IS Department 5

Example

Click icon to add picture

Page 6: Introduction to Data bases concepts

IS Department

Advantages of Using the Database Approach

• Controlling redundancy in data storage and in development and maintenance efforts.

• Sharing of data among multiple users.• Restricting unauthorized access to data.• Providing Storage Structures for efficient Query Processing• Providing backup and recovery services.• Providing multiple interfaces to different classes of users.• Enforcing integrity constraints on the database.

6

Page 7: Introduction to Data bases concepts

IS Department

Database system

7

Level of abstraction Physical level describes how a record (e.g., customer) is stored. Logical level: describes data stored in database, and the

relationships among the data.type customer = record

name : string;street : string;city : integer;

end; View level: application programs hide details of data types. Views

can also hide information (e.g., salary) for security purposes.

Page 8: Introduction to Data bases concepts

IS Department

View of data

8

An architecture for a database system:

Page 9: Introduction to Data bases concepts

IS Department

Data Models

• Data Model: A set of concepts to describe the structure of a database, and certain constraints that the database should obey.

• Data Model Operations: Operations for specifying database retrievals and updates by referring to the concepts of the data model.

9

Page 10: Introduction to Data bases concepts

IS Department

Data models

10

Entity-Relationship model:Example of schema in the entity-relationship model:

Page 11: Introduction to Data bases concepts

IS Department

Data models

11

Example of tabular data in the relational model

Page 12: Introduction to Data bases concepts

IS Department

DBMS Languages

Data Definition Language (DDL): Used by the DBA and database designers to specify the schema of a database. In many DBMSs, the DDL is also used to define internal and external schemas (views).

Data Manipulation Language (DML): Used to specify database retrievals and updates. Two types of DML:

Ee.g., SQL, are set-oriented and user specify what data is required without specify how to get those data. Also called declarative languages.

record-at-a-time; they specify how to retrieve data and include constructs such as looping.

12