Data Driven Designs 99% of enterprise applications operate on database data or at least interface databases. Most common DBMS are Microsoft SQL Server,

Slides:



Advertisements
Similar presentations
DB glossary (focus on typical SQL RDBMS, not XQuery or SPARQL)
Advertisements

Keys, Referential Integrity and PHP One to Many on the Web.
Database Management System Module 3:. Complex Constraints In this we specify complex integrity constraints included in SQL. It relates to integrity constraints.
Fundamentals, Design, and Implementation, 9/e COS 346 Day 8.
Fundamentals, Design, and Implementation, 9/e Chapter 5 Database Design.
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
RELATIONSHIP  THE WAY TABLES ARE RELATED  A TABLE MUST PARTICIPATE IN AT LEAST ONE RELATIONSHIP  IN A BINARY RELATIONSHIP TWO ENTITIES PARTICIPATE 
Fundamentals, Design, and Implementation, 9/e Chapter 7 Using SQL in Applications.
Concepts of Database Management Sixth Edition
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
A Guide to SQL, Seventh Edition. Objectives Understand, create, and drop views Recognize the benefits of using views Grant and revoke user’s database.
1 Chapter 2 Reviewing Tables and Queries. 2 Chapter Objectives Identify the steps required to develop an Access application Specify the characteristics.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
DAT702.  Standard Query Language  Ability to access and manipulate databases ◦ Retrieve data ◦ Insert, delete, update records ◦ Create and set permissions.
Transforming Data Models into Database Designs
Chapter 9: Creating Database Conventions & Standards MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design Study Guide (70-443)
Chapter 14 & 15 Conceptual & Logical Database Design Methodology
Phil Brewster  One of the first steps – identify the proper data types  Decide how data (in columns) should be stored and used.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 13 Managing Databases with SQL Server 2000.
Chapter 6: Integrity and Security Thomas Nikl 19 October, 2004 CS157B.
Database Lecture # 1 By Ubaid Ullah.
Chapter 9 SQL and RDBMS Part C. SQL Copyright 2005 Radian Publishing Co.
ASP.NET Programming with C# and SQL Server First Edition
Chapters 17 & 18 Physical Database Design Methodology.
Web Application Development. Tools to create a simple web- editable database QSEE MySQL (or PHPMyAdmin) PHP TableEditor.
DataBase Testing. Objectives What is DB Testing ? Testing at the Data Access Layer Scope of DB Testing Need for Testing DB Objects Common Problems that.
IFS180 Intro. to Data Management Chapter 9 – Outer Joins.
Chapter 4 The Relational Model 3: Advanced Topics Concepts of Database Management Seventh Edition.
Databases in Visual Studio. Database in VisualStudio An MS SQL database are built in Visual studio The Name can be something like ”(localdb)\Projects”
Database Technical Session By: Prof. Adarsh Patel.
Physical Database Design Chapter 6. Physical Design and implementation 1.Translate global logical data model for target DBMS  1.1Design base relations.
10 May Microsoft Access 2010 Relational databases’ program Part of the Microsoft Office package Administer relational database Update database through.
Constraints  Constraints are used to enforce rules at table level.  Constraints prevent the deletion of a table if there is dependencies.  The following.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Lecture 7 Integrity & Veracity UFCE8K-15-M: Data Management.
SQL Server 7.0 Maintaining Referential Integrity.
RDBMSSection Relational DBMS DATABASE DEVELOPMENT And Franchise Colleges By MANSHA NAWAZ.
DAY 12: DATABASE CONCEPT Tazin Afrin September 26,
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
FEN Introduction to the database field:  The Relational Model Seminar: Introduction to relational databases.
DAY 14: MICROSOFT ACCESS – CHAPTER 1 Madhuri Siddula October 1, 2015.
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.
Commercial RDBMSs Access and Oracle. Access DBMS Architchecture  Can be used as a standalone system on a single PC: -JET Engine -Microsoft Data Engine.
Fall 2001Database Systems1 Triggers Assertions –Assertions describe rules that should hold for a given database. –An assertion is checked anytime a table.
Chapter 13 Designing Databases Systems Analysis and Design Kendall & Kendall Sixth Edition.
Course FAQ’s I do not have any knowledge on SQL concepts or Database Testing. Will this course helps me to get through all the concepts? What kind of.
Constraints cis 407 Types of Constraints & Naming Key Constraints Unique Constraints Check Constraints Default Constraints Misc Rules and Defaults Triggers.
Oracle 11g: SQL Chapter 4 Constraints.
Chapter 4 Constraints Oracle 10g: SQL. Oracle 10g: SQL 2 Objectives Explain the purpose of constraints in a table Distinguish among PRIMARY KEY, FOREIGN.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
06 | Modifying Data in SQL Server Brian Alderman | MCT, CEO / Founder of MicroTechPoint Tobias Ternstrom | Microsoft SQL Server Program Manager.
Visual Programing SQL Overview Section 1.
Central Arizona Phoenix LTER Center for Environmental Studies Arizona State University Database Design Peter McCartney (CAP) RDIFS Training Workshop Sevilleta.
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
Constraints Lesson 8. Skills Matrix Constraints Domain Integrity: A domain refers to a column in a table. Domain integrity includes data types, rules,
Chapter 5 : Integrity And Security  Domain Constraints  Referential Integrity  Security  Triggers  Authorization  Authorization in SQL  Views 
Session 1 Module 1: Introduction to Data Integrity
Chapter 3: Relational Databases
1 CS 430 Database Theory Winter 2005 Lecture 7: Designing a Database Logical Level.
uses of DB systems DB environment DB structure Codd’s rules current common RDBMs implementations.
 What is DB Testing ?  Testing at the Data Access Layer  Need for Testing DB Objects  Common Problems that affect the Application  Should Testers.
XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 2 Objectives: Understanding and Creating Table.
Data Integrity & Indexes / Session 1/ 1 of 37 Session 1 Module 1: Introduction to Data Integrity Module 2: Introduction to Indexes.
Getting started with Accurately Storing Data
Chapter 5 Database Design
Chapter 6 - Database Implementation and Use
COS 346 Day 8.
Chapter 7 Using SQL in Applications
Chapter 11 Managing Databases with SQL Server 2000
Presentation transcript:

Data Driven Designs 99% of enterprise applications operate on database data or at least interface databases. Most common DBMS are Microsoft SQL Server, Oracle, MySQL. Most development environments (including Visual Studio) support database integration and / or interface with data modeling tools. Tight and accurate data model is essential for a good data-driven design. Data modeler / data analyst and DBA has to be on the development team. Database server is required for the application development and deployment. Application load may become an issue due to database server licensing limitations.

Database Diagrams

Foreign Key Relation One-to-one relation +o----+ Zero/one-to-one relation +o---+o< One-to-zero/many relation +o----+o< Zero/one-to-zero/many relation AllFusion® Erwin® is a popular data modeling tool

Foreign Key Relation SQL Server Foreign Key Relation Diagram

Foreign Key Constraints Linked to foreign primary key / key values. Primary key values should never change. Must be enforced to preserve data integrity. Prevent orphaned child records. Prevent childless parent records. Can be enforced via cascade delete / cascade update mechanism.

Data Constraints Useful for limiting the range of column values. Must use! Example: Grade IN ('A','B','C','D','F')

Indexes Greatly improve query performance especially when joining tables and sorting.

Stored Procedures Data manipulation code stored in the database. Stored procedures can result in select queries, update or insert operations or any other non-trivial data manipulation / calculation. Many believe that it is not a good idea to encode business rules into a database hence stored procedures should never be used or at least should be minimized.

Triggers Triggers are stored procedures that are executed based on specific events. For instance you can define for a particular table a trigger, which would be fired when a row is in that table is inserted, deleted or updated. Triggers are notoriously hard to see and hard to remember. They cause numerous problems when used excessively.

General Data Design Rules 1.Store as little data as possible. 2.Create as tight as possible of a database structure preserving and controlling data integrity in the strictest possible way. -Enforce foreign key constraints -Enforce data constraints -Use NOT NULL attributes

Specific Data Design Rules 1.Avoid Duplication by Normalizing Your Data 2.Consolidate Related Non-Shared Information by Denormalizing Your Data 3.Always Define Data Relations and Foreign-Key Constraints 4.Always Define Primary Keys for All Tables 5.Declare User-Defined Types for Range-Limited and Enumerated Values 6.Declare Required Columns as NOT NULL 7.Assign Default Values to Columns When Possible 8.Define Indexes For Foreign Keys and Frequent Filter Criteria Columns 9.Do Not Embed Business Rules in Database: Avoid Stored Procedures, Complex Check Constraints, Triggers 10.Validate Data Both on Client Side and on Database Side

Read Chapter 11 from my book.