Download presentation
Presentation is loading. Please wait.
Published byRobyn Horn Modified over 8 years ago
1
Decision Analysis Fall Term 2015 Marymount University School of Business Administration Professor Suydam Week 10 Access Basics – Tutorial B; Introduction to Visio; Normalization
2
Objectives for Week Discussion – All Visio Introduction – Creating a Final Project Plan Schedule VTC Chapters 7-9 Review/Discussion – identify most important sections Tutorial B – Review Tables & Queries; Complete Forms and Reports Database Planning Relational Model and Normalization 10-2
3
10-3
4
10 -4
5
10 -7
6
To represent a relationship between two tables, we place the primary key (PK) of the first table in the second table. Then this attribute in the second table is called foreign key (FK). 10-6
7
10 -7 Query1 (pages 17-20) (B-14) Design View Datasheet View SQL View Query2 (pages 20-21) )(B-17) Design View Datasheet View SQL View
8
10 -8 Query3 (pages 21-22) (B-19) Design View Datasheet View Query4 (pages 22-24) (B-23) Design View Datasheet View
9
10 -9 Query5 (B-29) & Query6 (B-32) (pages 25-27) Design View Datasheet View Query7 (B-34) (pages 27-28) Design View Datasheet View
10
10 -10 Query8 (B-38) (pages 28-29) Design View Datasheet View
11
10 -11 Query9 (B-41) & Query10 (B-44) (pages 29-32)
12
10 -12 Query11 (B-46) (pages 32-33)
13
10-13 When you base a form on one table, you simply select the table, click the Create tab, and then select Form from the Forms group. The form will then contain only the fields from that table. When data is entered into the form, a complete new record is automatically added to the table. To create the form and subform, first create a simple one- table form on the Employee table. Follow these steps: 1.Click once to select the tblEmployee. Click the Create tab, then click Form in the Forms group. 2.To add the subform, take the form into Design view. On the Design tab, make sure that the Use Control Wizards option is selected, scroll to the bottom row of buttons in the Controls group, and click the Subform/Subreport button 3.Use your cursor to stretch out the box under your main form. You might need to expand the area beneath the main form. 4.Select Use existing Tables and Queries, click Next, and then select tblHoursWorked from the Tables/Queries drop-down list. Select all available fields. Click Next, select Choose from a list, click Next again, and then click Finish. Select the Form view. Save as frmEmployee.
14
10-14 Create a report from the Hours Worked table. Select the table by clicking it once. Click the Create tab, then click Report in the Reports group. A report appears. On the Design tab, select the Group & Sort button in the Grouping & Totals group. Click the “Add a group” button at the bottom of the report, and then select EmployeeID. To complete this report, you need to total the hours for each employee by selecting the Hours column heading. On the Design tab, click theTotals button in the Grouping & Totals group, and then choose Sum from the menu Rename object as rpt HoursWorked
15
10-15 System Definition (Webster’s Dictionary): a group of related parts that move or work together. Requirements Collection - This is the stage in the design cycle when you find out everything you can about the data the client needs to store in the database and the conditions under which that data needs to be accessed. Database Design involves identifying the existing relationships between separate pieces of data and mapping out those relationships in an organized way that makes sense. There are several types of database design: conceptual database design, logical database design, and physical database design. Conceptual Database Design - This step involves; Constructing the ER Model, Checking the model for redundancy, Validating the model against user transactions to ensure all the scenarios are supported Logical Database Design - This step involves: Table Generation From ER Model and Normalization of Tables Physical Database Design - This step involves describing the base relations, file organizations, and indexes design used to achieve efficient access to the data, and any associated integrity constraints and security measures.
16
1NF is the most basic of normal forms - each cell in a table must: contain only one piece of information, and there can be no duplicate rows. 2NF and 3NF are all about being dependent on the primary key. Recall that a primary key can be made up of multiple fields. One important thing to remember is that if something is not in 1NF, it is not in 2NF or 3NF either. So each additional Normal Form requires everything that the lower ones had, plus some extra conditions, which must all be fulfilled. 10-16
17
2NF - Say you have a table containing courses that are taken in a certain semester, and you have the following data: This is not in 2NF, because the fourth column does not rely upon the entire key - but only a part of it. The course name is dependent on the Course's ID, but has nothing to do with which semester it's taken in. Thus, as you can see, we have duplicate information - several rows telling us that IT101 is programming, and IT102 is Databases. So we fix that by putting the course name into another table, where CourseID is the ENTIRE key. 10-17
18
3NF - Let's say we also add the name of the teacher of the course, and some details about them, into the RDBMS: Now it should be obvious that TeacherName is dependent on TeacherID - so this is not in 3NF. To fix this, we do much the same as we did in 2NF - take TeacherName out of this table, and put it in its own, which has TeacherID as the key. No redundancy!! 10-18
19
Required data Some attributes must always contain a valid value –no nulls Example: every employee has a staff number and a position title! If missing –do not enter it into the database, period! Attribute domain constraints - What do you mean you want to enter a “N/A” code for the attribute “Gender”? Entity integrity - NO, repeat, NO records should have a null in the primary key 10-19
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.