24 GOLDEN COINS, 1 IS FAKE ( WEIGHS LESS). DATABASE CONCEPTS Ahmad, Mohammad J. CS 101.

Slides:



Advertisements
Similar presentations
Microsoft® Access® 2010 Training
Advertisements

Organisation Of Data (1) Database Theory
Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
MICROSOFT OFFICE ACCESS 2007.
Maintenance Modifying the data –Add records –Delete records –Update records Modifying the design –Add fields into tables –Remove fields from a table –Change.
ISP 121 Week 1 Introduction to Databases. ISP 121, Winter Why a database and not a spreadsheet? You have too many separate files or too much data.
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.
Accounting Databases Chapter 2 The Crossroads of Accounting & IT
FIRST COURSE Access Tutorial 2 Building a Database and Defining Table Relationships.
Access Lecture 1 Database Overview and Creating Tables Create an Employee Table.
Management Information Systems MS Access 2003 By: Mr. Imdadullah Lecturer, Department of M.I.S. College of Business Administration, KSU.
Database Constraints. Database constraints are restrictions on the contents of the database or on database operations Database constraints provide a way.
MS Access 2007 IT User Services - University of Delaware.
MELISSA PICO SUMMER 08 Data Storage & Retrieval: Access instead of Excel.
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.
Microsoft Access Database software. What is a database? … a database is an organized collection of data. A collection of data of similar information compiled.
Page 1 ISMT E-120 Desktop Applications for Managers Introduction to Microsoft Access.
Relational Database Need to Knows. What is a database? Data - is just a pile of numbers or stats. A business "organises" the data to be meaningful and.
ACCESS CHAPTER 1. OBJECTIVES Tables Queries Forms Reports Primary and Foreign Keys Relationship.
1 DATABASE TECHNOLOGIES BUS Abdou Illia, Fall 2007 (Week 3, Tuesday 9/4/2007)
1 Microsoft Access 2002 Tutorial 3 – Querying a Database.
Unit 18: Database Modelling
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.
ASP.NET Programming with C# and SQL Server First Edition
LSP 121 Week 1 Intro to Databases. Welcome to LSP 121 Quantitative Reasoning and Technological Literacy II Continuation of quantitative data concepts.
Concepts of Database Management, Fifth Edition Chapter 1: Introduction to Database Management.
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
Relational Database Concepts. Let’s start with a simple example of a database application Assume that you want to keep track of your clients’ names, addresses,
Introduction to database systems
DAY 14: ACCESS CHAPTER 1 Tazin Afrin October 03,
Chapter 4 The Relational Model 3: Advanced Topics Concepts of Database Management Seventh Edition.
Microsoft Access 2003 Define some key Access terminology: Field – A single characteristic or attribute of a person, place, object, event, or idea. Record.
Microsoft ® Office Access ® 2007 Training Build a database I: Design tables for a new Access database ICT Staff Development presents:
Management Information Systems MS Access MS Access is an application software that facilitates us to create Database Management Systems (DBMS)
XP New Perspectives on Microsoft Office Access 2003 Tutorial 9 1 Microsoft Office Access 2003 Tutorial 9 – Using Action Queries, and Defining Table Relationships.
© 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 9 – Building Links,
DAY 12: DATABASE CONCEPT Tazin Afrin September 26,
1 n 1 n 1 1 n n Schema for part of a business application relational database.
CS 101 – Access notes Databases (Microsoft Access) 4 parts of a database database design –Try to understand the ideas behind database design, not just.
Chapter 17 Creating a Database.
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.
Microsoft Access Designing and creating tables and populating data.
Microsoft Access Intro Class 6 Relationships.
Slide Chapter 5 The Relational Data Model and Relational Database Constraints.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
DAY 14: MICROSOFT ACCESS – CHAPTER 1 Madhuri Siddula October 1, 2015.
Database collection of related information stored in an organized form Database program software tool for storage & retrieval of that information.
Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
ITGS Databases.
McGraw-Hill/Irwin © The McGraw-Hill Companies, All Rights Reserved TECHNOLOGY PLUG-IN T6 Basic Skills Using Access.
Database revision.
Database Management Systems (DBMS)
Lesson 2: Designing a Database and Creating Tables.
CS 101 – Nov. 11 Finish Database concepts –1-1 relationship –1-many relationship –Many-to-many relationship Review.
Microsoft Office 2013 Try It! Chapter 4 Storing Data in Access.
DAY 14: ACCESS CHAPTER 1 RAHUL KAVI October 8,
Course Contents Overview: Database basics Lesson 1: Benefits of using a database Lesson 2: Table that data Lesson 3: Analyzing, viewing, and reporting.
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
New Perspectives on Microsoft Access 2016
and Defining Table Relationships
Applied CyberInfrastructure Concepts Fall 2017
What is a Database and Why Use One?
Advanced Database Concepts: Reports & Views
Spreadsheets, Modelling & Databases
Introduction to Access
Fordham Connect Train-the-Trainer Training Reports
Presentation transcript:

24 GOLDEN COINS, 1 IS FAKE ( WEIGHS LESS)

DATABASE CONCEPTS Ahmad, Mohammad J. CS 101

3 Graphicsheat.com

WHY DO DATABASES MATTER TO YOU? Among non-CS people, database skills are rare A healthy understanding of databases makes you marketable Almost every business has a database of some sort – and someone has to manage it! You could be selected to be trained by your company to manage a database someday! 4

IN THE BEGINNING Pre-1970, databases were flat We have essentially worked with “flat” databases: –Tab Delimited –CSV These databases were just text files (.txt) 5

THE PROBLEM? Lname, FName, Age, Salary|Smith, John, 35, $280|Doe, Jane, 28, $325|Brown, Scott, 41, $265|Howard, Shemp, 48, $359|Taylor, Tom, 22, $250 A text file database, like above, is difficult to search though and find specific information 6

AND THEN THERE WAS LIGHT Relational databases were created in 1970 IBM researcher, E.F. Codd, wrote a paper describing them Relational databases store information in tables –For visual purposes, think similar to Excel tables

RELATIONAL DATABASES ARE EVERYWHERE! Company Inventory Tracking 8 Schools Online Stores Social Networking Offline Stores Healthcare Record Keeping Internet

SAMPLE RDB 9

LET’S BACK UP… 10

FIELD The smallest data element contained in a table Field types: –Text –Numeric –Date Field examples: –Birthdates –Last Name –Age –Social Security # 11

RECORD Record – a complete set of all of the data elements (fields) about one person, place, event, or concept Example record in a course gradebook: –First Name, Last Name, Student ID, Age, 12

TABLE The foundation of every database Contains a primary key (unique field) Is a collection of related records –Example Table: All Student records in my CS 101 sections would be added to my Section Roster Table during registration 13

KEY A field that contains a unique identifier Foreign key –A field in one table, that is a primary key in another 14

DATABASE Consists of: – One or more tables to store data – One or more forms to enter data – One or more reports to output the table data as organized information 15

LET’S DEFINE A TABLE Let’s make a table for student information –What fields? –What data types? –How do we identify records? 16

RELATIONSHIPS “When two tables notice each other…” Access is a Relational Database Management System That being said it’s important that, over time, we learn to create relationships effectively. 17

RELATIONSHIP BASICS For now, let’s ignore how we actually make a relationship (it’s just drag and drop) Let’s examine some already created relationships and talk through them 18

SAMPLE RELATIONSHIPS 19

WHAT CHANGED?

WHY IS THIS NECESSARY?

RELATIONSHIP TYPES IDENTIFIED One-to-Many Many-to-Many*** One-to-One

MANY-TO-MANY? 23

A BRIEF NOTE ON MANY TO MANY “Think about a simple relationship like the one between Authors and Books. An author can write many books. A book could have many authors. Now, without a bridge table to resolve the many-to-many relationship, what would the alternative be? You'd have to add multiple Author_ID columns to the Books table, one for each author. But how many do you add? 2? 3? 10? However many you choose, you'll probably end up with a lot of sparse rows where many of the Author_ID values are NULL and there's a good chance that you'll run across a case where you need "just one more." So then you're either constantly modifying the schema to try to accommodate or you're imposing some artificial restriction ("no book can have more than 3 authors") to force things to fit.” -Joe Stefanelli on StackOverflow.com

REFERENTIAL INTEGRITY For relationships, you want to be able to be absolutely sure that they are valid. What if you had a business, and didn’t check that the people you wrote checks to were employees? 25

WHAT COULD HAPPEN? 26

CASCADE UPDATES / DELETES Cascading Updates (Good) –Typically, we will always cascade updates. Let’s assume we change the stock number of an item, all orders that referenced that stock number would automatically update (for record keeping information). Cascades Deletes (Bad.. Well, generally) –Let’s assume an employee is working on some big projects. The HR department accidentally removes the employee… every project in the database, that refers to the deleted employee, will be deleted. 27

SPREADSHEET VS DATABASES MS Excel Only need one worksheet to manage data Have mostly numeric data (i.e. expense reports) Require subtotals and totals in your worksheet Want to run a series of “What-If” Scenarios Need to create complex charts or graphs MS Access Require multiple related tables to store data Have a large amount of data Need to connect to and send/receive data to/from external databases Need to group, sort, and total data based on various parameters Have an application that requires multiple users to connect to one data source at once 28