Presentation is loading. Please wait.

Presentation is loading. Please wait.

I NTRODUCTION TO D ATABASE C ONCEPTS AND M ICROSOFT A CCESS 2007 Eyad M. AlMassri BGMS4101 Introduction 1.

Similar presentations


Presentation on theme: "I NTRODUCTION TO D ATABASE C ONCEPTS AND M ICROSOFT A CCESS 2007 Eyad M. AlMassri BGMS4101 Introduction 1."— Presentation transcript:

1 I NTRODUCTION TO D ATABASE C ONCEPTS AND M ICROSOFT A CCESS 2007 Eyad M. AlMassri BGMS4101 Introduction 1

2 O RGANIZING D ATA Your first step in organizing data is to identify the individual fields The specific value, or content, of a field is called the field value A set of field values is called a record Next, you group related fields together into tables 2

3 D ATABASE C ONCEPTS AND A CCESS 2007 Introduction Database Microsoft Access Design and Creation Plan Tables Queries Forms Reports 3

4 W HAT IS A D ATABASE ? A structured collection of related data An filing cabinet, an address book, a telephone directory, a timetable, etc. In Access, your Database is your collection of related tables

5 D ATA VS. I NFORMATION Data – a collection of facts made up of text, numbers and dates: Murray 35000 7/18/86 Information - the meaning given to data in the way it is interpreted: Mr. Murray is a sales person whose annual salary is $35,000 and whose hire date is July 18, 1986. 5

6 B ASIC D ATABASE C ONCEPTS Table A set of related records u Field u Record –A collection of data about an individual item –A single item of data common to all records Name: Barry Harris College: Medicine Tel: 392-5555 Name: Barry Harris 6

7 A N E XAMPLE OF A T ABLE Records Fields NameGatorLinkPhoneCollege Graffrgraff392-3900Pharmacy Harrisbharris392-5555Medicine Ipswichzipswich846-5656PHHP 7

8 D ESIGN AND D OCUMENT Y OUR D ATABASE A designers best tools are a pencil and paper It is important to plan what you are going to do The sooner you touch the computer the sooner you’ll make a mistake If you don’t plan you will often have to start again Document what you are doing, will you remember what you did in three months time? 8

9 Q UESTIONS T O A SK Y OURSELF What have I got? (Inputs) What do I want? (Outputs) What do I need to do to get there? (Process) How am I going to build it? (Application/Program) 9

10 D ATABASE O PTIONS Freeware/ Shareware Microsoft Excel Microsoft Access Oracle/SQL Simplicity BasicsIntermediateAdvanced Hire a programmer # of Users 11Multiple Multiple of Multiples Multiple datasets No Yes Security Always consult with your security team if you are going to put any sensitive data on the internet. 10

11 W HY U SE A CCESS ? Familiar look and feel of Windows Easy to start building simple databases Can build sophisticated systems It’s already on your computer True relational database 11

12 W HAT IS A R ELATIONAL D ATABASE ? A relational database is a collection of tables from which data can be accessed in many different ways without having to reorganize the database tables. That is, once relationships are created, tables can “talk” to each other. We can link ( relate ) the tables to find: Which doctors have seen a patient Which students are in a class Which item is selling the most on Friday’s

13 B ASIC D ESIGN R ULES Data is broken down into Smallest Logical Parts PT ID #Home Address 987123 West Main Street, Gainesville, FL 32601 654456 South 3rd Road, Apt 12, Newberry, FL 32684 321846 West Newberry Road, Gainesville, FL 32609 Putting all of the home address in one field may make for convenient data entry, but it makes it very difficult to work with the data. For example, what if I needed to sort by City or Zip Code? Pulling fields together is fairly simple, pulling them apart is very difficult. You can join fields together in queries, forms and reports. 13

14 B ASIC D ESIGN R ULES Unique Field Names PATIENT TABLE First NameLast Name AnnieAdams AprilAppleton ArnoldArlington BobbieBrown ButchBruce You also want to be aware of the field names across tables. For example several tables may use the Field LastName. When you use those fields in other parts of the database things can become very confusing very quickly. DOCTOR TABLE First NameLast Name SallyeShapiro SamuelSmith SidneySamueson When these two Last Name fields are pulled into the same Query/Form/Report they will appear with the table name in front of the field name: Patient Table.Last Name 14

15 B ASIC D ESIGN R ULES No Calculated or Derived Fields Employee ID Num Hourly Rate Standard Hours Standard Pay Dept ID Num Dept Name 123$10.0040$390.0012Editing 789$10.0020$200.0012Edit Calculations - If we give an employee a raise, we will need to change both the Hourly Rate and the Standard Pay, and we need to make sure our calculations are correct. Derivations - Since we have the Dept ID, there is no need to include the Dept Name, it can be pulled from the Dept Table. Listing it in both places leads to data entry errors. Access will let you create calculations in queries, forms and reports. 15

16 B ASIC D ESIGN R ULES Unique Records LastNameGatorLinkPhoneCollege Smithrsmith3-5051Pharmacy Smithrsmith273-5051COP Smithrsmith273-5051Pharmacy Thomasbthomas392-5555Medicine Van Winklesleepyguy846-5656PHHP If you don’t have unique records, your database can’t tell which record you may be referring to. LastNa me EmergencyCont act SmithMary Anne Smith 16

17 P RIMARY K EYS LastNameGatorLinkPhoneCollege Smithrsmith273-5051Pharmacy Thomasbthomas392-5555Medicine Van Winklesleepyguy846-5656PHHP To ensure that each record is unique in each table, we can set one field to be a Primary Key field. A Primary Key is a field that that will contain no duplicates and no blank values. Looking at the table above, what would be the best Primary Key? 17

18 P RIMARY K EYS LastNameGL IDPhoneCollege Smithrsmith273-5051Pharmacy ThomasBthomas392-5555Medicine Van Winklesleepyguy846-5656PHHP While each column in this particular data set has unique data, the field that will work best for us is GL ID (GatorLink). Many employees will work for the same college, have the same last name and possibly even share telephone numbers, but each employee should have a unique GatorLink ID. When there is not a unique field in your data set, you can use an AutoNumber. Access can create incremented or random AutoNumbers for your primary key. 18

19 B ASIC D ESIGN R ULES Unique Records IDLastNameGatorLinkPhoneCollege 1Smithrsmith3-5051Pharmacy 2Smithrsmith273-5051COP 3Smithrsmith273-5051Pharmacy 4Thomasbthomas392-5555Medicine 5Van Winklesleepyguy846-5656PHHP We use the unique primary key as our link between our tables, this helps ensure we connect to the correct record. Emp IDEmergencyContact 2Mary Anne Smith 19

20 L ET ’ S S TART P LANNING PatientsAppointments 20

21 N AVIGATING A D ATASHEET The navigation buttons provide another way to move vertically through the records 21

22 22 D ATABASE T ERMINOLOGY Field Record Table Database A database is made up of one or more tables Individual tables in a database Records Individual fields

23 23 O BJECTS Tables Queries Reports Forms Macros Modules Objects

24 O PENING A D ATABASE u To open a database when you start Access –Choose the database you wish to open from the left hand panel, or choose More… to browse for another database u To Create a database, click on the Blank Database at the top of the middle panel u You can also use the Microsoft button to open existing databases or create new ones. 24

25 T HE A CCESS D ATABASE W INDOW The menu on the left hand side provide access to all database objects 25

26 D ATA V IEW /D ESIGN V IEW Datasheet View Design View 26

27 N AVIGATING F IELDS AND R ECORDS To move through records and fields To move through records First Record Previous Record Last Record New Record Current Record Next Record  Tab  Shift+Tab  Enter  Home/End  Ctrl+Home  Ctrl+End  Page Up  Page Down  The Arrow Keys 27

28 I NTRODUCING T ABLES Database is a collection of TABLES Tables store the data 28

29 I NTRODUCING Q UERIES A means of asking questions (querying) of your data Can look across a number of Tables and other Queries Can perform Calculations and Combine fields 29

30 I NTRODUCING F ORMS A friendlier view of the database Used for data input, menus, display and printing Can perform Calculations and Combine fields 30

31 I NTRODUCING R EPORTS Output of information in a printed report Allows you to group and summarize data Can perform Calculations and Combine fields Cannot Edit Data Can Make Labels 31

32 W ORKING T OGETHER Employees Customers Tables Queries Customer Company Name Address City Telephone Contact Name Forms Reports 32

33 V IEWING O BJECTS IN THE N AVIGATION P ANE 33

34 C OMPACTING AND R EPAIRING A D ATABASE Compacting a database rearranges the data and objects in a database to decrease its file size 34

35 C OMPACTING AND R EPAIRING A D ATABASE Make sure the database file you want to compact and repair is open Click the Office Button, point to Manage, and then click Compact and Repair Database 35

36 B ACKING U P AND R ESTORING A D ATABASE Backing up a database is the process of making a copy of the database file to protect your database against loss or damage The Back Up Database command enables you to back up your database file from within the Access program, while you are working on your database To restore a backup database file, you simply copy the backup from the drive on which it is stored to your hard drive 36

37 37 A CCESS OR E XCEL ? You are working with large amounts of data You need to create relationships between your data You rely on external databases to analyze data Your data is of a manageable data size There is no need for relationships between data You are primarily creating calculations and statistics Use Access when:Use Excel when:


Download ppt "I NTRODUCTION TO D ATABASE C ONCEPTS AND M ICROSOFT A CCESS 2007 Eyad M. AlMassri BGMS4101 Introduction 1."

Similar presentations


Ads by Google