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
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
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
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
IS Department 5
Example
Click icon to add picture
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
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.
IS Department
View of data
8
An architecture for a database system:
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
IS Department
Data models
10
Entity-Relationship model:Example of schema in the entity-relationship model:
IS Department
Data models
11
Example of tabular data in the relational model
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
Top Related