Press the "view" icon button as a loan Enter the attribute name and data type Name it “Table1” Select "Design view" 242 Figure 2.46 Changing the table mode from “Datasheet View” to “Design View” Figure 2.45 Creating a Database Computer Science Form 4 2 Open "Design View" The name "Table1" is entered automatically. The name is changed by clicking the "Save" icon to save the table with the appropriate name. In Figure 2.45, the table "Table1" will be renamed with a new name, which is "Loans". Figure 2.45 shows an empty table with the name "Table1". entity. Instances of entities that have the same collection of attributes will be in the same relational table as records. Tables contain records. Each row is one record. Each record has information organized in attributes (fields). The "Loans" table does not have any attributes. 1 Create a new table Machine Translated by Google
text with long numbers • Text or combination 'General Property' 255 characters long or as specified by 'Field is 65,535 characters •Maximum size or used as an index used as an index Date/Time •Can be processed with Figure 2.48 Making certain attributes the primary key Figure 2.47 Adding new attributes • Text or combination •Not like numbers for date and time Various types of data are available in Access. •Maximum length 'TEXT' using arithmetic operations Size' in the window •Cannot be sorted Text CHAPTER 2 DATA BASE text with numbers •Can be sorted or Memo • A specific number Number Among them are: with data types Did you know? you ? Every table needs a primary key. A primary key is an attribute that is selected because the value of that attribute is unique and represents that record. Microsoft Access automatically selects certain attributes as primary keys. Usually the selected attribute is the first attribute. However, database developers can change by clicking attributes on other rows. Then, click the primary lock icon as in Figure 2.48. In "Design View" mode, the database developer can provide the attribute name, data type and description of the attribute. Step 2: Press the "primary key" icon button Step 1: Select the primary key attribute Each row is for a new attribute. In “Datasheet View” mode, each row is a record. See Figure 2.47. Notice that there are four attributes in the example. To add new attributes, make sure the table is in "Design View" mode. The default mode is “Datasheet View”. See Figure 2.46. 3 Set data types 4 Set of primary keys 243 Machine Translated by Google
Press the "Table" icon button An empty table results 5 Add other tables A database usually contains more than one normalized relational table. To add a new table, click the "Create" tab and the "Table" icon. See Figure 2.49. Then, right-click the mouse button and select the "Save" icon to save the new table by giving the table an appropriate name. See Figure 2.50. goo.gl/7sked9 Computer Science Form 4 4 examples of Database Application Figure 2.49 Adding a new table 244 Machine Translated by Google
Right click to get the menu Give the new table a name A new empty table with the name of the book easy to follow. the author book name Microsoft Access through the website below: Interesting tutorial and CHAPTER 2 DATA BASE no Book Call You can learn how to use Attributes Microsoft Access and then provided Daily Application Text Books this, you will be explained first about Text Text Through the website Table 2.10 Attributes in the Book table Text Data types access/accless02.htm Figure 2.50 Naming the table Good luck! http://www.profsr.com/ subject As in the previous steps, enter the attribute attributes with the appropriate data types. Change the Book table to "Design View" mode and enter the appropriate attributes and data types from Table 2.10. See Figure 2.51. Set Book Call no as primary key. 245 Machine Translated by Google
Repeat the same steps to create the Borrower table. Generate a new Borrower table. In "Design View" mode, enter attributes and data types as in table 2.11. See Figure 2.53. The Borrower id set is used as the primary key. Temporarily change the Book table back to "Datasheet" Mode View" and fill in the data as shown in Figure 2.52 Text Borrower Text Borrower's phone Figure 2.52 Book Table in Datasheet View Attributes Computer Science Form 4 Borrower id Data types borrower's name Table 2.11 Attributes in the Borrower table Text Figure 2.51 Book Table in Design View 246 Machine Translated by Google
Figure 2.54 Borrower Table in Datasheet View Figure 2.53 Borrower Table in Design View CHAPTER 2 DATA BASE "Primary Key" Click a new line and type the data Step 2: Press the icon button Step 1: Select the primary key attribute Change the Borrower table to “Datasheet View” mode and enter data. See Figure 2.54. 247 Machine Translated by Google
Select the tables you want to connect Right-click the contact and check all the check-boxes "Relationship" Associate the foreign key attributes with the primary key by pulling from table to table to show the cardinality symbol Press the icon button Next, the tables are linked through relationships between attributes. Each table has a primary key. For example to link table A and table B, the primary key of table B kp_B will be an attribute in table B. This linking attribute is called a foreign key. When the previous tables are referred back, it is found that there are attributes shared by two or more tables. Usually, these relationships have been identified when they created the table using an entity relationship diagram (ERD). Refer to Figure 2.55. 6 Build relationships between tables Figure 2.55 Connecting the tables (Loans, Books, Borrowers) Computer Science Form 4 248 Machine Translated by Google
goo.gl/6yRsU3 goo.gl/LzNhvJ A Quick Tutorial on Forms in Microsoft Access 2013 Figure 2.56 Generating a form from the Loan table Create a form in Access CHAPTER 2 DATA BASE Step 2: Click the "Form" icon button Step 1: Select a schedule 2.3.2 Creation of the Form However, the names of the attributes and the design of the forms generated in this way usually look simple and lack information. Related to Content Schedule 249 c The Loan Form is generated from the attributes in the Loan table. a In the “All Tables” window on the left, select the Loans table. b collect data to be stored as a record in a layout that Having learned how to build a table based on a relational schema using relational database software, let's review how to create a form that relates to the contents of the table. easier for users to understand 1 Create a form Forms are used in databases to: c verify data through form features Forms can be generated automatically using a database system such as MS Access through the following steps: a displays data from each record in the database table through a layout that is easier for users to understand b Click the "Create" tab and the "Form" icon. Machine Translated by Google
e "Save" the modified form and give it a suitable name, for example BorangPinjaman. In the "All Tables" panel, the Loan Form icon will appear. d Under the “Format” tab, change the font, text size, text order, background color 250 Figure 2.57 A simple Loan Form Figure 2.58 Loan Form that has been drafted Computer Science Form 4 and logo to make it look more attractive. Step 2: Choose the appropriate format Step 1: Click the “Format” tab Machine Translated by Google
Individual Work Press the button to view the data of each record in the table 40 f On the Loan Form tab, right-click and select "Close" to close g To open the display again, return to the "All Tables" panel, select Loan Form and right-click the Loan form icon. 2 (c) Repeat the steps that have been taught to produce (d) Use Layout View to change the design of the form. 1 (a) Repeat the steps that have been taught to produce (b) Use Layout View to change the design of the form. form for Borrower schedule automatically. form for Book table automatically. form. After that, from the "drop-down" menu, select "Open". The form that was closed earlier will reappear and can be used to display the data in the Loan table. To explore each record in the table, press the "Next record" or "Previous record" button on the bottom line of the form. Figure 2.59 Viewing table data through the Loan Form CHAPTER 2 DATA BASE Creation of forms related to tables 251 Machine Translated by Google
a Go to the end of the record in the table by pressing the "Last record" button on the row section b Press the "New (blank) record" button. d Save the data by right-clicking the Loan Form tab and select "Save". new record. The steps to add new data are as follows: under the form. e Repeat the right click and select "Close" to close the form. c After that, add the data for the new record. 2.3.3 Data Entry in Tables Through Forms 252 In addition to exploring the records in the table, the Loan form can also be used to add Press the "New (blank) record" button for a blank form Figure 2.61 Adding data in a new record through the Loan Form Computer Science Form 4 Figure 2.60 Adding a new record through the Loan Form Machine Translated by Google
Right-click to display the menu and select "Layout View" f The Loan Form that is opened to view the data cannot be drafted. If you still want to draft the Loan form, right-click the Loan form icon and select "Layout View". 253 Figure 2.63 "Split form" form Display both forms and tables in "Design view". See Figure 2.63: "Split form". Multiple items Displays multiple table records in one form. See Figure 2.64: "Multiple items" form. Figure 2.62 Opening the Loan Form again to be drafted Table 2.12 Types of forms Form design Form type Allows custom designed forms by specifying the records to be displayed from one or more tables in the database. See Figure 2.65: "Form design". Description CHAPTER 2 DATA BASE Split form In addition to the example form that has been used, other types of forms are "Split Form" and "Multiple Items". Database developers can also use "Form Design" to design the desired form. Machine Translated by Google
254 Figure 2.64 "Multiple items" form Computer Science Form 4 Figure 2.65 Form "Design form" Machine Translated by Google
255 Data validation is required to ensure that the data entered is in the appropriate format and is within a logical range. This is important for data integrity. The library database contains records of books, borrowers and loans for all school pupils. A librarian is tasked with producing: Authentication is done using an expression entered by the user into Access. Validation can be done for each attribute, by using Validation Rule. The Validation Rule expression is a boolean expression. The result of the expression used is True or False only. If the expression evaluates to False, Access will not save the user's input as a record but will prompt the user to enter a new value. The database contains a very large amount of data records, from tens to thousands of rows. This is because, data is always collected from various activities that require data storage. The stored data may consist of old data collected several years ago. This causes difficulty in searching. Most searches require only certain data due to the tasks the user needs to perform. In the diagram above, the value for noPajaman 9 is visible, the user entered a Borrower id that does not match the 6-digit format of the specified number. Data entry errors such as the example above can be overcome or reduced by using data validation when the entry is made. Example • Validation Rule for records referencing other attributes in the same table at the same time for the record. Figure 2.65 Random input validation This involves comparing two or more attributes in the same table. Validation for each field can be done by using Validation Rule. Available Validation Rules for Validation Rules for CHAPTER 2 DATA BASE two types of Validation Rules attributes record ie Validation Rule for attributes and Validation Rule confirm. • Validation Rule for the attribute ensures that the data entered in the attribute complies with the input data criteria. you ? Did you know? 2.3.4 Production to Retrieve Information Query Machine Translated by Google
What happens if the query is not created? Computer Science Form 4 Do we have other ways to find old data? Mind Test Figure 2.66 Using the Query Wizard to create a query b search that displays borrower ID, borrower name, book name, loan date and return date for late loans only. a search that displays borrower ID, borrower name, book name, loan date and return date for all loans. Query Wizard Click the icon button To complete this task, use the query object. A Query is a Microsoft Access object used to search a database. Query across a table and limit the data sought. which involves a combination of loan tables, borrowers and books. For example, the librarian needs to list the book call number, book name, return date and borrower's name from the query •Query can be made for one or more than one table. •Query can use specific search criteria such as dates, locations, individuals or specific characteristics. Query Wizard allows queries to be generated based on instructions in the Microsoft Access dialog window. To create a query in Access, two methods can be used, namely using the Query Wizard or using Query Design. Step 1 : From the "Create" tab, click the "Query Wizard" icon to start the process to create a query. See Figure 2.66. Using the Query Wizard 256 Machine Translated by Google
Schedule LOAN Selected attributes Figure 2.68 Selecting certain attributes from the Borrower table CHAPTER 2 DATA BASE Figure 2.67 Select table book name Borrow date, Return date BOOK Table 2.13 Attribute options for the BOOK and LOAN tables Step 2 : Select the table involved. See Figure 2.67. Step 4 : Repeat steps 1 to 3 for the following tables: Step 3 : Select the attributes in the involved table. See Figure 2.68. 257 Step 2: Press the select button Step 1: Select an attribute Select a schedule Step 3: Selected attributes Machine Translated by Google
Computer Science Form 4 Figure 2.69 Query loan details from selected attributes Figure 2.70 An empty Query Design window Step 5 : Save the combination of attributes as a query. Using Query Design Once all the required attributes have been identified and added to the query, save the query with a name that is easy to understand about its use. For example, a query can be saved using the name QueryLoan. Query Design allows queries to be generated by combining tables and selecting the attributes that want to be displayed in the query attribute panel. 258 Fields fill in one or more criteria The name of the table added to the query Data display options The original tables did not have such combinations of attributes The name of the attribute added to the query Option to set aside data Machine Translated by Google
Figure 2.72 Selecting a table to generate a query Figure 2.71 Launching Query Design to build a new Query CHAPTER 2 DATA BASE Step 2 : Select the table involved. See Figure 2.72. In this example, click the BOOKS table followed by LOANS and finally, BORROWERS. This will automatically display the Access ERD. In ERD Access, all attributes and primary keys will be visible. Step 1 : From the "Create" tab, click the "Query Design" icon to start the process of creating a query. See Figure 2.71. This is done by double clicking the table name in the Show Table dialog. 259 ERD Step 2: See the selected tables displayed in the ERD Step 1: Double click the name of the table to enter it into the query Click the Query Design icon button Machine Translated by Google
Figure 2.74 Saving the late borrower list query Computer Science Form 4 Figure 2.73 Selecting a table attribute as a query attribute Click the "Save" icon button and save the query with the name "Late Borrower Query". In the next lesson, we will learn how to set the criteria in the query table. This will add the table attribute as a query attribute in the table on the panel as shown in the figure below. Step 3 : Select the attributes in the involved table. See Figure 2.73. Step 4 : Save the combination of attributes as a query. See Figure 2.74. Select the attributes in the ERD table to be included in the query being built. This is done by double clicking on the selected attributes from the ERD box of the relevant table. 260 Step 1: Double click the attribute table to be added to the attribute table Query attribute table panel Enter the query name Machine Translated by Google
Example 6 Use of criteria Query can display records based on certain criteria. Criteria is a specific value of an attribute that is used as a search condition. In the same query attribute panel, criteria can be set to limit the display to only those records that meet the criteria. CHAPTER 2 DATA BASE goo.gl/SFsvYM The results of the query test show late loans on the system date Queries and SQL Enter criteria into the query Click the Run icon button to test the query System date The test results show that the loan is overdue based on the date of the computer system The criteria tests the current date 261 only late borrower information is displayed. Generate a late loan query that is the same as the loan query but displays only late loans. The record must contain Borrower id, Borrower name, Book name, Borrow date and Return date. (a) In the query attribute table panel, note the Return date column. Solution: (b) Set the criteria to display records with a date Return < Date(). 1 Change the Late Borrower Query query to Design View mode. 3 Test by pressing the "Run" icon in the "Design" tab. Note the appearance of the query results. This time, 2 Note that there is only one search criteria, which is late books. Late book criteria is the Return date which must be earlier than the search date. Machine Translated by Google
41 262 2.3.5 Report Generation Based on Results Query results Computer Science Form 4 Query Note: Searches can be made using two or more criteria. Given a BOOK table containing the following data. (a) Return the records of the "Computer" subject books only. (b) Return the book records for both "Science" and "Mathematics" subjects. The BOOKS table above shows the list of books in the school library. Generate queries that display books from specific subject categories only. c help in publication. a Click the query you want to use on the "All Tables" panel. Queries can be used to generate reports. Reports publish data in a format that is easier to understand so that, b From the menu bar, select the "Create" tab, click the "Report" icon. a produces a report for the meeting. c The report will be generated automatically. b helps the organization make decisions. The steps to generate a report from a query are as follows: d If necessary, the presentation of this report can be changed manually in Design View. Individual Activities Machine Translated by Google
263 Figure 2.77 Editable report format CHAPTER 2 DATA BASE Figure 2.76 Starting report generation automatically Figure 2.78 Saving the report Machine Translated by Google
Figure 2.79 Viewing the print preview Late Loan Query Computer Science Form 4 2.3.6 Information System Through Macros and Switchboard Individual Work 264 42 Generate reports for late loan queries. Make sure the query displays only late loans as shown in the example below. Verify by analyzing the original data in the table. "View" icon followed by "Print Preview". To print, click the "Print" icon. The generated report can be printed. To see a print preview, select the "Home" tab and click Creating and using macros A macro is a series of Microsoft Access commands that are automatically executed when data is entered or a button is pressed. Macros facilitate database automation and interaction with users. Macros can be contained in a macro object or included in an Access form or report component. Machine Translated by Google
Figure 2.82 List of actions (action) in the Access macro CHAPTER 2 DATA BASE goo.gl/1zpHqB The switchboard interface will appear automatically after you build the database. Figure 2.81 Using Macro Builder in a database project Figure 2.80 Inserting a macro object into the database The Switchboard Did you know? you ? 265 Click the drop-down button Press the “Macro” icon button to see the list action New macros can be built if the macros in the action list do not meet the needs or tastes of the database developer. Follow these steps to create a new macro: 1 Under the menu bar, click the "Create" tab and the "Macro" icon. 2 This will launch the Macro Builder. Macro Builder contains an empty table to place the macros that will be used by the application. See Figure 2.81. 3 In the macro builder, click the first empty cell in the action column. Click the arrow to display a list of available actions, then select the action you want to use. Machine Translated by Google
Choose an action Computer Science Form 4 266 1 Under the Action column, select the “MsgBox” action. Solution: Generate a simple macro that will say "Welcome" to the user via the Message Box. 2 Under the Arguments column, fill in the argument values in the Action Arguments panel. Example 7 requires an argument. The Comment column allows notes about the Action to be crossed out for the database developer's reference. To understand the new macro construction more clearly, 5 Under the Arguments column, the user can enter arguments for each selected Action macro action. Not all Action 6 Macros can be tested using the Run command on the Design tab. see the following examples: 4 In the macro builder window, there are various Action macro actions that can be used. For example, users can use macros to produce a "beep" sound, close the database, search for records, open a form, open a report, open a query, open a table and many more. See the long list in the following figure. Machine Translated by Google
Fill in the argument values in the Action Arguments panel CHAPTER 2 DATA BASE Testing new macros 267 Right-click the macro and select Run The resulting output Machine Translated by Google
Note: The form has three data modes (Data Mode) namely Read-Only, Edit or Add which can be set in the Action Arguments panel when building a macro. 2 From the Arguments list, select “OpenForm” under Action. The figure below shows the Sekolah Bestari book loan form in Edit data mode. Generate a macro object that automatically makes the book loan form a blank form to add a new loan. The mode of this form is Add. Solution Steps: 1 From the Create tab, click "Macro". Example 8 Computer Science Form 4 Select the Access command Opens the Loan form in Edit mode Right click and select Open to open the Loan form 268 Machine Translated by Google
Window Mode Mode to view the form: Design, Datasheet, Print Preview, Layout, Pivotal Chart, Pivotal Layout or Form. Select Form to view the form. Normal Command argument type Name form Either in the form of Read-Only, Edit or Add. Select Add to show a new blank form. Filled value The name of the selected form in Access. 4 Save the macro as borrowNew. This is done by clicking the Run icon under the Design tab Data Mode and a dialog box appears to name the new macro. The BorrowNew macro object will appear in the All Tables panel in the lower left corner of Access. View 5 Test the new borrow macro. Right-click the New loan object and select the “Run” item from the pop-up menu. 3 In the Action Arguments window, fill in the empty argument attributes. 269 CHAPTER 2 DATA BASE Testing the borrowNew macro object Name and save the new macro as borrowNew Machine Translated by Google
Steps: 270 1 Select the macro object, right-click and select Design View. 2 In the borrowNew macro command list, select a new line and click GoToControl from the command list Solution Action. When the Sekolah Bestari book loan form is in Add data mode, notice that the computer cursor is in the first text box which is the Loan Number. See the diagram shown below. Generate a macro object that automatically moves the cursor from the Borrower Number text box to the Borrower ID text box. Example 9 Blank book loan form in Add mode Reopens the macro object Computer Science Form 4 Machine Translated by Google
3 For the Arguments column in the New borrow macro of the GoToControl command, enter [borrower id]. Name in Design View. arguments must be enclosed in square brackets “[” and “]”. Note: The name of the argument is the name of the control or attribute on the form. This can be identified from the form 271 Enter the argument [borrower id] Passes arguments in GoToControl's new command Added a new command GoToControl in the borrowNew macro CHAPTER 2 DATA BASE Machine Translated by Google
Checks the name of the text box above the form as an argument value Store and test the GoToControl command in a borrowNew macro Computer Science Form 4 272 4 After that, save the new macro and test again. Notice that the cursor is in the Borrower ID text box. See the diagram shown below. The name of the text box appears as Borrower id Machine Translated by Google
Form Design Click the icon button 273 Example 10 Note: Use parameter type criteria in the query. The parameter type criteria uses an expression that references the form object. In this example, the expression needs to refer to the value that has been selected from the Loan Check Form combo box. Solution Create a new Access form with the name BorangSemakPeminjam. This form checks the loan details for a borrower. The user selects the borrower ID from the combo box list. After that, the user can click the Loan Details button to display the loan report for that borrower. 1 Click the Form Design icon button to generate a new blank form. •produces a combo box in the form that displays the attribute values from the table. • generate a query that uses criteria from the user input form. After building some simple macros, let's combine macros with forms that produce accurate and interesting reports based on problems in the Bestari School Book Loan System. Example 10 will show how to, • call a macro from the command button in the form to generate a query report automatically based on user input. • produce query report templates that use queries with criteria. Schedule Query Macros Attribute value Generate Build a blank form in Form Design View Query Report CHAPTER 2 DATA BASE Form User input Generate Form Query Calling Criteria asks for user input Query Report Form Machine Translated by Google
Step 1: Click the command button icon Step 1: Click the combo box Step 3: Select the option to read values from a table or query Step 2: Click Cancel because there is no need to do anything else Step 2: Draw a combo box 3 Add a new combo box. Select the option of reading values from a table or query. 2 Add a new command button. Added a command button to an empty form Adds an empty combo box to the form Computer Science Form 4 274 Machine Translated by Google
Give the name of the combo box and the name of the command button Select the BORROWER table CHAPTER 2 DATA BASE Select the Borrower id attribute Loan. 4 Select the BORROWER table. 5 Select the Borrower id attribute from the BORROWER table. 6 Give the name Borrower id to the combo box. Change the command button label name to Details The resulting combo box. Check the name by right-clicking the box and selecting Properties. Combo1's name is displayed on the Property Sheet. Click the command button and give it a new name 275 Machine Translated by Google
Borrower Query Build a BorrowerSpecific Query report Set criteria in the Specific Borrower Query Computer Science Form 4 276 8 Before this, do you remember that we produced QueryPeminjam. Make a new copy with the Copy Paste method, Borrower Query in the All Tables panel and name it as Specific Borrower Query. 9 In BorrowerSpecific Query, switch to Design View mode. Pay attention to the Borrower id column, see the diagram 7 Save the name of the form as BorangSemakPeminam. shown below. In the Criteria line, enter the following expression: Save BorrowerSpecific Query. 10 Generate a new report from BorrowerSpecific Query. [Forms]![Borrower Check Form]![Combo1] Step 1: Select BorrowerSpecific Query from the All Tables panel. which resulted. Click and change any section Step 4: Save as Step 2: Click the Report button Step 3: Edit the report Specific Borrower Reports Machine Translated by Google
Macro Builder Step 1: Right-click the Command button as an Action Step 3: Select Step 2: Select Build Event Step 2: Select the report to open the macro Step 1: Select OpenReport 11 Return to Loan Check Form. Right-click the Command button "Loan details" and select Build Events. From the Choose Builder dialog box, click Macro Builder. 12In the Macro Builder, see the diagram below, select Open Report from the drop-down menu. Next, fill in the details in the Action Arguments panel by selecting the name of the Specific Borrower Report report. Save the macro. Select the Specific Borrower Report report to open the macro The loan details button calls the macro CHAPTER 2 DATA BASE 277 Machine Translated by Google
Command "Loan details" Step 2: Open it Step 1: Select Form View mode Step 6: Close the Specific Borrower Report for further testing. Return to Borrower Check Form Borrower Check Form Step 3: Select Form View mode Step 5: Check the details Step 4: Click the button Specific Borrower Reports are for selected IDs 278 (c) From the Borrower Check Form, select Borrower id from the combo box and click the "Details" command button (d) Note that the Specific Borrower Report has been opened and only contains details for the ID requested borrowers only. (a) Borrower Check Form in "Form View" mode. (e) Close the Specific Borrower Report each time trying a new borrower ID from the Borrower Check Form. (b) Make sure the Specific Borrower Report has been closed. borrower". 13 Test the "Loan details" command button in the BorangSemakPeminam form. See the diagram below. Test the Borrower Check Form to open the Borrower Specific Report report Computer Science Form 4 Machine Translated by Google
279 2 From the Database Tools tab, click Switchboard Manager. The Switchboard Manager window will appear. Switchboard is an interface system for Microsoft Access. Switchboard can be inserted into the database to make it easier for users to find and perform tasks related to the use of various forms and reports in the database. Switchboard combines forms, reports, queries and other Access components in a more user-friendly "interface". After producing forms and reports, the database developer needs to think of an "interface" that unites all the forms, reports and other usage features for user convenience. In addition to being error-free, the "interface" must display the necessary data in a logical and complete manner. Users can see the features of the "interface" to find and update data in the database. a After entering the database, the user can review the data rows in the database table through the appropriate form. If necessary, the user can update, correct, add or delete data records. Steps: The three aspects that need to be considered in the production of an interface system are, b The interface system helps users produce appropriate reports. 1 Identify the required forms and reports. If necessary, sketch it on a piece of paper. Make sure the order of forms and reports is logical and easy for users. c The user can exit the system after the changes made have been saved. Features such as buttons, make it easy for users to navigate and perform tasks regarding the database. Creating and Using Switchboards Figure 2.83 Using Switchboard Manager to generate Switchboards and items CHAPTER 2 DATA BASE Machine Translated by Google
Figure 2.84 Giving a name to the Switchboard Figure 2.85 Press New and enter the name of the item 4 Give a suitable name to the Switchboard. 3 Press the Edit button. 5 Menu items work to perform various tasks such as opening another Switchboard, opening a form, opening a report, designing an application, launching a macro, launching a code and exiting the system. To add a menu item to the Switchboard, press the New button. Press New, enter an item name, then select the appropriate command from the Command list. Click OK. Notice that the new item is added in the Items on this Switchboard list. Computer Science Form 4 280 Machine Translated by Google
loan form. 7 Click OK and repeat the same steps to add other instructions. 6 To add other items, click Add again. For example, to see Figure 2.87 Adding the Loan Form item Figure 2.86 Adding the first menu item - Switchboard Figure 2.88 Adding the Overdue Loan Report item CHAPTER 2 DATA BASE 281 Machine Translated by Google
8 Apart from launching Access components, the Switchboard item is also used to exit the application. Figure 2.90 Adding a Book List item Figure 2.89 Adding Loan Report items Figure 2.91 Application exit Computer Science Form 4 282 Machine Translated by Google
Figure 2.92 Switchboard showing the items that can be launched Figure 2.93 Switchboard launches clicked items 10 Test the Switchboard items by pressing each one. If there are no errors, form, report or the response selected through the Switchboard Manager will be executed. 9 As a result, Switchboard with items that have been added. CHAPTER 2 DATA BASE 283 Machine Translated by Google
Figure 2.95 Launching Switchboard from the Current Database menu Figure 2.94 Options to open the database (g) Close and reopen the database to ensure the Switchboard is open properly (d) Click Current Database. automatic. Access settings. (b) Launch Access Options. (e) Select Switchboard from the drop-down list in the Display Form. (a) Click the Microsoft Office Button image. (f) Click OK. 12 How to edit Switchboard to add or remove items? Use Switchboard Manager. See the steps using Switchboard Manager in the following figure: (c) Click Access Options. 11 To make the Switchboard open automatically every time the database is opened, change Computer Science Form 4 284 Machine Translated by Google
(a) ERD (c) Form 1 Modify the switchboard in the previous example. The original Switchboard for the Bestari School Book Loan System did not have any buttons for new loans and buttons to check loan details based on loan ID input. (d) Macros embedded in control buttons (a) Add the New loan macro to the new switchboard. (b) Add the Borrower Check form to the new switchboard. (e) Produce a suitable switchboard 2 Note that the Book Loan database does not provide data to track whether borrowers have returned books. Therefore, you are required to study the design and implementation of the database to add the data. (b) Relationship schema. Figure 2.96 Editing a Switchboard using Switchboard Manager Macros and Switchboards CHAPTER 2 DATA BASE 285 Switchboard Manager that you want to edit Step 1: Press the icon button Step 2: Select Switchboard Step 3: Press the Edit button Step 4: Press the New button to add a new item. Individual Activities 43 Machine Translated by Google
configure Referred to Referred to Fill, search, use, Documentation 286 Produce, modify, test Documentation 2.3.7 Documenting Work Results Example: (ii) The database guarantees the integrity of the data so that the records entered and updated from (a) Database name: Provide details such as date, version, owner and user of the database The database will be used for a long period of time after development. Development involves data entry and retrieval. The database structure is rarely changed but after a certain period, updating or changing the database structure may be necessary to meet new needs and objectives. However, the database developer who knows the database design may have been changed. (i) The database enables efficient storage, updating and searching of book loan records, book lists in the library and borrower records. Therefore, the database administrator needs to consult the database documentation to understand the structure. Changes should be made optimally so as not to disturb the integrity of the original data. data. over time will not be lost or corrupted. (c) Data flow diagram (Data flow diagram ): Identify the data form and data flow in the manual process. The required data is usually recorded in a document or formula. Generate a data flow diagram. Imagine the difficulties that will be faced if documentation is not made during the development of the database? (iii) The database can be used or developed for needs or applications (b) Database objectives: Use techniques such as questionnaires, interviews, workshops, observations and documentation studies from vendors or organizational environments. Documentation helps the understanding of the database through analysis of graphics, tables and text specifications. In general, documentation should include the following: new in the future. Figure 2.97 Documenting work facilitates database development, administration and modification Database administrator Database Database documents Computer Science Form 4 Database developer Designer database Machine Translated by Google
Student's unique ID number Loan Book call number, borrower ID, book loan date, book return date char (6) char (6) Books Entities are used to remember the date a book is borrowed and will be returned. 999999 Entities are used to record book information to facilitate book tracking. 4 Return date DATE The entity is used to record the borrower's information to facilitate the verification of the borrower's identity and the matter of contacting the borrower when necessary. 3 Borrow date dd-mm-yyyy The return date is two weeks after the loan date 2 Call no Book call number, book name, author name, subject Borrower ID 999999 Borrower Borrower student ID, student name, mobile phone number 1 The unique call number of each book in the school library TIMESTAMP dd-mm-yyyy Date the loan was made Borrower ID id return date No borrow, call, date borrowing, of Data types Format Entity No. Attribute name Explanation Attributes Description 287 CHAPTER 2 DATA BASE Borrower Books Loan Making Figure 2.98 Data flow diagram (Data flow diagram) loan Borrower Call no loan request Example: definitely in the study. (f) Conceptual model: Analyze and draw observations in ERD form. ERD shows entities, attributes and relationships between entities. Show primary key attributes, foreign key attributes and cardinality. Example: (d) Data dictionary (data dictionary ): The data dictionary is a catalog of all attributes to be used in the database. The data dictionary contains a detailed explanation for each attribute after the analysis of the data flow diagram. A data dictionary is used as a basis for providing conceptual models and relational schemas. (e) Entity and attribute specification: Produce a table summarizing the known entities and attributes Machine Translated by Google
288 Borrow date Borrower id the author Borrower id record Figure 2.99 Concept Model 1 no Book Call book name subject M no Book Call 1 LOAN BOOK borrower's name BORROWER make 1 Borrower's phone return date Computer Science Form 4 012-2222222 125007 Harris bin Aman 016-6666666 125096 Francis Embong Example: (h) Normalized relational tables and sample data: The relational tables are based on relational schemas and contain sample data. Example: Example: BORROWER (g) Logical design (table structure): Show specifications in the form of a normalized relational scheme. Use a relational schema. Borrow date, Return date) • BOOK (no Book Call <KP>, Book name, author, subject) •LOAN (borrower id <KP><KA>, Book Call no <KP><KA>, •BORROWER (Borrower id <KP>, Borrower name, Borrower phone) Borrower's name Borrower's Phone id Borrower Machine Translated by Google
Documentation CHAPTER 2 DATA BASE 1 Select the Database Tools tab. MS Access has a documentation generation feature to allow database developers to view database structure reports. Follow these steps: Subject 6 Documentation results can be referred to directly or printed. Borrow Date 5 Microsoft Access will automatically generate the documentation. Borrower ID Book Call No Book Call No 4 Click the OK button. Return date need to be documented. Author 3 From the Documenter window, select tables, queries, forms, reports, macros and objects that Book Name 2 Select the Database Documenter icon. 43 289 (c) For the report, the sketch shows the printed form by including certain attributes, calculation outputs, titles, graphs, diagrams and additional information. BOOK (a) For the query, the sketch shows the attributes from the separate table and the criteria used to select the data to be displayed. LOAN (i) Query design, form and report: (b) For forms, sketches show the shape or outline to facilitate the user to edit, enter or view data. C Programming 10-Oct-2016 27-Sep-2016 Maruyama et al Information Systems, an Introduction Farah et al 27-Sep-2016 28-Sep-2016 Computer IPB257868 IPB051325 Software Engineering IPB051325 Shirley Jr Computer IPB051375 125007 28-Sep-2016 11-Oct-2016 IPB257868 10-Oct-2016 MA Bakar IPB124044 IPB051375 10-Oct-2016 IPB192254 Java Programming Computer 125096 Roger Estein 125007 Computer Computer IPB192254 Computer Graphics 27-Sep-2016 125096 11-Oct-2016 IPB124044 125007 Individual Activities Machine Translated by Google
3 Explain the problems in file processing systems that are solved by Database Management Systems (DBMS). 7 Explain the steps required to develop a new database 4 List the four types of table fields. This report can be cross-referenced with relational schemes and ERD diagrams to ensure that the database has been developed according to the established design. This is important to ensure the design is in 3NF and ready to use later. 1 Explain the functions of a Database Management System (DBMS). from the normalized database schema. 5 What is the purpose of data validation? 2 Discuss the disadvantages of a Database Management System (DBMS). 6 Identify common operations for a Database Management System (DBMS). Automatically generated documents Computer Science Form 4 Using the documentation production feature in Access Formative Training 2.3 290 Machine Translated by Google
2.4 Software developers can build system software or application software that can interface with database systems. Database systems such as Microsoft Access, Microsoft SQL, MySQL, Oracle SQL and so on help create databases and "interfaces " to view or edit database records. Types of "interface" include forms, queries, views and reports. A database stores records in an organized manner so that the data is easy to sort, easy to find and easy to update. The database is an important component of an information system because there is a lot of data that needs to be managed in the information system. Due to the importance of the role of the database in the information system, the development of the database system must be done systematically to meet the needs of users. The main phases are planning, analyzing, designing, building and maintaining the database system. See Figure 2.4.1. Remember the steps to create a database? There are many examples of information systems that use databases, such as online banking systems, airline ticket booking systems, social networking sites, library book lending systems, school student information systems and exam mark systems. 2.4.1 Production of a Normalized Database 291 LEARNING STANDARDS CONTENTS STANDARD Designing Maintain Analyze 1 analyze Planning and Build Planning & System development Database 2.4.1 Produce a normalized database (c) Identify the data, forms and reports required in the system. 2.4.2 Develop a database system with a graphical interface using database system development software according to the SDLC to solve problems (b) Identify objectives and uses. Figure 2.4.1 Phases of database development for information systems CHAPTER 2 DATA BASE Refer to environmental sources: (a) Research user needs. Machine Translated by Google