Computer Science & Engineering 2111 Introduction to Database Systems 1CSE 2111-Introduction to Database Systems.

Slides:



Advertisements
Similar presentations
The Ribbon Standard to all Office 2007 applications Organized by feature and functionality Navigation Pane Access to all objects in the current database.
Advertisements

3/5/2009Computer systems1 Analyzing System Using Data Dictionaries Computer System: 1. Data Dictionary 2. Data Dictionary Categories 3. Creating Data Dictionary.
Maintenance Modifying the data –Add records –Delete records –Update records Modifying the design –Add fields into tables –Remove fields from a table –Change.
Database A collection of related information stored on a computer and organized in a manner that allows access, retrieval, and use of that data.
The Relational Database Model:
Introduction to Databases CIS 5.2. Where would you find info about yourself stored in a computer? College Physician’s office Library Grocery Store Dentist’s.
Table design screen Field name Data type Field size Other properties.
Database Design Concepts INFO1408 Term 2 week 1 Data validation and Referential integrity.
Concepts of Database Management Seventh Edition Chapter 1 Introduction to Database Management.
IMS1907 Database Systems Summer Semester 2004/2005 Lecture 2 Relational DBMS Software An Overview of Microsoft Access.
Computer Science & Engineering 2111 Introduction to Database Management Systems Relationships and Database Creation 1 CSE 2111 Introduction to Database.
Database terms Mr. Brunton.
Microsoft Access Database software. What is a database? … a database is an organized collection of data. A collection of data of similar information compiled.
DATA, DATABASES, AND QUERIES Managing Data in Relational Databases CS1100Microsoft Access - Introduction1.
Introduction to Database Systems
Page 1 ISMT E-120 Desktop Applications for Managers Introduction to Microsoft Access.
Computer Science & Engineering 2111 Introduction to Database Systems 1CSE 2111 Introduction to Database Systems.
ACCESS CHAPTER 1. OBJECTIVES Tables Queries Forms Reports Primary and Foreign Keys Relationship.
Your Tour Guide is Jim Provensal. What We Will Cover s Introduction to MicroSoft Access u What is a database u What is a “Relational” Database s The Major.
Microsoft Access 2000 Creating Tables and Relationships.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 1 1. Chapter 2: Relational Databases and Multi-Table Queries Exploring Microsoft Office.
Primary & Foreign Keys. PK & FK 1.Primary key is required 2.The PK must be unique 3.If the primary key from one table is related to a field in another.
Copyright © 2003 by Prentice Hall Module 4 Database Management Systems 1.What is a database? Data hierarchy and data organization Field, record, file,
1 Chapter 1: Finding Your Way Through a Database Exploring Microsoft Office Access 2010.
Access 2007 Database Application Managing Business Information Effectively BCIS 1 and 2.
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
Microsoft Access 2003 Define some key Access terminology: Field – A single characteristic or attribute of a person, place, object, event, or idea. Record.
1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Access 2010 by Robert Grauer, Keith Mast, Mary Anne Poatsy Chapter.
Management Information Systems MS Access MS Access is an application software that facilitates us to create Database Management Systems (DBMS)
Relational Databases (MS Access)
DAY 12: DATABASE CONCEPT Tazin Afrin September 26,
Computer Science & Engineering 2111 Lecture 11 Querying a Database 1.
Information Systems & Databases 2.2) Organisation methods.
Access Chapter 2: Relational Database Objectives Design data Create tables Understand table relationships Understand data types, key, & field properties.
Introduction to Computers Lesson 10B. home Database A collection of related data or facts.
Introduction to Computers Lesson 10B. home Database A collection of related data or facts.
MS Access 2007 Management Information Systems 1. Overview 2  What is MS Access?  Access Terminology  Access Window  Database Window  Create New Database.
M1G Introduction to Database Development 2. Creating a Database.
Computer Science & Engineering 2111 Lecture 10 Introduction to Database Management Systems 1.
Access Project 3 Notes. Introduction Maintaining the Database  Modifying the data to keep it up-to-date Restructure the Database  To change the database.
Using Microsoft Access 56:150 Information System Design.
Computer Science & Engineering 2111 Querying a Database 1CSE 2111 Lecture- Querying a Database.
1 Chapter 1: Finding Your Way Through a Database Exploring Microsoft Office Access 2007.
Microsoft Access 2000 Presentation 1 The Basics of Access.
DAY 14: MICROSOFT ACCESS – CHAPTER 1 Madhuri Siddula October 1, 2015.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-1 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining.
Introduction to Database using Microsoft Access 2013 Part 7 November 19, 2014.
ITGS Databases.
Databases & Access Today’s Topic: Databases Define: Database Software Examine the different uses of database software Define the four components.
Maintaining a Database Access Project 3. 2 What is Database Maintenance ?  Maintaining a database means modifying the data to keep it up-to-date. This.
1 CSE 2337 Introduction to Data Management Access Book – Ch 1.
IBS 520 Introduction to Internet Technology Database Fundamentals Week 4.
DAY 15: ACCESS CHAPTER 1 Rahul Kavi October 6,
You can sort Access data so you can view records in the order you want to view them, and you can filter data so you only see the records you want to see.
Access Chapter 1: Intro to Access Objectives Navigate among objects in Access database Difference between working in storage and memory Good database file.
Access Lessons 1, 2 and 3 ©2009 M and K Solutions, LLC – All Rights Reserved.
INTRODUCTION TO DATABASES USING MICROSOFT ACCESS Basic Database Terms Create A Database Creating Table Fields Populating a Table Modifying Data Create.
Computer Science & Engineering 2111 Database Objects 1 CSE 2111 Introduction to Database Management Systems.
VOCAB REVIEW. A field that can be computed from other fields Calculated field Click for the answer Next Question.
Access Lessons 1, 2 and 3 ©2009 M and K Solutions, LLC – All Rights Reserved.
Database Presentation BIM, Mrs. Bailey. **Database Notes** Use new sheet of paper! Microsoft Access - known as a database management system or DBMS Database.
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
Introduction to Database Systems
Prepared By: Bobby Wan Microsoft Access Prepared By: Bobby Wan
Tables & Relationships
Introduction to Database Systems
CIS 155 Table Relationship
Hierarchy of Data in a Database
Introduction to Database Systems
Database Management  .
Presentation transcript:

Computer Science & Engineering 2111 Introduction to Database Systems 1CSE 2111-Introduction to Database Systems

Database Terms – Data A collection of numbers and text – – Information Meaning derived from the data – SSN: CSE 2111-Introduction to Database Systems2

What is a database? A large collection of data stored in a well-defined structure – You can think of a database as An electronic filing system A repository for large amounts of information – Example of a paper database Telephone book Examples of computer databases – Ohio State stores student information in a database – Insurance companies store policy holder information in a database – Your employer stores your information in a database CSE 2111-Introduction to Database Systems3

Database Software How do I create a database? – Purchase the software We will use MS Access 2010, but there are many database software products – Oracle – Sybase – SQL Server How do I access information in the database? – Purchase a Database Management System (DBMS) A DBMS is a collection of programs that enable you to enter, organize, and select data in a database. – We will use MS Access 2010, but there are many database management softwareproducts CSE 2111-Introduction to Database Systems4

The design should be initially created schematically, and then the database should be created using the chosen database software Steps when setting up a Database CSE 2111-Introduction to Database Systems5

1. Decide what information you will store in the database Research Papers database First NameCharge Amount Last NameCharge Date AddressPayment Amount CityPayment Type StatePayment Date Zip Code Home Phone This database is a very simplistic one. Most databases you create will be much more complex. CSE 2111-Introduction to Database Systems6

2. Create the layout of the database What tables do you need in your database? What is a table? – An entity used to organize information by categories of like information CSE 2111-Introduction to Database Systems7

Research Papers Database Tables CSE 2111-Introduction to Database Systems8 Client Stores client information Charges Stores client charges information Payments Stores client payment information PaymentMethod Stores the payment method Credit Card Cash Check

2. Create the layout of the database What fields do you need in your database? What is a field? – An attribute (piece of information) of the table/entity. How will you set them up? – Divide Tables into Inseparable Fields Address as 1 field – 17 Main St. New York, New York Address as 4 fields Street Address - 17 Main St. City - New York State - New York Zip code – CSE 2111-Introduction to Database Systems9

Research Papers Database Table Name: Client Fields:Client ID First Name Last Name Address City State Zip Code Home Phone Table Name: Charges Fields:Client ID Charge Amount Charge Date Table Name: Payments Fields:Client ID Payment Amount Payment Type Payment Date Table Name: PaymentMethod Fields:MethodID MethodType CSE 2111-Introduction to Database Systems10

2. Create the layout of the database Fields contain field types/data types and field properties What is a field Type/Data Type? – Defines the type of information that can be stored. i.e. text, numbers, dates, etc. What is a field Property? – Field size – Input Mask – Validity – Default Value CSE 2111-Introduction to Database Systems11

Research Papers Database Table Name: Client Field Type/ Data Type Properties Fields:Client IDText5 Characters longPrimary Key First NameText25 Characters long Last NameText50 Characters long AddressText60 Characters long CityText25 Characters long StateText2 Characters longDefault Value Zip CodeText5 Characters long Home PhoneText10 Characters longInput Mask Table Name: Charges Field TypeProperties Fields:Client IDText5 Characters long Charge AmountCurrencyNone Charge DateDateInput Mast Table Name: Payments Field TypeProperties Fields:Client IDText5 Characters long Payment AmountCurrencyNone Payment TypeText2 Characters long Payment DateDateInput Mask Table Name: PaymentMethod Field TypeProperties Fields:MethodIDText2 Characters long MethodTypeText20 Characters long CSE 2111-Introduction to Database Systems12

2. Create the layout of the database What will be the primary key for each table? A field, or a collection of fields, whose values uniquely identify each record in a table CSE 2111-Introduction to Database Systems13

Research Papers Database Table Name: Client Field Type/ Data Type Properties Fields:Client IDText5 Characters longPrimary Key First NameText25 Characters long Last NameText50 Characters long AddressText60 Characters long CityText25 Characters long StateText2 Characters longDefault Value Zip CodeText5 Characters long Home PhoneText10 Characters longInput Mask Table Name: Charges Field TypeProperties Fields:Client IDText5 Characters long Charge AmountCurrencyNone Charge DateDateInput Mast Table Name: Payments Field TypeProperties Fields:Client IDText5 Characters long Payment AmountCurrencyNone Payment TypeText2 Characters long Payment DateDateInput Mask Table Name: PaymentMethod Field TypeProperties Fields:MethodIDText2 Characters long MethodTypeText20 Characters long CSE 2111-Introduction to Database Systems14

File Table Primary Key Each Record is made up of 8 Fields Data Type/Field Type Field Properties A field, or combination of fields, which uniquely identifies a record in a database Primary Key CSE 2111-Introduction to Database Systems15

How is a database Organized? (Hierarchy of Data in a database) Table Each Record is made up of 8 Fields File 16 Records CSE 2111-Introduction to Database Systems16

Steps when setting up a Database 1.Decide what information you will store in the database 2.Create the layout of the database CSE 2111-Introduction to Database Management Systems 17

3. Create a relationship diagram to identify the table relationships, primary keys and foreign keys We know the information we want to store, but how do we match a customer’s name to their charges and payments? We need a way to relate these two tables to extract useful information. We can relate these two tables by matching the Client ID Foreign key A field that defines the relationship between 2 tables Relationship Rules Must be a primary key (unique) in at least one of the tables The field names on each table do not have to match as long as the information is the same. The related fields must be the same data type – number, text etc. CSE 2111-Introduction to Database Management Systems 18

Table Name: Client Primary Key: ClientID Table Name: Charges Primary Key: None Foreign Key: ClientID On Charges table Foreign Key: ClientID On Payments table Table Name: MethodTypes Primary Key: MethodID Foreign Key: PaymentType On Payments table RELATIONSHIP DIAGRAM FOR RESEARCH PAPERS DATABASE ∞ ∞ ∞ CSE 2111-Introduction to Database Management Systems 19 Table Name: Payments Primary Key: None

4. Create the database using the database software Create tables – Fields – Primary keys – Field Types – Field Properties Create Relationships – “ Join” tables – Enforce Referential Data Integrity A set of rules that specifies what records may exist in each table – A record input with a foreign key must always have a matching record in the primary key table in the relationship Cascade Delete Related Records – Removing any entry in a primary key field will automatically remove all entries in foreign key fields of related tables. Cascade Update Related Records – Updating any entry in a primary key field will automatically update all entries in foreign key fields of related tables. Input the information CSE 2111-Introduction to Database Management Systems 20

Once Relationships are established you can gather information from one or more tables to answer questions Create a list of account numbers and owner names and total transactions What are the total deposits made by accounts starting with 5? What is the total balance of all accounts held by Jane Doe ? These requests are known as Queries CSE 2111-Introduction to Database Management Systems 21

l Tables - a list of data organized into fields and records l Queries - question structures to sort, filter and select specific information l Forms - structures for screen views of data l Reports - structures for written output of data l Program Modules & Macros - program code to perform specific actions Access DBMS “objects”: CSE Introduction to Database Management Systems 22

What is a database Form? Structures for screen view and input of information Used to simplify viewing and inputting of information Datasheet View Form View CSE Introduction to Database Management Systems 23

Structures for viewing written output of information What is a database Report? CSE Introduction to Database Management Systems 24

Defining Properties for each Field in a Table For a person’s social security number use: What field type? – Text, Number - Short Integer, Number- Long Integer etc. Should it be optional or required? Does the value need to be within certain limits or from a predefined list? Is there a default value? Would an input mask be appropriate CSE Introduction to Database Management Systems 25

How should you decide what information goes on which table? If a fact appears in more than one record of a table, then this fact should probably be defined in another table. – Example: Account number Each fact should change in only one place – Example: Address Calculations shouldn’t be part of the database – Example: Current Balance Select a Primary Key where applicable so you can relate your tables – Example: Account number CSE Introduction to Database Management Systems 26