WEEK 10 Database Design. Agenda – Week 10 Review Hybrid Review Table Instance Charts Primary Keys Normalization.

Slides:



Advertisements
Similar presentations
Chapter # 4 BIS Database Systems
Advertisements

Designing MS-Access Tables
Database Design Week 10.
ISMT221 Information Systems Analysis and Design Entity-Relationship Diagram Lab 4 Tony Tam.
Database A collection of related information stored on a computer and organized in a manner that allows access, retrieval, and use of that data.
© Steven Alter, 2007, all rights reserved Database concepts Difference between a database and the Internet Reason for having a defined data structure Relational.
Entity-Relationship Model and Diagrams (continued)
Week 2 Normalization and Queries
WELL-DESIGNED DATABASES Process faster Easy to develop and maintain Easy to read and write code.
Database Basics. Definitions Database Relational database Table Record Field Primary key.
Access Lecture 1 Database Overview and Creating Tables Create an Employee Table.
Data at the Core of the Enterprise. Objectives  Define of database systems  Introduce data modeling and SQL  Discuss emerging requirements of database.
Entity Relationships. Relationships Relationships exist between entities The type of relationship is entirely dependent on the business rules The business.
Data Types and Field Properties 5.01 Understand database tables used in business.
Data type – determines the type of data and range of values that can be entered in a field.
Database terms Mr. Brunton.
Practical tips for creating entity relationship diagrams (ERDs) Chitu Okoli Associate Professor in Business Technology Management John Molson School of.
The Relational Database Model
3 The Relational Model MIS 304 Winter Class Objectives That the relational database model takes a logical view of data That the relational model’s.
Microsoft Access 2000 Creating Tables and Relationships.
Tables. What is a Table? A part of a database Container for data Pieces of data, put together, have a meaning.
Learningcomputer.com SQL Server 2008 – Entity Relationships in a Database.
Relational DB Components
Database Design Sections 6 & 7 Second Normal Form (2NF), Unique Identifiers (UID), Third Normal Form (3NF), Arcs, Hierarchies and Recursive relationships.
Concepts and Terminology Introduction to Database.
 A database is a collection of data that is organized so that its contents can easily be accessed, managed, and updated. What is Database?
DATABASE DESIGN USING MICROSOFT ACCESS. What is a Database?  DMS Database management system  Database Collection of data organized in a manner that.
Designing a Database (Part I) -Identify all fields needed to produce the required information -Group related fields into tables -Determine Each Table’s.
DATABASE DESIGN.
WEEK 11 Database Design. TABLE INSTANCE CHARTS Create Tables.
G045 Lecture 09 ERD Diagrams (Entity Relationship Diagrams) Mr C Johnston ICT Teacher
WEEK 10 Database Design. Agenda – Week 10 Review Hybrid Review Primary Keys Table Instance Charts.
Organizing Data Revision: pages 8-10, 31 Chapter 3.
XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Preparing To Automate Data Management Chapter 1 “You.
Relational Database. Database Management System (DBMS)
Using Microsoft Access 56:150 Information System Design.
1 Entity-Relationship Diagram. 2 Components of ERD: –Entity –Relationship –Cardinality –Attributes.
Slide Chapter 5 The Relational Data Model and Relational Database Constraints.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
1 Database & DBMS The data that goes into transaction processing systems (TPS), also goes to a database to be stored and processed later by decision support.
IE 423 – Design of Decision Support Systems Database development – Building Tables
Handling Many to Many Relationships. 2 Handling Many:Many Relationships Aims: To explain why M:M relationships cannot be implemented in relational database.
Relational Theory and Design
Database Design – Lecture 4 Conceptual Data Modeling.
Data Types and Field Properties 5.01 Understand database tables used in business.
Data Types and Field Properties continued… Understand database tables used in business.
Introduction to Access Chapter 13 pages 1-4. What is a database??? Related information is stored in databases  All SC student information is stored in.
1 DATABASE TECHNOLOGIES (Part 2) BUS Abdou Illia, Fall 2015 (September 9, 2015)
Mr C Johnston ICT Teacher
Database design Using Access 2007
* Database is a group of related objects * Objects can be Tables, Forms, Queries or Reports * All data reside in Tables * A Row in a Table is a record.
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
Chapter 3 The Relational Database Model. Database Systems, 10th Edition 2 * Relational model * View data logically rather than physically * Table * Structural.
Howard Paul. Sequential Access Index Files and Data File Random Access.
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.
Microsoft Access CS 110 Fall Entity Relationship Model Entities Entities Principal data object about which information is to be collectedPrincipal.
Notes: **A Row is considered one Record. **A Column is a Field. A Database is…  an organized set of stored information usually on one topic  a collection.
1 Database Design Sections 6 & 7 First Normal Form (1NF), Second Normal Form (2NF), Unique Identifiers (UID), Third Normal Form (3NF), Arcs, Hierarchies.
2b. Create an Access Database Lingma Acheson Department of Computer and Information Science IUPUI CSCI N207 Data Analysis with Spreadsheets 1.
Databases Chapter 9 Asfia Rahman.
Entity-Relationship Model and Diagrams (continued)
Access Lesson 2 Creating a Database
MIS2502: Data Analytics Relational Data Modeling
ICT Database Lesson 2 Designing a Database.
MIS2502: Data Analytics Relational Data Modeling 2
More to Learn Different data types
Database Design Week 12.
Lecture 2 Lecturer: awdang aziz MS access
Presentation transcript:

WEEK 10 Database Design

Agenda – Week 10 Review Hybrid Review Table Instance Charts Primary Keys Normalization

Database Design Steps Review Determine the purpose of the database Determine the entities Determine the fields & keys Determine the relationships Refine the design This is an iterative process that is completed several times

Review Entities are…. Attributes are…. Primary key is….. Foreign key is …… Information is accessed according to its structure, not its location Use keys to identify relationships

Planning the Design ERD – ◦ Serves as a blueprint for implementation ◦ Reduces problems resulting from poor design ◦ Determines how data is stored ◦ Ensures that the design meets the user’s needs

Review Solution to Hybrid Homework

TABLE INSTANCE CHARTS

Table Instance Chart Sample One chart completed for each table ◦ Wk10_TableInstanceChart.xlsx Wk10_TableInstanceChart.xlsx

Exercise Create table instance chart for: ◦ the puzzle (together)

TYPES OF DATA

Common Data Types in Access Autonumber Text Memo Number Currency Date/Time Yes/No

Autonumber Use for unique sequential numbering Commonly used for PK Increments by 1 Automatically inserted when a record is added.

Text Used for text or combinations of text and numbers, such as addresses, or for numbers that do not require calculations, such as phone numbers, part numbers, or postal codes. Stores up to 255 characters.

Memo Use for lengthy text and numbers, such as notes or descriptions. Should be used sparingly Stores up to 65,536 characters (if not more)

Number Use for data to be included in mathematical calculations, except calculations involving money (use Currency type).

Yes/No Use for data that can be only one of two possible values, such as ◦ Yes/No, ◦ True/False, ◦ On/Off. Null values are not allowed

Exercise Create table instance chart for: ◦ Wine Database ◦ Curling Bonspiel scenario

RELATIONSHIPS

Three Basic Types of Relationships One to One (1:1) One to Many (1:M) Many to Many (M:M) Called the cardinality of the relationship ◦ The cardinality indicates the maximum number of relationships between the entities, therefore "many" can be explained as "one or many" or sometimes "zero, one, or many".

One to One Relationships 1:1 relationships exists when a single record in one table has 1 and only 1 corresponding record in another table, and vice versa

One to One Example A voter can cast only one vote in an election. A ballot paper can belong to only one voter. So there will be a 1:1 relationship between a Voter and a Ballot Paper. Voter Ballot

One to Many Relationships Most common 1:m or m:1 Relationship exists when a record can relate to 1 or more records in a second table but.. A record in the 2 nd table can only relate to 1 record in the first table

One to Many Example A person can own more than one car. A car can only have one owner. OwnerVehicle

Many to Many Relationships M:M Relationship exists when a record in either table can relate to more than one record in the other table

Many to Many Example A student can have more than one professor; the same professor can have many students StudentProfessor

Resolving Many to Many M:M is not allowed We create a junction or joiner entity The name of the joiner entity is often a combination of the 2 entities StudentProfessorStud_Prof

Many to Many Relationships

Relationship Review

Normalization Refining the ERD Task of analyzing entities and the relationships created have been formalized into a process called normalization.

Exercise: ERD & Relationships Draw an ERD for the puzzle ◦ Describe the relationships using the following format Source Entity Destination Table Relationship Type Describe the relationship in your own words CustomerMovie Rental customer MovieMovie Rental Movie

Exercise: ERD & Relationships Draw an ERD for the wine scenario ◦ Describe the relationships using the following format ◦ Describe the relationships in the curling bonspiel Source Entity Destination Table Relationship Type Describe the relationship in your own words

Review Relationship Essentials Need a primary key Need a foreign key ◦ A foreign key is a column in a table used to reference a primary key in another table. Not all tables will require a foreign key Primary key and foreign keys are essential when you create relationships that join together multiple tables in a database

Build Time For each of the following scenarios: ◦ Create and write out a business narrative ◦ Create list of tables ◦ Create the attributes for the table ◦ Create a simple ERD and the relationship rules ◦ Create a table instance chart

Scenarios Political Canvassing Human Resource Dept. Private Elementary School Yoga Studio *** note each database should be around 5 tables

Access DB Create a database Create tables Build relationships Populate tables

Hybrid / Homework Hybrid: Refer to the 14 Week schedule Database Assignment Part 1

Quiz Time