the "apex" of database design
DESCRIPTION
This is an excerpt of a presentation I gave at ECPI University in Raleigh, NC. The purpose of this talk was to assist students is selecting the best database tool for business uses and to provide a low cost alternative for MS Access and MS Excel.TRANSCRIPT
THE “APEX” OF DATABASE DESIGN
JAMES FAYSON, JR., PMP
SEPTEMBER 11, 2013
JAMES FAYSON, JR., PMP
• I possess over 20 years of Information Technology experience
• Founder of a Biotech Company – Scynexis Inc. (2000 – 2013)
• Awarded a patent in a revolutionary method of purifying chemical compounds
• Created a consulting firm Faysonite Industries, LLC (2013)
• Education:
• Electronic Engineering Technology, BS, Florida A&M University
• Information Systems Management, Graduate Certificate, Keller School of Management
LET’S GET STARTED…
What are the three most common classes of business applications?Spreadsheets are commonly used for handling results of calculations, or this powerful tool can be used to organize data into column and rows. But the power of a spreadsheet is its ability to do complex calculations using advanced formulas using the information provided.Word processors: are for creating text documents such as reports, letters, forms, articles, etc. They can include pictures, graphs, portions of spreadsheets and database reports. But their strength is the ability format the document into a good presentation piece.
Databases are used to collect, manipulate, filter, and report on various kinds of data. Information from a database can be used in either word processing or spreadsheets. The strength of the database is its ability to manipulate and filter data quickly and accurately. (Tables, Queries, Forms, and Reports)
TRAP #1: WHAT DOES THIS MEAN TO YOU?
If you only have a hammer, you tend to see every problem as a nail.
- Abraham Maslow
Abraham maslow quotes. Brainyquote. Retrieved September 6, 2013, from http://www.brainyquote.com/quotes/quotes/a/abrahammas126079.html#IWaHKY1IloZkff8m.99
SPREADSHEETS VS DATABASES
Advantages Disadvantages
Simple to use Repeated data
Graphics easier to setup
Search & Retrieval
Easy data duplication Data validation & Checking
Cell formulas & Calculations
Data sharing / Collaboration
Advantages Disadvantages
Sharing Harder to setup
Search & Retrieval More expensive
Security Requires SQL knowledge
Data sharing /Collaboration
Must NormalizeDatabase Quick Notes:• Characteristics of a Relation (Table)
• Use several tables (relations) to store data• Tables names are unique for a given database• Tables are comprised of columns and rows (records)• Column names are unique and cannot contain spaces or special characters,
but “_” is acceptable.• Cells can only hold a single value.• Rows must be unique.
PROBLEM…
Susan Croft is a recreational administrator for a local park. She is running into problems with her Excel spreadsheet. Susan is finding it very difficult for her staff to enter data simultaneously, and data in her monthly reports are inconsistent. She is asking for our help; how can be help Susan?
SUSAN’S PROBLEM
PlayerID Player Activity CostAmountPai
d5001 Jay Walker Football $20 $0 5002 Mari Kaye F-ball $20 $12
5003Stevie House Basketball $17 $17
5001 Jay Walker Basketball $17 $17 5005 Moe Moore b-ball $17 $10
5006Vicky
Thomas Rock Climbing $10 $5
5007Tommy Brown football $20 $20
5008 Jake Walker Rock climbing $10 $0
5009Tommy Miller Basketball $17 $5
Steps for transforming Excel Spreadsheets into tables1. Review data and discuss with ALL stakeholders!2. Find determinates3. Create tables based on determinates (clean and
reduce data)4. Check logical structure and document constraints5. If necessary, add primary keys
FIND DETERMINATES
PlayerID Player Activity CostAmountPai
d5001 Jay Walker Football $20 $0 5002 Mari Kaye F-ball $20 $12
5003Stevie House Basketball $17 $17
5001 Jay Walker Basketball $17 $17 5005 Moe Moore b-ball $17 $10
5006Vicky
Thomas Rock Climbing $10 $5
5007Tommy Brown football $20 $20
5008 Jake Walker Rock climbing $10 $0
5009Tommy Miller Basketball $17 $5
What is the relationship among the columns?PlayerID => Player?PlayerID => Activity?PlayerID => Cost?PlayerID => AmountPaid?
What we know…PlayerID => Player Activity => Cost
(PlayerID, Activity) => AmountPaid
CREATE TABLES/CLEAN AND REDUCE
PLAYERSPLAYERID PLAYER
5001 Jay Walker5002 Mari Kaye5003 Stevie House5001 Jay Walker5005 Moe Moore5006 Vicky Thomas5007 Tommy Brown5008 Jake Walker5009 Tommy Miller
ACTIVITYS
ACTIVITY COST
Football $20
Basketball $17 Rock Climbing $10
PAIDPLAYERID ACTIVITY AMOUNT
5001 Football $0 5002 Football $12 5003 Basketball $17 5001 Basketball $17 5005 Basketball $10 5006 Rock Climbing $5 5007 Football $20 5008 Rock Climbing $0 5009 Basketball $5
PlayerID => Player Activity => Cost (PlayerID, Activity) => AmountPaid
CHECK LOGICAL STRUCTURE
PLAYERSPLAYERID PLAYER
5001 Jay Walker5002 Mari Kaye5003 Stevie House5001 Jay Walker5005 Moe Moore5006 Vicky Thomas5007 Tommy Brown5008 Jake Walker5009 Tommy Miller
ACTIVITYS
ACTIVITY COST
Football $20
Basketball $17 Rock Climbing $10
PAIDPLAYERID ACTIVITY AMOUNT
5001 Football $0 5002 Football $12 5003 Basketball $17 5001 Basketball $17 5005 Basketball $10 5006 Rock Climbing $5 5007 Football $20 5008 Rock Climbing $0 5009 Basketball $5
PlayerID => Player Activity => Cost (PlayerID, Activity) => AmountPaid
Referential Integrity Constraints
PAID.PLAYERSID must exist in PLAYERSPAID.ACTIVITY must exist in ACTIVITIES
IF NECESSARY, ADD PRIMARY KEYS
ACTIVITYS
ACTIVITY COST
Football $20
Basketball $17 Rock Climbing $10
PAIDPLAYERID ACTIVITY AMOUNT
5001 Football $0 5002 Football $12 5003 Basketball $17 5001 Basketball $17 5005 Basketball $10 5006 Rock Climbing $5 5007 Football $20 5008 Rock Climbing $0 5009 Basketball $5
ACTIVITYSACTIVITYID ACTIVITY COST
100 Football $20 101 Basketball $17 102 Rock Climbing $10
PAIDPLAYERID ACTIVITYID AMOUNT
5001 100 $0 5002 100 $12 5003 101 $17 5001 101 $17 5005 101 $10 5006 102 $5 5007 100 $20 5008 101 $0 5009 102 $5
Referential Integrity Constraints
PAID.PLAYERSID must exist in PLAYERSPAID.ACTIVITYID must exist in ACTIVITIES
TRAP #2: NOT CONDUCTING STAKEHOLDER
FOLLOW UPThis is awesome! I did not think that you could get the data organized so fast… After talking to my staff, it is important for this application to be available on our Intranet (SharePoint). We also would like to see a report of all the players, related activities, cost associated with each activity and the amount owed by each player… Is this possible?
WHY APEX?
Some features of APEX
• Integrated in Oracle (application server is not needed!)
• RAD Web development environment
• Can provide application and DB level of security
• Free! (Oracle Database 11g Express Edition)
SUMMARY
• Tip #1: Understand and increase your toolset and vision
• Tip #2: Conduct stakeholder follow up
Steps for transforming Excel Spreadsheets into tables:
• Review data and discuss with ALL stakeholders!
• Find determinates
• Create tables based on determinates (clean and reduce data)
• Check logical structure and document constraints
• If necessary, add primary keys
INFORMATION
• APEX (Oracle Application Express): browser Based Development – Easy Mobile Development - Rapidly and declaratively develop, deploy, and run applications using only a web browser http://apex.oracle.com
• Oracle Database 11g Express Edition: Free to develop, deploy, and distribute - Oracle Database 11g Express Edition (Oracle Database XE) is an entry-level, small-footprint database based on the Oracle Database 11g Release 2 code base. It's free to develop, deploy, and distribute; fast to download; and simple to administer. http://www.oracle.com/technetwork/products/express-edition/overview/index.html
THANK YOU!
If I were dropped out of a plane into the ocean and told the nearest land was a thousand miles away, I'd still swim. And I'd despise the one who
gave up. - Abraham Maslow
Abraham maslow quotes. Brainyquote. Retrieved September 6, 2013, from http://www.brainyquote.com/quotes/quotes/a/abrahammas126079.html#IWaHKY1IloZkff8m.99