Basic Database Design COSC 2328 – Web Programming.

Slides:



Advertisements
Similar presentations
Database Fundamentals
Advertisements

Logical Data Modeling Review Lecture for University of Agder, Grimstad DAT202 Databaser (5.5.11) Judith Molka-Danielsen
ACCESS PART 2. Objectives Database Tables Table Parts Key Field Query and Reports Import from Excel Link to Excel.
The Database Approach u Emphasizes the integration of data across the organization.
Mapping from E-R Model to Relational Model Yong Choi School of Business CSUB.
Normalization A337. A337 - Reed Smith2 Structure What is a database? ◦ Tables of information  Rows are referred to as records  Columns are referred.
Terms - data,information, file record, table, row, column, transaction, concurrency Concepts - data integrity, data redundancy, Type of databases – single-user,
N. J. Taylor Database Management Systems (DBMS) 1.
Chapter 4: Logical Database Design and the Relational Model (Part II)
Mapping from Data Model (ERD) to Relational Model Yong Choi School of Business CSUB.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Mapping from Data Model (ERD) to Relational Model
University of Manitoba Asper School of Business 3500 DBMS Bob Travica
1 A Guide to MySQL 2 Database Design Fundamentals.
Concepts of Relational Databases. Fundamental Concepts Relational data model – A data model representing data in the form of tables Relations – A 2-dimensional.
資料庫正規化 Database Normalization 取材自 AIS, 6 th edition By Gelinas et al.
SALINI SUDESH. Primarily a tool to validate and improve a logical design so that it satisfies certain constraints that avoid unnecessary duplication of.
ITN Table Normalization1 ITN 170 MySQL Database Programming Lecture 3 :Database Analysis and Design (III) Normalization.
Planning & Creating a Database By Ms. Naira Microsoft Access.
Advanced Data Modeling. Heterogeneous Mapping Heterogeneous Mapping is the ability of MSTR7 tools to join on unlike column names. Heterogeneous Mapping.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 5 (Part c): Logical Database Design and the Relational Model Modern Database Management.
* 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.
Connecting (relating) Data Tables to get Custom Records (Queries) Database Basics.
Howard Paul. Sequential Access Index Files and Data File Random Access.
Chapter 5 MODULE 6: Normalization © 2007 by Prentice Hall (Hoffer, Prescott & McFadden) 1 Prepared by: KIM GASTHIN M. CALIMQUIM.
Normalization ACSC 425 Database Management Systems.
Chapter 4 © 2013 Pearson Education, Inc. Publishing as Prentice Hall Chapter 4: Logical Database Design and the Relational Model Modern Database Management.
Lecture # 17 Chapter # 10 Normalization Database Systems.
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 4: PART C LOGICAL.
AOIT Database Design Unit 3, Lesson 9 Data Integrity Copyright © 2009–2011 National Academy Foundation. All rights reserved.
CompSci 280 S Introduction to Software Development
Order Database – ER Diagram
Fundamental Relational Database Design
Chapter 1 Introduction.
INLS 623 – Database Normalization
A Guide to SQL, Eighth Edition
Database, tables and normal forms
Revised: 2 April 2004 Fred Swartz
Order Database – ER Diagram
Get data properly tabled!
SEEM3430: Information Systems Analysis and Design
Normalization Karolina muszyńska
MIS2502: Data Analytics Relational Data Modeling
Modern Database Management Jeff Hoffer, Ramesh Venkataraman,
Database Normalization
INFM 603: Session 5 Introduction to Databases and Database Design
Database Management Systems (DBMS)
Order Database – ER Diagram
Order Database – ER Diagram
Design a Relational Database Identify Database Purpose
Example Question–Is this relation Well Structured? Student
Unit 4: Normalization of Relations
CTFS Asia Region Workshop 2014
Entity Relationships and Normalization
© 2011 Pearson Education, Inc. Publishing as Prentice Hall
Database Normalization & Entity Relationship Diagram
MIS2502: Data Analytics Converting ERDs to Schemas
Normalization A337.
Normalization and Databases
Order Database – ER Diagram
Databases & Consistency
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
DATABASE SYSTEM.
Order Database – ER Diagram
The Relational Database Model
Relational Databases.
DBMS ER-Relational Mapping
Chapter 14 Normalization Pearson Education © 2009.
MIS2502: Data Analytics Relational Data Modeling 3
Presentation transcript:

Basic Database Design COSC 2328 – Web Programming

The Design Process Determine the purpose of the database Organize the information / divide the information into tables Turn information into columns Specify primary keys Setup table relationships Apply normalization rules

What is “Normalization” Organizing the columns (attributes) and tables (relations) of a relational database Why? Reduce data redundancy Reduce storage requirements Improve data dependencies

3 Normal Forms No repeating elements or groups of elements No partial dependencies on a concatenated key No dependencies on non-key attributes

Invoices

Tracking In A Spreadsheet How many 56” Blue Freens were sold in 2002? What was the total sales of 3” Red Freens came from Washington DC in 2016?

Filling In The Data Oops – Now we have repeating elements

Creating A Composite Key If we identify a primary key as the Invoice Number and Item ID, we get a unique key. There is no single column that identifies each row, but if we put the two columns together we now have a unique key.

No Partial Dependencies Each column in the table that is not part of the primary key must depend on the entire concatenated key If any column only depends on one part of the key, then we say that the entire table fails second normal form Steps -- Take each column not part of the key. Can this column exist without one or the other part of the primary key? If ‘yes’ – even once – then the table fails Second Normal Form

Table Concepts Break-up the spreadsheet into multiple tables in a database Think about one-to-many and many-to-one relationships Determine which fields belong to which tables Use IDs to identify rows when necessary

Designing The Tables orders --------------------- orderId (PK) customerId (FK) orderDate orderItems --------------------- orderId (PK) (FK) itemId (PK) (FK) itemQuantity items -------------------- itemId (PK) itemDescription itemPrice 1 n n 1 n 1 customers --------------------- customerId (PK) customerName customerAddress customerCity customerState