1 CSE 4904 Core Database Classes. 2 CSE 4904 The User Table CREATE TABLE `tmr`.`user` ( `USER_ID_PK` int(11) NOT NULL AUTO_INCREMENT, `UserName` varchar(25)

Slides:



Advertisements
Similar presentations
Data Design The futureERD - CardinalityCODINGRelationshipsDefinition.
Advertisements

Day 3 - Basics of MySQL What is MySQL What is MySQL How to make basic tables How to make basic tables Simple MySQL commands. Simple MySQL commands.
MySQL-Database Teppo Räisänen Oulu University of Applied Sciences School of Business and Information Management.
IS605/606: Information Systems Instructor: Dr. Boris Jukic
CSE 1561 A Brief MySQL Primer Stephen Scott. CSE 1562 Introduction Once you’ve designed and implemented your database, you obviously want to add data.
NMED 3850 A Advanced Online Design February 25, 2010 V. Mahadevan.
Maintenance Modifying the data –Add records –Delete records –Update records Modifying the design –Add fields into tables –Remove fields from a table –Change.
CSE 190: Internet E-Commerce Lecture 10: Data Tier.
CSE 1561 Designing Relational Databases Stephen Scott.
BUSINESS DRIVEN TECHNOLOGY
Access Lecture 1 Database Overview and Creating Tables Create an Employee Table.
SQL Basics+ Brandon Checketts. Why SQL? Structured Query Language Structured Query Language Frees programmers from dealing with specifics of data persistence.
Phil Brewster  One of the first steps – identify the proper data types  Decide how data (in columns) should be stored and used.
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.
MySql In Action Step by step method to create your own database.
PHP1-1 PHP & SQL Xingquan (Hill) Zhu
INTERNET APPLICATION DEVELOPMENT For More visit:
Database Systems Marcus Kaiser School of Computing Science Newcastle University.
PostgreSQL and relational databases As well as assignment 4…
Copyright © 2003 by Prentice Hall Module 4 Database Management Systems 1.What is a database? Data hierarchy and data organization Field, record, file,
6-1 DATABASE FUNDAMENTALS Information is everywhere in an organization Information is stored in databases –Database – maintains information about various.
Web Interface for Health Care Database Priyanka Walke.
Chapters 17 & 18 Physical Database Design Methodology.
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,
Databases in Visual Studio. Database in VisualStudio An MS SQL database are built in Visual studio The Name can be something like ”(localdb)\Projects”
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Dbwebsites 2.1 Making Database backed Websites Session 2 The SQL… Where do we put the data?
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Relational Database Management Systems. A set of programs to manage one or more databases Provides means for: Accessing the data Inserting, updating and.
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
Chapter 4 Introduction to MySQL. MySQL “the world’s most popular open-source database application” “commonly used with PHP”
Introduction to MySQL Lab no. 10 Advance Database Management System.
CSC 2720 Building Web Applications Database and SQL.
Database and mySQL Week 07 Dynamic Web TCNJ Jean Chu.
CAKEPHP Blog tutorial. what you’ll need examples/blog/blog.html 2  A running web server  A database server.
SQL, Data Storage Technologies, and Web-Data Integration Week 2.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
Storing Organizational Information - Databases
M1G Introduction to Database Development 2. Creating a Database.
SQL Basics. 5/27/2016Chapter 32 of 19 Naming SQL commands are NOT case sensitive SQL commands are NOT case sensitive But user identifier names ARE case.
Chapter 5 MYSQL Database. Introduction to MYSQL MySQL is the world's most popular open-source database. Open source means that the source code, the programming.
CS4432: Database Systems II Record Representation 1.
Entity-Relationship (ER) Modelling ER modelling - Identify entities - Identify relationships - Construct ER diagram - Collect attributes for entities &
Database Fundamentals Lecture 4 Useful website for MySQL download language.com/workshops/Default.asp ?workshop=21.
1 CSE 2337 Introduction to Data Management Access Book – Ch 1.
What is a Database?. “A persistent & organised store of data. ” Persistent:  Non-volatile  Using secondary storage Organised:  Data organised into.
Advanced Web 2012 Lecture 3 Sean Costain What is a Database? Sean Costain 2012 A database is a structured way of dealing with structured information.
Creating A Database Driven Website 1.Setting Up Your Web Server 2.Creating a Database 3.Creating a Webpage to Display Information From a Database 4.Creating.
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.
>> Introduction to MySQL. Introduction Structured Query Language (SQL) – Standard Database Language – Manage Data in a DBMS (Database Management System)
There are two types of MySQL instructions (Data Definition Language) DDL: Create database, create table, alter table,,,. (Data Manipulation Language) DML.
Database: SQL, MySQL, LINQ and Java DB © by Pearson Education, Inc. All Rights Reserved.
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 7 Storing Organizational Information - Databases.
Introduction to MySQL Ullman Chapter 4. Introduction MySQL most popular open-source database application Is commonly used with PHP We will learn basics.
Working with MySQL A290/A590, Fall /07/2014.
DAY 14: ACCESS CHAPTER 1 RAHUL KAVI October 8,
LECTURE FOUR Introduction to SQL DDL with tables DML with tables.
CS320 Web and Internet Programming SQL and MySQL Chengyu Sun California State University, Los Angeles.
Introduction to MySQL  Working with MySQL and MySQL Workbench.
Getting started with Accurately Storing Data
CS320 Web and Internet Programming SQL and MySQL
MySQL-Database Jouni Juntunen Oulu University of Applied Sciences
Lecturer: Mukhtar Mohamed Ali “Hakaale”
CS3220 Web and Internet Programming SQL and MySQL
Chapter 4 Introduction to MySQL.
Day 2 - Basic Database Backbone
CS3220 Web and Internet Programming SQL and MySQL
Instructor Information: Mark Jamil
Designing Databases ySQL Happy Meal Example.
Presentation transcript:

1 CSE 4904 Core Database Classes

2 CSE 4904 The User Table CREATE TABLE `tmr`.`user` ( `USER_ID_PK` int(11) NOT NULL AUTO_INCREMENT, `UserName` varchar(25) NOT NULL, `Password` varchar(25) NOT NULL, `RecoveryAnswer` varchar(100) NOT NULL, `CompleteName` varchar(255) NOT NULL, `NamePrefix` varchar(10) DEFAULT NULL, `FirstName` varchar(50) NOT NULL, `LastName` varchar(50) NOT NULL, `NameSuffix` varchar(10) DEFAULT NULL, `MiddleName` varchar(25) DEFAULT NULL, `UpdateDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `UpdateDescription` varchar(255) DEFAULT NULL, `InsertDate` datetime NOT NULL, `RECOVERYQUESTION_ID_FK` int(11) NOT NULL, `PRIMARY _ID_FK` int(11) NOT NULL, `THEME_ID_FK` int(11) NOT NULL, `TYPE_ID_FK` int(11) NOT NULL, `Gender` varchar(25) DEFAULT NULL, `INCOMELEVEL_ID_FK` int(11) DEFAULT NULL, `RACE_ID_FK` int(11) DEFAULT NULL, `TECHNOLOGY_ID_FK` int(11) DEFAULT NULL, `DOB` datetime DEFAULT NULL, `GoogleAccount` varchar(45) DEFAULT NULL, `GooglePassword` varchar(25) DEFAULT NULL, PRIMARY KEY (`USER_ID_PK`), KEY `FK_USER_THEME` (`THEME_ID_FK`), KEY `FK_USER_TYPE` (`TYPE_ID_FK`), KEY `FK_USER_ ` (`PRIMARY _ID_FK`), KEY `FK_INCOMELEVEL` (`INCOMELEVEL_ID_FK`), Etc.

3 CSE 4904 Tracking Patient Characteristics  Information needed to track an individual patient’s basic data  Does your application need any other information on each patient?  Solution: Modify Existing Patient Table TABLE PATIENT USER_ID_PK (links to User Table) Date of Birth Sex (M/F) Height Weight

4 CSE 4904 What about Prescriptions?  Two alternatives for storage:  Google Health (XML Instance) has this information  MySQL DB has a patient_medication Table which can be modified  Again – what else do you need that is not shown?

5 CSE 4904 Tracking ODLs  Need to Distinguish Between:  Storing Information on each of the Different Kinds of ODLs (Passive, Active, etc.)  Storing Actual Values (Instances) for Each User on a Day-by-Day Basis  Start with ODL_Kind Table: TABLE ODL_Kind ODL_Kind_ID (Primary Key) ODL_Kind_Category (Enum: values of active or passive) ODL_Kind_Range (Enum: Scale, Values, Enumeration, etc.) ODL_Kind_Disease (Asthma, Diabetes, CHF, etc.)

6 CSE 4904 Tracking ODLs  Now Define Different Ranges, Diseases, etc. TABLE ODL_Range_Data ODL_Range_Data_ID (Primary Key) ODL_Kind_ID (Foreign Key) ODL_Range_Data_DateTimeStamp ODL_Range_Data_Type (Enum:Fatigue, Pain, Energy Level, etc.) ODL_Range_Data_Low_Value (for Scale Range – if need low and high values) ODL_Range_Data_High_Value (for Scale Range – if need low and high values) ODL_Range_Data Values (set of one or More values for Values Range – if multiple values are listed) ODL_Range_Data_Enum_Values (set of one or more values like very good, good, bad, lousy, etc. – for Enumeration Range) Notes: For Sets – may need separate tables with IDs for actual Values. For Blue/Red/Green ODLs – only one is every active. For every ODL collected from a use, an instance/tuple of ODL_Range_Data is created. This instance will be bound to a specific user in the ODL_Patient_Data table.

7 CSE 4904 Tracking ODLs  What about Disease? TABLE ODL_Disease_Data ODL_Disease_Data_ID (Primary Key) ODL_Kind_ID (Foreign Key) ODL_Disease_Data_DateTimeStamp ODL_Disease_Data_Type (Enum: Diabetes, Asthma, CHF, etc.) ODL_Diabetes_Data_Glucose_Level ODL_Diabetes_Data_Insulin_Taken ODL_Asthma_Data_Peak_Flow_Value ODL_Asthma_Data_Respirations ODL_Asthma_Data_Oxygen_Saturation ODL_CHF_Data_????? Notes: ODL_Disease Type may be redundant and not needed. Again, For Blue/Red/Green ODLs – only one is every active. For every ODL collected from a use, an instance/tuple of ODL_Range_Data is created. This instance will be bound to a specific user in the ODL_Patient_Data table.

8 CSE 4904 Tracking ODLs  Now – Need to Track ODLs for actual patients TABLE ODL_Patient_Data ODL_Patient_Data_ID (Primary Key) ODL_Kind_ID (Foreign Key – for direct access to ODL_Kind) ODL_Patient_Data_ODL_ID (this references either a ODL_Range_Data instance/tuple or ODL_Disease_Data Instance/Tuple, etc. Notes: The ODL_Patient_Data_ODL_ID references data collected by each patient. You simply pull back all data (regardless of timestamp) to get all of the ODLs and then sort, maninpulate as needed.

9 CSE 4904 Next Steps for Specific Groups  Group A  Need to Define a Physician (or Provider) table that tracks information on Providers  Use a Similar Approach to Patient Table and Reuse User Table  Patient Table: Do you need a Condition List?  Your ODLs should be Handled by Proposed ODL Tables  Need to Consider the Generation of Reports and if you need to Store these in a Table or Just Generated on Demand

10 CSE 4904 Next Steps for Specific Groups  Group B  Your ER Diagram is too “flow-oriented” in trying to Represent System Features and Capabilities  Prescription and Google Account Entities should be Handled by User/Prescription Tables  Your ODLs should be Handled by Proposed ODL Tables  Need to Consider the Generation of Reports and if you need to Store these in a Table or Just Generated on Demand

11 CSE 4904 Next Steps for Specific Groups  Group C  Need an Updated Specification with Respect to What your Focus is Going to be re. Reminders, Messages, etc.  Is Health meant to be ODLs?  Account Table should be Handled by User and Patient Tables  What about Physicians/Providers? Do you need these?  What Data may you Need to Add to Existing Tables?