Database - 1


INDEX


INTRODUCTION................................................

TABLE OF CONTENTS 0 DATABASE COURSE PROGRAM 1

Chapter 1. OVERVIEW OF DATABASE 3

Chapter 2. RELATIONAL DATA MODEL 18

Chapter 3. DATA QUERY LANGUAGE 32

Chapter 4. INTEGRITY BINDING 60

Chapter 5. DATABASE DESIGN THEORY 72

REFERENCES 96

DATABASE COURSE PROGRAM

Subject code: MH16

I. Position, meaning and role of the subject:

The subject of Database is arranged after completing the subjects of General Information Technology, Basic Programming, and Applied Mathematics.

Is a basic technical subject, belonging to vocational training subjects and modules.

II. Course objectives:

- Present concepts and terms in the database;

- Apply data models of relational databases to database design for specific problems;

- Proficient in using relational data query language;

- Describe standard forms and standardize database problems before installation;

- Train students in the ability to self-study documents and be proactive in group work.

III. Course content:


Chapter code

Chapter Name

Lesson type

Location

Duration

Total

number

Lee

theory

Real

onion

Check

check

MH16-

01

Overview

database

Integration

Class

10

5

5

0

MH16-

02

Data model

relationship

Integration

Class

15

8

6

1

MH16-

03

Access language

data query

Integration

Class

20

9

10

1

MH16-

04

Full binding

intact

Integration

Class

7

4

3

0

MH16-05

Database design theory

whether

Integration

Class

38

19

17

2

Maybe you are interested!

Database - 1

IV. REQUIREMENTS FOR COURSE COMPLETION ASSESSMENT

About knowledge : Assessment through written and multiple choice tests meeting the following requirements:

+ Present concepts of entities, sets, relationships, keys, functional dependencies, etc.

+ Present relational database models.

+ Present the syntax of the SQL language

+ Present the standard forms of relational diagrams.

About skills : After completing this course, students will be able to:

+ Analyze data and draw entity-relationship data models (ER models); convert ER to relational schema. Identify keys, normalize schema to the best possible level.

+ Proficient in using standard SQL data query language to query installed data.

About attitude : Be careful, find more reference documents yourself, collect database models of businesses to learn more.


Introduce:

.......

Target:

Chapter 1. OVERVIEW OF DATABASE

Chapter code MH16-01

Briefly present the concepts of databases and data models;

Presents detailed entity relationship model (ERD), can analyze data and design entity relationship model.

Practice safe computer operations.

Content:

1. Some basic concepts.

1.1. Database definition

Data is stored on storage devices in a certain structure to serve many users with many different purposes called a database.

Visualize: Database as a two-dimensional table

Horizontal: the set of characteristics of an object to be managed is called a record or set.

Vertical: consists of points of a management object called field.

1.2. Advantages of database

- Reduce information duplication to a minimum and thus ensure data consistency and integrity.

- Ensure data is accessible in a variety of ways.

- Ability to share information with multiple users.


1.3. Characteristics of database methods

- Data sharing: Data is shared by many users.

France

- Data redundancy reduction: Data is shared by many departments

stored in one place in a unified structure.

- Compatibility: Eliminating redundancy results in compatibility.

prefer.

- Data integrity: Ensures certain integrity constraints. When a user

When using insert, delete, or edit, constraints must be strictly checked.

- Data security: Ensuring data security and information confidentiality is important.

- Data synchronization: Usually the database is accessed by many users at the same time. There needs to be a mechanism to protect against incompatibility (both booking ₮ seats do not match)

- Data independence: The separation of the structure that describes the data from the application program that uses the data is called data independence. This allows the data organization to evolve without modifying the application program.

1.4. Objects using the database

The user is the person who exploits the database through the management system.

Database. Can be divided into 3 types of objects: Database administrators, application developers and programmers, end users.

- Database administrator: Is the person responsible for daily management and maintenance of the database such as:

+ Accuracy, integrity and security of data and applications in the database.

+ Backup and restore database.

+ Keep in touch with application developers and programmers, end users.

+ Ensure the effective operation of the database and database management system

- Application developers and programmers: are IT professionals responsible for designing, creating and maintaining the final information for users.

- End users are non-specialists in the field of information technology, they are experts in other fields with specific responsibilities in their work. They exploit the database through programs (application software).

built by the application developer or the system's query engine

database management


1.5. Database Management System

To solve the problems that the database organization poses as mentioned above, it is necessary to have specialized software to exploit them. These software are called database management systems. Database management systems have the task of supporting database design analysts as well as database operators. Currently, on the software market, there are database management systems that support many utilities such as: MS Access, Visual Foxpro, SQL Server Oracle, ...

Each database management system is implemented based on a specific data model. Regardless of the data model, a database management system must meet the following factors:

- Communication language between users and the database, including: Data description language: To allow declaring the structure of the database, declaring data relationships and management rules imposed on that data. Data manipulation language: Allows users to update data (add/edit/delete). Data query language: Allows users to query necessary information in the database. Data management language: Allows system administrators to change the structure of data tables, declare information security and grant database exploitation rights to users.,...

-Data dictionary: Used to describe link mappings, record structural components of the database, application programs, codes, permissions, etc.

-Mechanism to resolve data contention issues: Each database management system can also install its own mechanism to resolve these issues. The following measures are often used: first: grant priority to each person

use; second: Mark data access requests, time division,

Whoever requests first has the right to access the data first,…

-The database management system must also have a mechanism to backup and restore data when an incident occurs. This can be done after a certain period of time, the database management system will automatically create a copy of the database, this method is a bit expensive, especially for large databases.


-The database management system must provide a friendly, easy-to-use interface.

use


1.6. Applications of Databases

Nowadays, databases are almost associated with all applications of information technology; such as information system management in government agencies, information storage and processing in enterprises, in scientific research fields, in teaching, as well as in organizing multimedia information, etc.

2. Data models

Data models are abstractions of the real environment. Each type of data model represents a different approach to data for database design analysts. Each type of data model has its own advantages and limitations, but there are still outstanding data models that attract a lot of research interest.

Next we will review the history of data model development.

In the sixties, the first generation of databases came into existence in the form of entity relational model, network model and hierarchical model.

In the seventies, the second generation of databases was born. That is the relational data model invented by EF. Codd. This model has a tight logical structure. This model has been and is being widely used in management work on a global scale. The study of the relational data model aims at the theory of normalization of relations and is an important tool in

analysis and design of current database systems. The purpose of this study is to

Remove abnormal elements of the relation when performing updates, remove redundant elements.

In the eighties, the third database model was born, which is the object-oriented database model, the distributed database model, the deductive database model, etc.

In the following section, we will present the most typical data model for designing (initial) an IT application, which is the entity-relationship model. In the remaining chapters of this textbook, we will present the relational data model.

3. Combined entity model

Currently, the relational data model is often used in database management systems, this is a physical data model. To establish this model, it is often necessary to use a conceptual data model to specify, one of the models in that form is the entity association model (then use some rules to convert the system from this model to the relational data model - these rules will be discussed in section 2.2).

Following are the concepts of the entity relationship model.


3.1. Entity

An entity is an existing and distinguishable thing, for example student Nguyen Van Thanh, class 2A of Information Technology College, subject of Database, motorbike with registration number 52-0549,... are examples of entities.


3.2. Attribute

The individual characteristics of an entity are called attributes.

For example, the attributes of student Nguyen Van Thanh are: code, student, gender, date of birth, permanent residence, class currently attending, ... (In this textbook, attribute names are written in capital letters)

Comment


Agree Privacy Policy *