270 likes | 358 Views
Join Dr. Karl Horak's engaging session to learn the ins and outs of databases. Explore various types, learn database management tools, and dive into practical exercises. Get ready for a dynamic learning experience!
E N D
Database Design 1 CMS 476 Dr. Karl Horak, Instructor
Session 1 • Administrivia • Course Overview • Week in Review • Application du Jour • Lecture: The Who, What, When, Where and Why of Databases • Demonstration: Introduction to Access • Exercises
Course Overview • Instructor background • Expectations of students • Grading • Reference material • Organization and presentation • Tools and resources
Instructor Background • PhD, U of A, 1981 • Majored in Botany, Ecology, Statistics and Genetics • Numerical taxonomy and agricultural statistics • Adjunct Professor, CSF since 1990 • Principle Member of Technical Staff, Sandia National Laboratories • Cooperative International Progams • Heavily involved in information management—this class is about what I really do every day
Current Projects • RPT Image Comparison • Global Engagement website • Spent nuclear fuel assessment survey • Wide-area networking technologies for border monitoring
My Toolset • SQL • Access • VBA • Python • Plone
The Bottom Line • Nice people • Cool projects • Interesting travel
Expectations of Students • Preparation • Attendance • Participation • Homework • Exam
Reference Material • http://home.comcast.net/~karlhorak/476_SYL.htm • http://dir.yahoo.com/Computers_and_Internet/Software/Databases/ • http://en.wikipedia.org/wiki/Database • http://ocw.mit.edu (especially http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-830Fall-2005/CourseHome/index.htm) • or just Google for it Where’s the textbook?! At your fingertips …
Organization and Presentation • Week in review—databases in real life • Recap—highlights of previous topics and this week’s podcast • Application du jour—samples of databases in action • Tonight’s lecture topic • Demonstration • Exercises and Q&A
Tools and Resources • Access—http://office.microsoft.com/en-us/access • MySQL—http://www.mysql.com • Plone—http://plone.org
Week in Review Or, what I did on my summer vacation • RPT—Access and Python • NEN survey tool • WACSI • MMNA
Application du Jour • WACSI • “Web Access for Civil Society Improvements” • Middle East Regional activity • Internet-centered collaboration • Focused on: • Societal improvements • Economic development • Women’s empowerment • Education • Religious tolerance • Human rights • http://unm.wacsi.edu
Tonight’s Lecture Topic:Who, What, When, Where and Why • What is a database? • Why you should care? • Who uses databases? • When should you use a database? • Where are the databases?
What is a Database? • Webster: “a usually large collection of data organized especially for rapid search and retrieval (as by a computer)” • Horak: All computerized digital information is a database, it just doesn’t know it yet.
Wherefore and Why • Seek and you shall find … well, maybe • “If you don’t know what you’re looking for, you’ll find it.” • “If a piece of data is in a computer twice, one of the copies is wrong.” • The two R’s • Retrieval • Redundancy
What is a Database? Part 2 Types of Databases: • Unstructured (Free-text) • Flat file (e.g., Excel) • Hierarchical (C:\) • Relational (Access, MySQL, Oracle) • Object-oriented (Zope)
Who and When? • DBA = Database Administrator • Anyone with large volumes of data • Anyone with complex questions • Everybody needs databases, they just don’t know it yet
Where are they? Some Examples • http://www.travelschlepp.com • prius.xls • Your hard drive • EFAC.mdb • http://freeplone2.openia.com/mmna
Demonstration • Introduction to MS Access • EFAC database • Terminology • Tables = spreadsheets • Records = rows • Fields = columns • Getting around in Access http://home.comcast.net/~karlhorak/SQLexercises.mdb
Getting Data Out • QBE • Drag-and-drop tables, fields, relationships • Visual query builder • SQL • Manually created and edited • Text-based • SPARQL • RDF and XML-based • Web 2.0
SQL • SELECT <fieldlist or expression> • From <table or query> • Where <condition> • Order by <field or expression> • Group by <field> • Having <condition> • ;
Exercises and Q&A • Download and open the EFAC database • Familiarize yourself with the structure and the data • Answer some questions by building queries
Queries • Display all data in the table. • Display just facility type and country for all items in the table. • Display the facility type, capacity, and capacity units for just the facilities in Brazil • Display facility type, country, and capacity in kgU/year (hint: capacity is in metric tons, 1000 kg). Include a column that displays the units as "kgU/year".