Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hệ quản trị Cơ sở dữ liệu Giới thiệu Phạm Thọ Hoàn

Similar presentations


Presentation on theme: "Hệ quản trị Cơ sở dữ liệu Giới thiệu Phạm Thọ Hoàn"— Presentation transcript:

1 Hệ quản trị Cơ sở dữ liệu Giới thiệu Phạm Thọ Hoàn hoanpt@hnue.edu.vn http://ccs1.hnue.edu.vn/hoanpt/DBMS

2 DB & DBMS What is a database? Cơ sở dữ liệu (DB) bao gồm tập các dữ liệu được tổ chức/lưu trữ theo một lược đồ (mô hình) nào đó, sao cho việc trích rút dữ liệu nhằm trả lời các câu hỏi của người sử dụng có thể thực hiện một cách dễ dàng và hiệu quả. DB = Lược đồ dữ liệu + dữ liệu What is a Database Management System? Hệ quản trị cơ sở dữ liệu (DBMS) là tập các chương trình máy tính nhằm: quản lý cơ sở dữ liệu (tạo mới/xóa/thay đổi/trích rút lược đồ dữ liệu hoặc dữ liệu) quản lý người sử dụng và việc truy cập của họ tới lược đồ dữ liệu/dữ liệu cung cấp một tập các câu lệnh (ngôn ngữ truy vấn) để thực hiện các chức năng ở trên

3 Database Design  Objective Ensuring data completeness Avoiding data redundancies Facilitating data access  Solution Normalization Reducing redundancies and improving data modification performance Renormalizations is often done to enhance reporting performance (at the expense of disk space and redundancy) Referential Integrity Maintains the logical relationships between database objects

4 Data models are simplified representations of the world by human

5

6 Steps in Database Design Requirement analysis What does the user want? Conceptual database design Defining the entities and attributes, and the relationships between these --> The ER model Physical database design Implementation of the conceptual design using a Database Management System

7 ER model & Relational Data Model Relational Database Entities: Student (Id, Name, Suburb) Subject (No, Name, Dept) Relationships: Student Subject Takes ER models view the world by entities and relationships Relational models view the world by relations

8 ER model: Example

9 TERMINOLOGY Entity --> What is this table about? students Attribute (Field) --> What items of information are necessary to keep concerning this entity? ID, name, department, year, advisor Record (Tuple) --> A set of values for each attribute for one item 20027654 Ali KayaCAA2Ahmet Durukal

10 TERMINOLOGY (Continue) Key --> The attribute used to define a required item who is the advisor of Ali Kaya? Types of keys: * Primary Key: Key used to uniquely identify a record * Foreign Key: A field in this table which is the Primary key of another table Relationship --> Definitions linking two or more tables

11

12

13

14

15 List of DBMS software

16 Lecture Contents Introduction Introduction to SQL server SQL Advanced SQL View T-SQL Store procedure Trigger

17


Download ppt "Hệ quản trị Cơ sở dữ liệu Giới thiệu Phạm Thọ Hoàn"

Similar presentations


Ads by Google