CVEV 118/698 Databases Lecture 2 Prof. Mounir Mabsout Elsa Sulukdjian Walid El Asmar.

Slides:



Advertisements
Similar presentations
MS-Access XP Lesson 1. Introduction to MS-Access Database Management System Software (DBMS) Store data in databases Database is a collection of table.
Advertisements

Computer Concepts BASICS 4th Edition
Benchmark Series Microsoft Access 2010 Level 1
Concepts of Database Management Sixth Edition
Concepts of Database Management Seventh Edition
Access Lesson 2 Creating a Database
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Maintenance Modifying the data –Add records –Delete records –Update records Modifying the design –Add fields into tables –Remove fields from a table –Change.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.
1 Chapter 2 Reviewing Tables and Queries. 2 Chapter Objectives Identify the steps required to develop an Access application Specify the characteristics.
Concepts of Database Management Sixth Edition
Tables. Any database must contain one or more tables, because that’s where the data is stored. For any table there are two views provided: Datasheet view.
Microsoft Access Database software. What is a database? … a database is an organized collection of data. A collection of data of similar information compiled.
Chapter 4: Organizing and Manipulating the Data in Databases
Microsoft Access Tables Birgül Kutlu Bayraktar. TERMS A database is a collection of related information. An object is a competition in the database such.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 1 1. Chapter 2: Relational Databases and Multi-Table Queries Exploring Microsoft Office.
Access Lesson 2 Creating a Database
Unit J: Creating a Database Microsoft Office Illustrated Fundamentals.
Introduction to Access By Mary Ann Chaney and Alicia Harkleroad.
With Microsoft Office 2007 Intermediate© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Office 2007 Intermediate.
BIS121 IT for Business Application Lecture 8 – Database (Part I)
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 4 – Creating New.
With Microsoft Access 2007 Volume 1© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access 2007 Volume 1 Chapter.
Access 2000 Part 1 Introduction to Access Agenda Starting Access. Creating Tables. Working with Tables. Setting Field Properties.
® Microsoft Office 2013 Access Building a Database and Defining Table Relationships.
Created by: Tanya Morgan.  Access is the database software of the Microsoft Office suite.  A database is a collection of objects that work together.
Microsoft Access Lesson 1 Lexington Technology Center February 11, 2003 Bob Herring On the Web at
 A database is a collection of data that is organized so that its contents can easily be accessed, managed, and updated. What is Database?
CSS/417 Introduction to Database Management Systems Workshop 2.
Microsoft Access 2010 Building and Using Queries.
Analyzing Data For Effective Decision Making Chapter 3.
CHƯƠNG 3 Finding, Filtering, and Formatting Data.
Lesson 2.  To help ensure accurate data, rules that check entries against specified values can be applied to a field. A validation rule is applied to.
Microsoft Access 2000 Presentation 2 Creating Databases Part I (Creating Tables)
1 By: Nour Hilal. Microsoft Access is a database software where data is stored in one or more Tables. A Database is a group of related Tables. Access.
MS-ACCESS BY SANGEETHA PARTHASARATHY Topics to be covered §Comparing Values in Selection Criteria §Calculating Values in a Query §Changing the appearance.
WEEK 11 Database Design. TABLE INSTANCE CHARTS Create Tables.
1 Web-Enabled Decision Support Systems Access Tables: Building Data Foundation Prof. Name Position (123) University Name.
Concepts of Database Management Seventh Edition
Key Applications Module Lesson 21 — Access Essentials
Concepts of Database Management Seventh Edition
Access Chapter 2: Relational Database Objectives Design data Create tables Understand table relationships Understand data types, key, & field properties.
Chapter 17 Creating a Database.
® Microsoft Office 2010 Building a Database and Defining Table Relationships.
Using Microsoft Access 56:150 Information System Design.
WHAT IS A DATABASE? A DATABASE IS A COLLECTION OF DATA RELATED TO A PARTICULAR TOPIC OR PURPOSE OR TO PUT IT SIMPLY A GENERAL PURPOSE CONTAINER FOR STORING.
® Microsoft Office 2013 Access Creating a Database.
Databases,Tables and Forms Access Text by Grauer Chapters 1 & 2.
XP Chapter 2 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Building The Database Chapter 2 “It is only the farmer.
A Skills Approach Access 2010 Working with Tables © 2012 The McGraw-Hill Companies, Inc. All rights reserved Chapter 2.
Microsoft Office XP Illustrated Introductory, Enhanced Tables and Queries Using.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 3 BACKNEXTEND 3-1 LINKS TO OBJECTIVES Modify a Table – Add, Delete, Move Fields Modify a Table.
Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.
Introduction to a Database Defining a database Database window in Access The six items in window: Tables, Queries Forms, Reports, Macros, Modules.
Microsoft Office 2013: In Practice Chapter 2 Using Design View, Data Validation, and Relationships Copyright © 2014 by The McGraw-Hill Companies, Inc.
Relational Database Techniques
© 2001 ComputerPREP, Inc. All rights reserved. Access 2000: Module II.
Lesson 13 Databases Unit 2—Using the Computer. Computer Concepts BASICS - 22 Objectives Define the purpose and function of database software. Identify.
1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.
Lesson 4.  After a table has been created, you may need to modify it. You can make many changes to a table—or other database object—using its property.
INTRODUCTION TO ACCESS. OBJECTIVES  Define the terms field, record, table, relational database, primary key, and foreign key  Create a blank database.
Pasewark & Pasewark 1 Access Lesson 2 Creating a Database Microsoft Office 2007: Introductory.
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 1 ® Database & Table.
Microsoft Access Lesson 5 Lexington Technology Center February 25, 2003 Bob Herring On the Web at
Microsoft Access Prepared by the Academic Faculty Members of IT.
Getting Started in Access 1 Using an existing Database Database Window Table Design View Parts of a Table Views in Access Navigating in Access Entering.
COMPUTER SKILLS MS-ACCESS. Introduction Access is a piece of software known as a database management system. At its most basic level, it can be used to.
Access Tutorial 2 Building a Database and Defining Table Relationships
Practical Office 2007 Chapter 10
Access Lesson 2 Creating a Database
Presentation transcript:

CVEV 118/698 Databases Lecture 2 Prof. Mounir Mabsout Elsa Sulukdjian Walid El Asmar

All relational database development software are similar in their way of organizing and processing information. All relational database development software are similar in their way of organizing and processing information. MS Access is a good example of a high-level DBMS. MS Access is a good example of a high-level DBMS. You can develop a full-fledged DB application using Access alone, w/o the use of any other software development tool. You can develop a full-fledged DB application using Access alone, w/o the use of any other software development tool. However more powerful DB projects can be developed by connecting to VB, VC++ etc... Applications. However more powerful DB projects can be developed by connecting to VB, VC++ etc... Applications.Introduction

Opening a MS Access Project This is the start-up form. This is the start-up form. When you create a new project, you will first be asked to allocate for it a space in the memory. When you create a new project, you will first be asked to allocate for it a space in the memory.

Database Window The database window shows all various components of a project, of which the most important are: tables, queries, forms and reports. From it, you can create and reach those elements.

Tables Tables are the fundamental data containers in a database. They are reached from the 1 st tab of the database window. Tables are the fundamental data containers in a database. They are reached from the 1 st tab of the database window. Three ways are provided to create a table: Three ways are provided to create a table: – Design view: will require you to create and model the fields of the table first, then work with the data. – Design view: will require you to create and model the fields of the table first, then work with the data. – Wizard: will step you through the creation of a table.  – Entering Data: will directly give you a blank datasheet, with unlabelled columns, where to fill the data. As the table is Saved, fields are given generic names (I.e. “Field1”, “Field2”, etc.) that you can later edit.  Follow Smiley : work in design view! This will help you get used to many functionalities. Follow Smiley : work in design view! This will help you get used to many functionalities.

Table Design View Design/ datasheet view toggle Primary key marker Primary key Indexes Insert, Delete rows Properties Field builder New object Db window

Field Modeling Upon creation of a field, you will/can model the following main characteristics: Upon creation of a field, you will/can model the following main characteristics: – Field name: max of 64 characters in length (may include spaces). – Data type: Text, Number, AutoNumber, Date/Time, etc. – Description: optional description of the field for user memo. – Field Properties: set from the bottom pane of the Design View window. See below.

Data Type There are two main benefits in specifying data types in a project: There are two main benefits in specifying data types in a project: – Access will prevent from putting wrong data into a field. – Storage space will be used in a more efficient way. Main Data Types: Main Data Types: – Text: Default type, allows a max of 255 characters per record. – Number: Modeled with Field Size property (byte, integer, etc.). – AutoNumber: Automatically assigns a unique integer to the record upon creation; commonly used for primary keys. – Memo: Text type that stores up to 64,000 characters. – Date/Time: Several formats available. – OLE Object: An ‘Object Linking and Embedding’ object is a sound, picture, or other object such as a Word document or Excel spreadsheet to embed or link to the database project.

Data Format Format conforms field data to the same format when it is entered into the datasheet. Format conforms field data to the same format when it is entered into the datasheet. Below, Number Format conventions: Below, Number Format conventions: FormatEntryDisplayExplanation ###,## , is a placeholder that displays a digit or 0 if there is none. # is a placeholder that displays a digit or nothing if there is none. $###,##0.000$0.00 ###.00% % % multiplies the number by 100 and added a percent sign

Data Format (Cont’d) indicates required character or space & indicates optional character or space <HELLOhello < converts to lowercase >helloHELLO > converts to \ adds characters to the Data Data Entered"(blank)No Data Entered Below, Text and Memo Format conventions: Below, Text and Memo Format conventions:

Controlling Data Entry Input Masks: control value of a record and set it in a specific format. They are similar to the Format property, but instead display the format on the datasheet before the data is entered. Input Masks: control value of a record and set it in a specific format. They are similar to the Format property, but instead display the format on the datasheet before the data is entered. Example: Example: In a telephone number field TELNUM (data type Text or Number), the following input mask is specified: (999) Thus, upon entering this attribute in a record, the blank field would look like: (___) ___-____

Input Mask Symbols Symbol Description of Action 0 Digit (0-9, entry compulsory) 9 Digit or space (entry optional) # Digit or space (optional; blank positions appear as spaces) L Letter (A-Z compulsory) ? Letter (A-Z optional) A Letter or digit (compulsory) a Letter or digit (optional) & Any character or space (compulsory) C Any character or space (optional)., : ; - / Decimal point, thousands, date and time separators < All subsequent characters appear in lowercase > All subsequent characters appear in uppercase ! Causes input mask to display from right to left, reversing the default. Can be positioned anywhere in the mask. \ Subsequent character is displayed literally (I.e. \& appears as &)

Controlling Data Entry (Cont’d) Indexes: allows Access to query and sort records faster. Set a field that is commonly searched and change the Indexed property to Yes (Duplicates OK) if multiple entries of the same data value are allowed or Yes (No Duplicates) to prevent duplicates. Indexes: allows Access to query and sort records faster. Set a field that is commonly searched and change the Indexed property to Yes (Duplicates OK) if multiple entries of the same data value are allowed or Yes (No Duplicates) to prevent duplicates. Field Validation Rules: specify requirements (change word) for data entered. A customized message can be displayed when data violating the rule setting is entered. Examples: <> 0 to not allow zero values in the record, and ??? to only all data strings three characters in length. Field Validation Rules: specify requirements (change word) for data entered. A customized message can be displayed when data violating the rule setting is entered. Examples: <> 0 to not allow zero values in the record, and ??? to only all data strings three characters in length.

Queries Queries are usually developed for questions that are regularly asked about a data. Queries are usually developed for questions that are regularly asked about a data. The answer to a query is specifically displayed as an answer table, of which the collection of records is called a dynaset (short for Dynamic Subset). The answer to a query is specifically displayed as an answer table, of which the collection of records is called a dynaset (short for Dynamic Subset). Yet, we distinguish several types of queries: Yet, we distinguish several types of queries: – Select: Extract data from tables based on specified values. – Parameter: user specifies criteria on which to query. – Range: Select fields/records which contain a range of values. – Group By and Crosstab: displays summarized values in a grid form taking its rows and columns from chosen fields. – Action: change records in a table (Delete, Update and Append queries) or create new tables (Make-Table query).

Creating Queries in Design View Show Table: Choose table(s) upon which the query will be built. Show Table: Choose table(s) upon which the query will be built. Query Design Window: Query Design Window: – Table/Query Pane: displays table(s) of concern. – Query Design Pane: – Query Design Pane: grid of definition.

Creating Queries in Design View (cont’d) Before developing a query, you can specify its type in design view by clicking on the Query Type button on the toolbar. Before developing a query, you can specify its type in design view by clicking on the Query Type button on the toolbar. SQL: Structured Query Language was specifically developed to build complex queries. SQL: Structured Query Language was specifically developed to build complex queries. It is compiled to elementary relational algebra operations (like intersection, union, etc...), which makes it very efficient. It is compiled to elementary relational algebra operations (like intersection, union, etc...), which makes it very efficient. However it is seldom written in detail by the user, for most manipulations can be done on the query design pane. However it is seldom written in detail by the user, for most manipulations can be done on the query design pane.

SQL Generic syntax: Generic syntax: SELECT SELECT FROM FROM [INNER JOIN...] [WHERE ] [ORDER BY ]... The WHERE clause can contain all the logical operators you know, and more, like AND, OR, IN, LIKE, etc… The WHERE clause can contain all the logical operators you know, and more, like AND, OR, IN, LIKE, etc… The ORDER BY clause allows sorting of the data by fields (columns). The ORDER BY clause allows sorting of the data by fields (columns). The INNER JOIN clause allows union of two tables with a common column. The INNER JOIN clause allows union of two tables with a common column.

Forms Access Forms are similar to VB forms, but different in objectives: the main purpose of a form in Access is to manipulate data in and out of the database. Access Forms are similar to VB forms, but different in objectives: the main purpose of a form in Access is to manipulate data in and out of the database.

Forms (Cont’d) Most of the properties of the forms and controls are data-aware, and are designed specifically to display fields or tabular data. Most of the properties of the forms and controls are data-aware, and are designed specifically to display fields or tabular data. Data Binding is performed simply by setting the Record Source property of the form to the appropriate Table or Query. Data Binding is performed simply by setting the Record Source property of the form to the appropriate Table or Query. Each control can be data-bound by setting its Control Source property to the field it corresponds to. Each control can be data-bound by setting its Control Source property to the field it corresponds to. It is possible to include a linked sub form in a form, which is suitable for certain cases, and simplifies the process of data entry. It is possible to include a linked sub form in a form, which is suitable for certain cases, and simplifies the process of data entry.

What’s Next Your new best friend Your new best friend