Creating databases for web applications SQL. Systems design. ER diagrams. Data flow diagrams. Storyboards. Homework: Plan database and applications for.

Slides:



Advertisements
Similar presentations
Welcome to WebCRD.
Advertisements

McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. Extended Learning Module C Designing Databases and Entity-Relationship.
© McGraw-Hill Companies, Inc., McGraw-Hill/Irwin Extended Learning Module C Designing Databases and Entity-Relationship Diagramming.
Chapter 6 UNDERSTANDING AND DESIGNING QUERIES AND REPORTS.
Chapter 4 Enterprise Modeling.
From Class Diagrams to Databases. So far we have considered “objects” Objects have attributes Objects have operations Attributes are the things you record.
Entity-Relationship Model and Diagrams (continued)
Further Data Modelling …and the effect of time. Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis –Further.
1004INT Information Systems Week 10 Databases as Business Tools.
WELL-DESIGNED DATABASES Process faster Easy to develop and maintain Easy to read and write code.
Chapter 4: Database Management. Databases Before the Use of Computers Data kept in books, ledgers, card files, folders, and file cabinets Long response.
“DOK 322 DBMS” Y.T. Database Design Hacettepe University Department of Information Management DOK 322: Database Management Systems.
1 SYSTEMS DESIGN Pertemuan 13 s.d 20 Matakuliah: A0554/Analisa dan Perancangan Sistem Informasi Akuntansi Tahun: 2006.
8/28/97Information Organization and Retrieval Files and Databases University of California, Berkeley School of Information Management and Systems SIMS.
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2006 Microsoft Corporation.
Systems Analysis I Data Flow Diagrams
Database Constraints. Database constraints are restrictions on the contents of the database or on database operations Database constraints provide a way.
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
Software Development Unit 2 Databases What is a database? A collection of data organised in a manner that allows access, retrieval and use of that data.
System Analysis Overview Document functional requirements by creating models Two concepts help identify functional requirements in the traditional approach.
Page 1 ISMT E-120 Desktop Applications for Managers Introduction to Microsoft Access.
Creating Databases SELECT. UPDATE. Demonstrate projects. Classwork / Homework: Prepare to choose teams & projects.
Creating databases for web applications
Databases From A to Boyce Codd. What is a database? It depends on your point of view. For Manovich, a database is a means of structuring information in.
Classroom User Training June 29, 2005 Presented by:
Business Process Modeling
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
Chapter 4 The Relational Model 3: Advanced Topics Concepts of Database Management Seventh Edition.
Creating Databases for Web applications Introductions & overview Administration Moodle HW: Sign on, register for course, introduce yourself on Moodle.
Information Systems: Databases Define the role of general information systems Describe the elements of a database management system (DBMS) Describe the.
Microsoft Access Get a green book. Page AC 2 Define Access Define database.
PHP meets MySQL.
2/6/01D-1 © 2001 T. Horton CS 494 Object-Oriented Analysis & Design Using PARTS to Illustrate Requirements Concepts.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Databases From A to Boyce Codd. What is a database? It depends on your point of view. For Manovich, a database is a means of structuring information in.
Normalization A technique that organizes data attributes (or fields) such that they are grouped to form stable, flexible and adaptive entities.
In the next step you will enter some data records into the table. This can be done easily using the ‘Data Browser’. The data browser can be accessed via.
Lecturer: Gareth Jones. How does a relational database organise data? What are the principles of a database management system? What are the principal.
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T5 DESIGNING DATABASE APPLICATIONS.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Relational Database. Database Management System (DBMS)
Database Beginnings. Scenario so far In our scenario we have people registering for training sessions. –The data about the training sessions was placed.
Next Back A-1 Management Information Systems for the Information Age Second Canadian Edition Copyright 2004 The McGraw-Hill Companies, Inc. All rights.
C-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Extended Learning Module.
Reports and Learning Resources Module 5 1. SLMS Primary Administrator Training Module 5: Reports and Learning Resources 2.
Creating Databases for web applications [Complete presentations] More SQL Class time: discuss final projects. Do posting if you have not done it.
6.1 © 2010 by Prentice Hall 6 Chapter Foundations of Business Intelligence: Databases and Information Management.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
Creating databases for web applications Library. New example: student database. Homework: Complete class example. Catch up on source postings. Do creation.
1 CSE 2337 Introduction to Data Management Access Book – Ch 1.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
NMD202 Web Scripting Week5. What we will cover today PHP & MySQL Displaying Dynamic Pages Exercises Modifying Data PHP Exercises Assignment 1.
UML’s StateChart FSM, EFSM in UML Concurrent states Tool support.
1 DATABASE TECHNOLOGIES (Part 2) BUS Abdou Illia, Fall 2015 (September 9, 2015)
Systems Analysis and Design 8th Edition
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
Physical Layer of a Repository. March 6, 2009 Agenda – What is a Repository? –What is meant by Physical Layer? –Data Source, Connection Pool, Tables and.
For more course tutorials visit CIS 336 All iLabs Week 1 to Week 7 Devry University CIS 336: All iLabs Week 1 to Week 7: Devry University.
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
Confirm teams. Review of diagrams. SELECT problems.
Database Development Lifecycle
Creating Databases Local storage. join & split
Creating databases for web applications
CIS 336 strCompetitive Success/tutorialrank.com
CIS 336 str Education for Service-- tutorialrank.com.
Creating Databases SELECT. UPDATE. Demonstrate projects. Do not track.
Accounting System Design
Accounting System Design
COMP 208/214/215/216 – Lecture 7 Documenting Design.
Presentation transcript:

Creating databases for web applications SQL. Systems design. ER diagrams. Data flow diagrams. Storyboards. Homework: Plan database and applications for a library: produce ERD and DFD

SQL Select SELECT field1, field2, … FROM table1 WHERE condition AND condition GROUP BY fieldi HAVING condition … ORDER … LIMIT … More complex SELECT adds SELECT field1, field2, … FROM table1 JOIN ON condition WHERE condition ….

System analysis and design Tools for planning –communication with clients (specific diagrams may not always be shown, but used to support discussion) –communication with builders Attempt to focus on function before implementation –logical design versus physical design non-tech meaning of term

Models Information model = Entity relationship diagrams –Ask yourself: what is the critical information? What are the relationships (what fields in one table point to other records?) Process model = data flow –What are the (main) processes? Who initiates these processes? What data stores are used and/or changed? Story board –What are the Web pages—the interfaces to the user (client/player/employee)? What is the flow from one Web page to another?

ER models Done before creating the tables as part of planning and after creating the tables, as documentation Logical/analysis level (what is in examples here) just defines fields and relationships. Physical/Design/Implementation level: data types and also estimates on number of records.

Entity-relationship Entity = the things (products, people, places, business concepts) –attributes = fields = properties Relationships = connections between things, as represented by a field in one table (attribute of an entity) pointing to an entity.

Primary keys and foreign keys A field (attribute) that uniquely defines a record in a table can be its primary key. –sometimes generated automatically by dbms In another table, the way to refer to this record would be by using the primary key value. This is called a foreign key in that other table.

Entity Relationship diagrams Blocks represent the records in the table. Typically, they list all the fields. Lines between the blocks represent relationships. The marks on the lines indicate the numbers, e.g., one to many, one to one. They also indicate what a minimum would be. –0 means that an entity in one table may not be referenced in the other at all.

Example: trivia quiz Tables are Questions Players History (that is, a question was asked [of] a player on a specific date, with outcome correct or not correct –Each item in History relates to a specific player and a specific question

Trivia quiz – yer/quiz/choosecategory.phphttp://socialsoftware.purchase.edu/jeanine.me yer/quiz/choosecategory.php – yer/quiz/showscores.phphttp://socialsoftware.purchase.edu/jeanine.me yer/quiz/showscores.php – yer/quiz/inputquestions.phphttp://socialsoftware.purchase.edu/jeanine.me yer/quiz/inputquestions.php No registration. Rule on asking questions.

Question databank table question_id Question Answer (answer pattern) Value Category Players table player_id Player name Score lastplayed date history table question_id player_id whenplayed correct 0 0

Course pre-req example In this design, each course has at most one pre-requisite course.

Course course title Division Pre-requisite 0 0

Course pre-reqs, more complete Each course can have no, 1, or any number of pre-requisites. TWO TABLES! –Courses –Statements of pre-reqs

Course Course title Division Statement of pre- requisites Course to be taken pre-required course (prior course) Each statement of pre-requisites refers to exactly one course and exactly one 'pre-req'. A course can be in either position, zero, one or several times. Creating Web Documents is a pre-req for Creating Dynamic Web Docs & Creating DBs for Web Some courses may have pre-requisites of more than one course

Data design Sometimes done by taking the artifacts (forms, reports, screens) and writing down all those fields into first draft of records –These artifacts can be from the current system or the proposed materials for a new system Apply a technique called normalization to get well- defined entities and relationships. –First step is making sure each record has fixed number of fields. For example, not indefinite number of pre-reqs –Subsequent steps ensure that data is not repeated, so information only needs to be updated in one place Make customer data be in a customer file NOT in each transaction file –EXTRA CREDIT opportunity for posting

Process diagram Focus on Blocks –processes –agents (this could be people in specific roles or 'the system' triggered by events, including a time condition) –data stores: more general term than databases. Here we can use it to refer to tables that are in a database or file or built into script Connections –Agent engaged with process –Process using data store

Player Editor Play game Edit questions Questions table Player table Data flow diagram (process diagram) for quiz show History table

Story board more implementation based than the others Therefore, part of system build, not system design, or, perhaps, System Physical Design not Logical Design focus on the scripts and how the scripts call each other

Create quiz tables (php only) Input Questions (handles form input) Choose category Ask question Check answer Clear tables Include/Required file: opendbq Show scores

Entities for store Initial design catalog of products orders –one or more ordered items customer list Enhanced design Need 1 more table: call it ordered items

Product catalog Product id Product name Picture Cost Customer list Customer ID first name last name Billing information Password Order list Order ID Customer ID Date Status Total Ordered items Order ID Product Quantity 0 ER diagram for on-line store 0

Customer Billing system (timed event) Browse/ Order Billing Catalog Customer list Current orders Ordered items Shipping clerk Shipping Data flow (process) diagram for on-line store. Note that this is the information/data flow, not the flow of goods. The shipping operation produces a physical product: the collection of ordered items, packed and set off for delivery.

Storyboard of partial implementation: ordering Create tables (php only) Include/require: opendbo Input products Order product makeorder Shopping cart Submit order Delete current customer cookie Include/require: displaycartfunction

Song with features example Bare bones Song table and Feature table plus A song can have 0 or more features Intention is to provide way of detecting songs similar to a given song –Complex SQL statement!

Song features song id Name Description Year feature id name description feature of song fisid fid 0 0

Song with features storyboard createtables.php addsong.htmladdsong.php addfeature.html addfeature.php addfeaturestosong1.phpaddfeaturestosong2.php deletefeaturesinsongs.php findothers1.phpfindothers2.php listallfeaturesinsongs.php opendbe.php (included in all php files)

Songs with features DFD Add songs Identify songs Add features to song AdminFinder Add feature Song info Edit info

Agents Of course in these toy applications such as the songs with features, there is just one agent (me!) but Important to plan what are roles of system builders versus system users –End users (maybe customers, clients) –System maintainers Some social networking song sites do allow users to add songs, specify features, add features, etc.

Opportunity for improvement Functions mentioned but not implemented (in orange) Navigation could be better –specifically, going back or 'coming out of' steps. Where to go Teams will review and enhance these projects and present whole thing to the class.

Classwork / Homework Design ER and DFD for a library. YOUR job is to define entities, relationships, agents, data stores, processes. Logical design, not physical design Note: a data store could be manual. Don't be concerned with that. This is a paper-and-pencil activity, though you can using drawing tools in Word or Powerpoint or ??.

Homework Catch up programming. Post links to Information, etc. forum: –Simple parallel arrays application Like my state capital quiz –One table database application Like my books application Catch up unique sources assignments. Post on Sources you find forum: –php, MySQL (or SQL), regular expressions, ER or DFD or Select statement