Cơ sở dữ liệu là hệ thống bao gồm rất nhiều thông tin, dữ liệu được xây dựng theo một cấu trúc nhất định nhằm đáp ứng nhu cầu khai thác, sử dụng của nhiều người hay chạy nhiều chương trình ứng dụng cùng một lúc. Khi áp dụng hình thức lưu trữ này, nó sẽ giúp khắc phục được những điểm yếu của việc lưu file thông thường trên máy tính. Các thông tin lưu trữ sẽ đảm bảo được nhất quán, hạn chế tình trạng trùng lặp thông tin. Được cho ra đời không lâu sau mô hình phân cấp. Mô hình dữ liệu mạng hay còn gọi là mô hình mạng có cấu trúc dữ liệu tổ chức thành một đồ thị hướng. Tại đây, các các đỉnh là các thực thể, các cung là quan hệ giữa hai đỉnh, một kiểu bản ghi có thể liên kết với nhiều kiểu bản ghi khác. Một thực thể con có thể có nhiều thực thể cha và có nhiều đường dẫn truy nhập đến một dữ liệu theo cấu trúc của mô hình dữ liệu mạng đã được định sẵn từ trước. Khi sử dụng mô hình này, người dùng sẽ có thể biểu diễn đa dạng các ngữ nghĩa theo kiểu bản ghi hay móc nối và truy vấn nhanh chóng thông qua phép duyệt đồ thị Navigation. Mặc dù vậy, trên mô hình dữ liệu mạng vẫn còn tồn tại những hạn chế như số lượng con trỏ lớn, hạn chế trong việc biểu diễn ngữ nghĩa và móc nối giữa các bản ghi với nhau.Đây là mô hình dựa trên lý thuyết tập hợp và đại số quan hệ. Nhờ áp dụng điều này mà mô hình dữ liệu quan hệ có tính chặt chẽ khá cao, mô tả dữ liệu một cách rõ ràng. Nó được đánh giá là mô hình với nhiều ưu điểm, được sử dụng thông dụng nhất hiện nay. Mô hình quan hệ được tổ chức dưới dạng bảng các phép toán thao tác trên dữ liệu dựa trên lý thuyết tập hợp của toán học. Sử dụng các phép toán như hợp, giao, tích đề các, chia, trừ, chiếu, chọn, kết nối,..để xây dựng mô hình.
VIETNAM GENERAL CONFEDERATION OF LABOUR TON DUC THANG UNIVERSITY FACULTY OF INFORMATION TECHNOLOGY INTRODUCTION TO THE OPERATING SYSTEM ASSIGNMENT SOLVE THE PROBLEM ABOUT PROCESSES AND THREADS (EVEN NUMBERS) Supervisor: Ph.D JAE YOUNG HUR Ph.D BHAGAWAN NATH Student: VÕ ĐĂNG PHƯỚC – 51600071 TRẦN HỮU PHÁT – 51600062 Class: 16050311 HO CHI MINH CITY, 2017 VIETNAM GENERAL CONFEDERATION OF LABOUR TON DUC THANG UNIVERSITY FACULTY OF INFORMATION TECHNOLOGY INTRODUCTION TO THE OPERATING SYSTEM ASSIGNMENT KEY – VALUE DATABASE (HADOOP,AMZON DYNAMO, VOLDERMORT) Supervisor: Ph.D JAE YOUNG HUR Ph.D BHAGAWAN NATH Student: VÕ ĐĂNG PHƯỚC – 51600071 TRẦN HỮU PHÁT – 51600062 Class: 16050311 HO CHI MINH CITY, 2018 ACKNOWLEDGEMENT First of all, I would like to send to teachers of the Faculty of Information Technology greetings and best wishes Thanks to the classroom learning as well as the guidance of Ph.D Jae Young Hur and Ph.D Bhagawan Nath, I was able to have the knowledge to complete my essay on “ Solve the problem about processes and threads (even numbers) ” With the limited knowledge of a student, I hope to receive advice, comments from teachers, so that I can improve on skills as well as knowledge later I sincerely thank 2 ASSIGNMENT IS COMPLETED AT TON DUC THANG UNIVERSITY I pledge that this is my own essay product and is guided by Ph.D Jae Young Hur and Ph.D Bhagawan Nath The research contents, results in this topic are honest and not published in any way before The data in the tables used for the analysis, comment, and evaluation were collected by the authors themselves from various sources indicated in the reference section In addition, the project uses some comments, reviews as well as data from other authors, other organizations have cited and annotated the source If any fraud is found, I am fully responsible for the content of my project Ton Duc Thang University is not involved in any copyright infringement or copyright infringement in the course of implementation (if any) Ho Chi Minh City, 30th November 2017 Author (sign and write full name) Võ Đăng Phước Trần Hữu Phát CERTIFICATE AND ASSESSMENT OF THE TEACHER Confirmation of the instructor _ _ _ _ _ _ _ Ho Chi Minh City, 30th November 2017 (Sign and write full name) The assessment of the teacher marked _ _ _ _ _ _ _ Ho Chi Minh City, 30th November 2017 (Sign and write full name) SUMMARY To avoid interruptions, the operating system provides parallel running processes These processes generate and end automatically Each processes have their own address space For an application, it works better when they are controlled by multiple single threads in one process These threads are independently and its own stack, but all threads in the process share common address space Threads can be implemented in user space or in the kernel Processes can communicate with one another using protocols that communicate between processes, such as semaphores, monitors, or messages These primitives are used to ensure that no process occurs in critical areas at the same time, a situation that leads to chaos A process can be running, runnable or blocked and can change state when it or another process executes one of the communication prototypes between processes Interthread communication is similar Interprocess communication primitives can be used to solve such problems as the producer-consumer, dining philosophers, reader-writer, and sleeping barber Even with these primitives, care has to be taken to avoid errors and deadlocks Interprocess communication primitives can be used to solve a lot of problems Somtimes, it has to be taken to avoid errors and deadlocks CONTENTS ACKNOWLEDGEMENT .i ASSIGNMENT IS COMPLETED AT TON DUC THANG UNIVERSITY ii CERTIFICATE AND ASSESSMENT OF THE TEACHER .iii SUMMARY iv CONTENTS LIST OF SIGNS AND ABBREVIATIONS LIST OF TABLES, FIGURES AND CHARTS CHAPTER - KEY .5 1.1 Introduction 1.1.1 Primary Key 1.1.1.1 Set primary key 1.1.1.2 Delete primary key .5 1.1.2 Foreign Key 1.1.3 1.1.2.1Set foreign key 1.1.2.2Delete foreign key .5 Compare 1.2 Some other keys 1.2.1 Simple lock .5 1.2.1.1 Live lock 1.2.1.2 Dead lock 1.2.2 Lock read/write CHAPTER – VALUE 2.1 REFERENCE .16 LIST OF SIGNS AND ABBREVIATIONS SIGNS: ABBREVIATIONS: LIST OF TABLES, FIGURES AND CHARTS CATEGORY LIST: LIST OF TABLES: CHAPTER - KEY 1.1Introduction Key use to execute all vounted data in SQL Server and this database are important of database objects 1.1.1 Primary Key The primary key (or constrauling primary key) used to determine the unique list each records in the database of table Data of field primary key must be unique only and contain NOT NULL 1.1.1.1Set primary key We use command: AFTER TABLE ’name table’ ADD PRIMARY KEY( ’field in table’ ) And remember primary key must NOT NULL 1.1.1.2 Delete primary key We use command: AFTER TABLE ’name table’ DROP PRIMARY KEY 1.1.2 Foreign Key The foreign key of a table is considered a pointer to the primary key of another table It is used to connect two table together 6 1.1.2.1 Set foreign key We use command: AFTER TABLE ’name table’ ADD CONSTRAINT ’field’ FOREIGN KEY ’name table’ ( ’field in contain foreign key’ ) 1.1.2.2 Delete foreign key We use command: AFTER TABLE .’name table’ DROP FOREIGN KEY ’field’ 1.1.3 Compare Primay key Primary key uniquely identifies a record in the table Primary keys not accept null values By default, the primary key is a clustered index and the data in the database table is organized in the order of the clustered indexes We can only have one primary key in a table 1.2 Some other keys 1.2.1 Simple lock Foreign key Foreign key is a field in the table and is a primary key in another table Foreign keys can accept multiple null values Foreign keys not automatically create an index, group, or group You can create an index on a foreign key We can have multiple foreign keys in a table 7 Before applying to A, you must apply for A lock (A) If the request for a lock is approved, it is processed to A After the operation is complete with A, release the command A Unlock release (A) Lock manager will allow us lock (A) if A free 1.2.1.1 Live lock Appearance status lock but when the lock unlock someone else will lead to have to continue waiting for the key lock 1.2.1.2 Dead lock For example: T1 ask lock(A), T2 ask lock (B), after T1 need lock(B) it is in the waiting state T2 also needs A so ask lock (A) and wait also leading to crashes Prevent deadlock: If a transaction starts, you will need to lock the "all" key and then the operation If so, then manipulate otherwise wait Another way is the admin will intervene and see which program is more important then priority But the above methods are still not optimized 1.2.2 Lock read/write To read A must request readlock (A), readlook is also called sharedlock To write A must request writelock (A) The writelock is also called exlisivelock A readlock request is accepted if no one has kept writelock 8 Also a writelock request is accepted when no one has kept writelock or readlock CHAPTER – VALUE 2.1 REFERENCE https://www.w3schools.com/sql/sql_primarykey.asp https://viblo.asia/p/khac-biet-giua-khoa-chinh-va-khoa-ngoai-trong-sql- 924lJMdWZPM https://zendvn.com/he-quan-tri-co-so-du-lieu/ ... primary key in a table 1.2 Some other keys 1.2.1 Simple lock Foreign key Foreign key is a field in the table and is a primary key in another table Foreign keys can accept multiple null values. .. FOREIGN KEY ’name table’ ( ’field in contain foreign key? ?? ) 1.1.2.2 Delete foreign key We use command: AFTER TABLE .’name table’ DROP FOREIGN KEY ’field’ 1.1.3 Compare Primay key Primary key uniquely... 1.1.1.1Set primary key We use command: AFTER TABLE ’name table’ ADD PRIMARY KEY( ’field in table’ ) And remember primary key must NOT NULL 1.1.1.2 Delete primary key We use command: AFTER TABLE