tailieunhanh - Lecture Introduction to computer and programming - Lecture No 29

The contents of this chapter include all of the following: Collections provided in namespace, collections store object reference, traversal supported, ArrayList can be sorted. | CSC103: Introduction to Computer and Programming Lecture No 29 Previous lecture File opening mode String (line) I/O in Files Reading a string Writing a string Reading and writing numbers in file Text vs binary file Reading and writing in binary file Today’s lecture outline Database Management system Adding a record Displaying all records Modify a record Delete a record Seeking in file through fseek ( ) function Database management system Database Management system is a large program composed of various modules that control the creation, modification, deletion and presentation of records Addition of record Add record: Addition of records must always take place at the end of existing records in the file, much in the same way you would add new records in a register manually Fatima Tariq 102 Physics Ali Ahmad 105 Computer science Fahad Hamid 109 Computer science Tahir Khan 110 Bioinformatics Display record Listing records means displaying the existing records on the screen. Records should be listed from first record to last record. Fatima Tariq 102 Physics Ali Ahmad 105 Computer science Fahad Hamid 109 Computer science Tahir Khan 110 Bioinformatics Name Roll No CGPA Department Modify record First ask the user which record he intends to modify. . ask to input name of the employee whose record is to be modified On modifying the record, the existing record gets overwritten by the new record. We want to modify cgpa of Ali Ahmad from to Fatima Tariq 102 Physics Ali Ahmad 105 Computer science Fahad Hamid 109 Computer science Tahir Khan 110 Bioinformatics Ali Ahmad 105 Computer science Deletion of record First ask the name for record to be deleted Then write all record except the one to be deleted in a temporary file Delete the original file Renamed temporary file back to original Cont. Fatima Tariq 102 Physics Ali Ahmad 105 Computer science Fahad Hamid 109 Computer science Tahir Khan | CSC103: Introduction to Computer and Programming Lecture No 29 Previous lecture File opening mode String (line) I/O in Files Reading a string Writing a string Reading and writing numbers in file Text vs binary file Reading and writing in binary file Today’s lecture outline Database Management system Adding a record Displaying all records Modify a record Delete a record Seeking in file through fseek ( ) function Database management system Database Management system is a large program composed of various modules that control the creation, modification, deletion and presentation of records Addition of record Add record: Addition of records must always take place at the end of existing records in the file, much in the same way you would add new records in a register manually Fatima Tariq 102 Physics Ali Ahmad 105 Computer science Fahad Hamid 109 Computer science Tahir Khan 110 Bioinformatics Display record Listing records means displaying the existing records on the .

TỪ KHÓA LIÊN QUAN