Database Design Tutorial PDF
Document Details
Uploaded by StylizedFibonacci4990
Farabi Language School
Tags
Summary
This document explains the fundamentals of database design, including the concept of a database, its importance, and how it's used in various scenarios, such as storing student data, medical records or inventory. It also touches on big data and how it's different from traditional databases. The document is likely to be part of a computer science course.
Full Transcript
Chapter 1- Lesson 8 Farabi language school Database Design 222 “Database “ ▪ It is a collection of data and information organized and linked to each other, the database is used to store and retri...
Chapter 1- Lesson 8 Farabi language school Database Design 222 “Database “ ▪ It is a collection of data and information organized and linked to each other, the database is used to store and retrieve information easily and efficiency. Where information is stored and managed digitally using dedicated software and applications. The importance of databases in our lives, such as: ▪ Save student data at school such as name - date of birth - residential address. ▪ Keeping medical records in hospitals, such as the patient’s name, residential address, name of the treating physician, and date patient's last visit. ▪ Track inventory in stores such as (product name - manufacturer - date of manufacture - price. Advantages of using databases: ▪ Organization: ease of storing and retrieving data. ▪ Efficiency: fast access to data. ▪ Accuracy: Ensuring data is correct and reducing errors. ▪ Security: Protecting data from unauthorized access. ▪ Sharing: making data available to multiple users. Uses of databases in: ▪ Websites: such as storing user and product data. ▪ Data analysis: such as big data analysis and knowledge extraction. ▪ Scientific research: such as storing and analyzing experimental data. ▪ Commercial applications: such as customer relationship management systems and enterprise resource planning systems. Prep 1 – First term 37 Chapter 1- Lesson 8 Farabi language school Big Data: 222 ▪ Big Data refers to very large and diverse sets of structured and unstructured data Organization and semi-organization that continues to grow significantly over time. ▪ These data sets are so huge and complex in terms of size, speed of growth, and diversity, that systems cannot traditional data management, storage, processing and analysis. ▪ The amount of data is increasing and growing rapidly as a result of the rapid development of digital technology, such as artificial intelligence (AI)and the Internet of things (IoT) as data continues to increase, expand, and spread, new tools for big data emerge to help companies collect, process and analyze data at the speed necessary to get the most benefit from it. Prep 1 – First term 38 Chapter 1- Lesson 8 Farabi language school Data Table: 222 ▪ The Data table is an essential element in building databases and is the only source of data within a database. ▪ A Data table consists of rows and columns, where each row represents a single record of data each column represents a specific field of data. Create a Data Table: ▪ Many programs can create Data table, such as the Student Grades. Software used to create a Data table: ▪ Word, Excel, Access can create a Data table. ; ▪ We find that in the Word program, you can create a simple table, but you cannot obtain a data record for all students. ▪ Excel is difficult to use if you have a large amount of complex data. ▪ Microsoft Access is the best program to create a Database. Microsoft Access: ▪ It is one of the applications used to create databases, it builds a database real data, where you can build a more complex data structure and manage it efficiency. ; When do we use a Microsoft Access program? ▪ You have a large amount of complex data. ▪; You need to create relationships between data. ▪ You want to create custom applications for data management. ▪ need higher data security. Prep 1 – First term 39 Chapter 1- Lesson 8 Farabi language school Creating a Data Table in Microsoft Access: ; 222 Step 1: Open a New Database: Launch Microsoft Access. Click "File" and then "New". Select "Blank desktop database". Give your database a name “Student results” and choose a location. Click "Create. Steps to create a table in Microsoft Access: A.; “Table Design”: To write the names of the table fields and specify their data type. B. “Datasheet View” for entering and displaying table data. Table Design: ; 1-Choose Create from menus. 2- Choose a table design. Table Design interface consist of : 1.; To write the field name. 2. To choose the type of statement. 3. Design display style. Prep 1 – First term 40 Chapter 1- Lesson 8 Farabi language school Example of steps to design a “student grades” table: 1.; Type the field name “Student ID.” 222 2. Choose the field statement type from the drop-down list. 3. Type the rest of the field names, and select the statement type appropriate for each field. Save the table: 1-;Click the Save icon. 2- Type the name of the table “Student Grades”. Datasheet View: ; To enter and display table data. 1- Select “view”. 2- Choose “Data sheet view”. 3- The following window will appear. 4- Enter your data and the data of your colleagues in the table. Prep 1 – First term 41 Chapter 1- Lesson 8 Farabi language school Primary Key: 222 ; ▪ A field in a database table that is used to especially identify each record in that table and its primary key value never repeat within the same table. Prep 1 – First term 42 Chapter 1- Lesson 9 Farabi language school Forms & Queries 222 First - Forms in Database: ; Form: ; screen displays specific information from the database and allows the user to enter, modify ▪A or delete this information in a way organized and comfortable. Create Form : ▪ A new form called “Enter Student Grades” can be created using the form tab. ; Example: To create a form from the current table “Student Grades” 1.; Click on the table name “Student Grades” in the Navigation Pane on the left of the screen, and data will appear “Student Grades” table, right of the screen. 2. Choose the tab Create. 3. Click on Form. ▪ The Access program creates the form, and through the form, the data for each student’s record is displayed either way. 1. The current window is called Layout view, were the data for the first record is displayed. 2. Click on the “Next record” icon to view the data for the next record. 3. Click on the “Last record” icon to view the latest record data. 4. Click on the “First record” icon to view the data for the first record. Prep 1 – First term 44 Chapter 1- Lesson 9 Farabi language school Note: ; 222 ▪ The form is used to enter and modify data in the “Student Grades” table. ▪ All data entered through the form appears in the “Student Grades” table. ▪ Data can be entered through a Data table or through a form. Second - Queries in Database: ; “Queries are tools used to obtain data from a database according to specific criteria or conditions”. Steps to create a new query using the query design method: 1.; Choose Create Tab. 2. Click on “Query Design”. 3. Choose the data source table you want to use, which is “Student Grades.” 4. Click Add, then Close. 5. The “Design View” window appears, and it is divided into two parts, the upper part of which contains the source table data, the bottom is a query design grid. Prep 1 – First term 45 Chapter 1- Lesson 9 Farabi language school How to add fields from contacts data table to the query design grid: ; 222 1- From the previous window double click on the fields (last name, city and country region) 2- These fields automatically appear inside the grid. Note: - you can add the previous above fields into the grid by dragging the specified filed into specified place in grid window. How to implement the query: ;1- Click on design tab. 2- Click on run button from result group. How to hide a field or group of fields: ; From view choose “Design view. 1- 2-The query design window appears. 3-Click the ✔ checkbox in the Show row in the design grid at the bottom of my column Computer degree and English degree. 4-The flag is removed, meaning the field(s) are hidden in the query result. Prep 1 – First term 46 Chapter 1- Lesson 9 Farabi language school How to Add criteria to a query: ▪; Open the query 222 in Design View. ▪ Book the standard or standards in the standards class. Example: It is required to create a query to show only the student “Yasmine” record data, steps. Type the search Criteria "Yasmine=" in the "Student Name" column in the box. ▪ Execute the query, the student record or records that meet the criterion or condition are displayed. Prep 1 – First term 47