46ee62cabf297f582f3e01a165964446.ppt
- Количество слайдов: 25
An Introduction to Databases January 14, 2010
Groups 21 people = 3 4 person groups and 3 3 person groups Group roles – These may rotate during the semester “Secretary/Recorder” – person to document decisions made by the group. This person should carefully document team member responsibilities as defined in the meeting. “Chair/Coordinator” – person responsible for keeping the meetings going. Keeps the group from getting too far off track. (Some socialization is good and important, but too much can keep you from meeting your goals. ) Contact person – the person responsible for contacting customers or “surrogates”. (I don’t want questions coming from many different people. )
And the groups are: Friday – early afternoon – Cordazzi, Lloyd, Coles, Tucker Sunday – 3 – 6 – Brubaker, Tian, Dunaway Wednesday – 3 – 6 – Stacey, Kim, Ringers, Hubbard Wednesday – 3 – 6 – Vandenberger, Miles, Danielson Sunday – 6 – 10 – Stanley, Foster, Luong, Smith Thursday – 6 – 10 – Ford, Holt, Onat
In your groups Find out a little bit about each other. Trade contact information. Confirm the official time for team meetings. You may want to use those meetings to prepare homework as well as to work on the project. You will turn in individual homework, but may work on it together. Choose a team / company name. This will be your software company name and will be used through the semester.
In your groups Create a Team Expectation Agreement This document will list the expected behavior of team members both inside of class when doing group work and outside of class when working on homework and project work. Examples: Team members will make sure that we all attend class each day. We will make sure that each team member contributes in some way to each group meeting. We agree to let each other know if one person is monopolizing the conversations in class. Assign to the recorder the task of recording the group agreement. The recorder should then send an electronic copy to each of the group members for approval. When done, send one copy to me. (Due Tuesday)
Which project? In your groups, discuss which project you would find most interesting. Let’s discuss as a class
Questions about contract grades? Fill out a contract (found under assignments) and return no later than Tuesday. You will be able to change your contract once during the first half of the semester (before spring break).
Evaluation Team members will evaluate the effectiveness of each member of the team. If an individual is not contributing to the project, they should not receive the same grade as those that do. We will do an early evaluation after the project begins and then do a final one as the project is turned in. The project grade will be based on the quality of the project (group grade) and the value of the contribution of the individual.
An introduction to database systems Here are some examples of computer database applications E-campus (People. Soft) Blackboard E-commerce (Amazon. com) Library What attributes do these systems all share?
More formal definitions A collection of related data. Card catalog Recipe file Phone directory A collection of related data stored in a computer system. Definition from my old book. This data simulates some real world entities. It usually is used to focus on how those entities are used within a particular process. The entities are related to one another. Teacher – Class Student – Class The relationships may be one to one (One person has at most one spouse), one to many (one teacher may have many classes) or many to many (one customer may buy many items and each item may be bought by many customers)
More about database properties The data in a database should be logically related (we talk about integrated databases). The data should have meaning to its user community. The data should be useful to someone within the user community. Databases are not static collections of data. The data changes over time. The database design should be based on how the data will be used.
Information vs data Data is the raw values. For example 3 is data. But what does it mean? Your GPA? Interest rate percentage? Average life expectancy of an American Newt (http: //www. myuniversalfacts. com/2007/01/life-span-of-animals-how-long-do. html) Databases provide structure to data which helps us to understand the data in its context. The data becomes information when its meaning is understood.
Properties of databases Data is integrated Data is shared among many users Data has persistence – it lives over a period of time Data is not duplicated to the extent possible Data is stored in raw form and then is processed
DBMS Database Management Systems Database Management System features Manage the database Provide an application that lets DBAs manipulate the database DBA is Database Administrator Provide a mechanism for defining the data (meta-data) Provide a mechanism for protecting the data Provide a query mechanism for accessing the data Applications can interact with the DBMS to perform database actions.
Why DBMS Efficient way to manage data Prevent data redundancy (data found in several places – sometimes inconsistently) Enforce security constraints – provide different views Student user has one level of access Professors have another Database administrator has another Enforce “business rules” of the organization Dates should be dates Grades must be particular values only
People End users Applications programmers Write the applications that interact with the database Data administrator Casual users (use queries) Naïve users (use applications) Secondary users (use output from db) Designs, creates and maintains the database Implements the technical controls to enforce policies Database Administrator Strategy decisions, policy decisions
A database system Diagram Components – users Data layer – resides on the physical hardware DBMS – provides the interface to the physical data
DBMS Categories Model Users Hierarchical – Tree like structure – parent to child segments – one to many. Network – Like hierarchical but with the possibility of many to many relationships. Relational – 1970 – Codd – The data is represented as a series of related tables. Object Oriented – Relational but with the inclusion of methods to form full objects. Single user at a time Multiple users Sites Centralized Distributed – database or parts are divided up into multiple locales Client/server – central data but applications run on local machines
Example – Marina Service Business Marina Number Name Warranty Nonwarranty Last Name First Name Hourly Rate YTD Earnings FB 96 Fenton's Boats $923. 20 $657. 50 Anderson Trista $24. 00 $17, 862. 00 NW 72 Nelson's Wharf $608. 50 $520. 00 Anderson Trista $24. 00 $17, 862. 00 AN 75 Afton's Marina $1, 906. 50 $831. 25 Nichols Ashton $21. 00 $19, 560. 00 BL 72 Brite's Landing $217. 00 $0. 00 Nichols Ashton $21. 00 $19, 560. 00 FM 22 Fedder Marina $432. 00 $0. 00 Nichols Ashton $21. 00 $19, 560. 00 JB 92 JT Boat Club $0. 00 Nichols Ashton $21. 00 $19, 560. 00 TR 72 The Reef $219. 00 $0. 00 Nichols Ashton $21. 00 $19, 560. 00 TT 75 The Teacup $0. 00 AD 57 Alan's Docks $1, 248. 00 $597. 75 Gomez Teresa $22. 00 $21, 211. 50 EL 25 Elend Marina $413. 50 $678. 75 Gomez Teresa $22. 00 $21, 211. 50 SM 72 Solton's Marina $462. 50 $295. 00 Gomez Teresa $22. 00 $21, 211. 50 $0. 00 What’s wrong with this picture?
Two tables, Marina… Marina Number Name AD 57 Alan's Docks AN 75 Address 314 Central City State Zip Code Warranty Nonwarranty Burton MI 49611 $1, 248. 00 $597. 75 49 Afton's Marina 21 West 8 th Glenview MI 48121 $1, 906. 50 $831. 25 36 BL 72 Brite's Landing 281 Robin Burton MI 49611 $217. 00 $0. 00 36 EL 25 Elend Marina Torino MI 48268 $413. 50 $678. 75 49 FB 96 Cavela MI 47926 $923. 20 $657. 50 23 FM 22 Fenton's Boats 36 Bayview 283 Fedder Marina Waterfront Burton MI 49611 $432. 00 $0. 00 36 JB 92 JT Boat Club Torino MI 48268 $0. 00 36 NW 72 Nelson's Wharf 27 Lake Masondale MI 49832 $608. 50 $520. 00 23 SM 72 Solton's Marina 867 Bay Ridge Glenview MI 48121 $462. 50 $295. 00 49 TR 72 TT 75 The Reef The Teacup MI 47212 $219. 00 $0. 00 36 $0. 00 48 462 River 28 Causeway 92 East Bay Woodview Tech Number
And the Technician table Technician Tech Number Last Name First Name Address City State Zip Code 23 Anderson Trista 283 Belton Port Anton MI 47989 $24. 00 $17, 862. 00 36 Nichols Ashton 978 Richmond Hewitt MI 47618 $21. 00 $19, 560. 00 49 Gomez Teresa 2855 Parry Ashley MI 47711 $22. 00 $21, 211. 50 Hourly Rate YTD Earnings
Connection Marina Number Name AD 57 Alan's Docks AN 75 Address 314 Central City State Zip Code Warranty Nonwarranty Tech Number Burton MI 49611 $1, 248. 00 $597. 75 49 Afton's Marina 21 West 8 th Glenview MI 48121 $1, 906. 50 $831. 25 36 BL 72 Brite's Landing 281 Robin Burton MI 49611 $217. 00 $0. 00 36 EL 25 Elend Marina Torino MI 48268 $413. 50 $678. 75 49 FB 96 Cavela MI 47926 $923. 20 $657. 50 23 FM 22 Fenton's Boats 36 Bayview 283 Fedder Marina Waterfront Burton MI 49611 $432. 00 $0. 00 36 JB 92 JT Boat Club Torino MI 48268 $0. 00 36 NW 72 Nelson's Wharf 27 Lake Masondale MI 49832 $608. 50 $520. 00 23 SM 72 Solton's Marina 867 Bay Ridge Glenview MI 48121 $462. 50 $295. 00 49 TR 72 TT 75 The Reef The Teacup MI 47212 $219. 00 $0. 00 36 $0. 00 48 462 River 28 Causeway 92 East Bay Woodview
Tech number Technician Tech Number Last Name First Name Address City State Zip Code 23 Anderson Trista 283 Belton Port Anton MI 47989 $24. 00 $17, 862. 00 36 Nichols Ashton 978 Richmond Hewitt MI 47618 $21. 00 $19, 560. 00 49 Gomez Teresa 2855 Parry Ashley MI 47711 $22. 00 $21, 211. 50 Hourly Rate YTD Earnings The Tech Number in the Marina table is a Foreign Key to the unique identifier in the Technician table.
What do we want to see? A list of the names and warrantee amounts from the table A list of all of the zip codes from the marinas A list of all of the marinas with warrantees A list of all of the cities where marinas from Michigan are located sorted by city name
Basic queries Given the Marina Table – what do we get? SELECT name, warranty FROM Marina SELECT zip code FROM Marina SELECT name FROM Marina WHERE warranty > 0 SELECT city FROM Marina WHERE state = “MI” ORDER BY city
46ee62cabf297f582f3e01a165964446.ppt