Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fluency with Information Technology INFO100 and CSE100 Katherine Deibel 2012-03-02Katherine Deibel, Fluency in Information Technology1.

Similar presentations


Presentation on theme: "Fluency with Information Technology INFO100 and CSE100 Katherine Deibel 2012-03-02Katherine Deibel, Fluency in Information Technology1."— Presentation transcript:

1 Fluency with Information Technology INFO100 and CSE100 Katherine Deibel 2012-03-02Katherine Deibel, Fluency in Information Technology1

2  A database is made of …  Physical database: Tables actually stored on the hard disk  Logical databases: On-the-fly virtual tables created by queries  Queries: [programs written in SQL that] define how to make a logical table from physical tables  How do we make each part? 2012-03-02Katherine Deibel, Fluency in Information Technology2

3  Describe the data physically  What are major clusters/higher-level notions of the data?  How do they interact/relate with each other?  Identify the logical structure  Describe a role with the data  Identify what fields are needed  Write queries for just those fields 2012-03-02Katherine Deibel, Fluency in Information Technology3

4  There is a technology more powerful than computers when it comes to designing software, databases, etc.?  What is it?  Pencil and paper  Whiteboards and markers  Blackboards and chalk 2012-03-02Katherine Deibel, Fluency in Information Technology4

5  Why not start directly with the database software?  Application locks you in to working in a certain order  Paper-pencil gives you some flexibility  Application will force you to attend to the details and not the general goals 2012-03-02Katherine Deibel, Fluency in Information Technology5

6  Sketch relational structure using Entity-Relationship (ER) Diagrams  Tables in boxes  Lines show relationship and type of relationship  Example: Specifying a 1-to-many relationship Faculty Student ∞ 1 2012-03-02Katherine Deibel, Fluency in Information Technology6

7  Outline key fields and refine the relationships with the fields 2012-03-02Katherine Deibel, Fluency in Information Technology7 Faculty_ID FirstName LastName Department DateHired Faculty Student_ID FirstName LastName MajorID Advisor Student ∞ 1

8  Build physical DB to avoid redundancy  Each physical table represents one entity  Expect that no physical table gives any user their exact view  To build view, build a query that  Joins tables together into a ‘super’ table  Trims out the items the user wants or needs 2012-03-02Katherine Deibel, Fluency in Information Technology8

9  Database schemes (schema)  Metadata specification that describes the database design 2012-03-02Katherine Deibel, Fluency in Information Technology9

10 2012-03-02Katherine Deibel, Fluency in Information Technology10

11  A relationship is a correspondence between rows of one table and the rows of another table  key Student_ID is used in each table,  Find address for each student (Lives_At)  Find the student for each address (Home_Of) 2012-03-02Katherine Deibel, Fluency in Information Technology11

12 2012-03-02Katherine Deibel, Fluency in Information Technology12

13 The Initial Steps 2012-03-02Katherine Deibel, Fluency in Information Technology13

14  You have been contacted by a high school to build a database for the athletics program  What do you do? 2012-03-02Katherine Deibel, Fluency in Information Technology14

15 CLIENTS  Staff  Coach  Players(?) DATABASE DESIGNER  Interviews the experts/clients  Builds a list of design goals and rules for the database 2012-03-02Katherine Deibel, Fluency in Information Technology15

16  Individuals are selected for a team  Keep track of the points awarded to each student for participating for the awarding of school letters  The Database has to keep track of student Athletes over five years with any given Athlete participating in multiple sports in a given year. 2012-03-02Katherine Deibel, Fluency in Information Technology16

17  Each high school student can play for 1 to 4 years.  A player can play in 0, 1, or many sports each year  Each team has many players 2012-03-02Katherine Deibel, Fluency in Information Technology17

18  The high school has many teams.  The high school is in one division.  Each team has a gender.  Each team is in a division.  Each team has a coach.  Each team has many players.  Each student earns points for winning an event.  Each student earns a letter by earning x points in a sport in a season.  Each student may participate in zero, one, or many sports each year.  Each student may play in sports for 1-4 years.  Each student may play in zero, one, or many competitions at an event.  Each coach can coach one or many teams. 2012-03-02Katherine Deibel, Fluency in Information Technology18

19  Major data entities  Teams  Athletes 2012-03-02Katherine Deibel, Fluency in Information Technology19

20  The HS has many teams  The HS is in one division  Each team has a gender  Each team is in a division  Each team has a coach  A team has many players  Each student earns points for winning an event  team_name  n/a  team_gender  n/a  coach_name  one-to-many  student_points team_wins event_name event_outcome 2012-03-02Katherine Deibel, Fluency in Information Technology20

21  Major data entities  Teams  Athletes  Events 2012-03-02Katherine Deibel, Fluency in Information Technology21

22 student_id student_result_at_event student_points_to_date student_points_at_event student_first_name letters_sport_code student_middle_name letters_awarded_date student_last_name team_gender student_date_of_birth event_location team_name student_gender team_description student_address coach_name student_other_details team_other_details division_description sport_description event_name event_start_date event_end_date event_other_details 2012-03-02Katherine Deibel, Fluency in Information Technology22

23  You keep adding  More fields  More relationships  Perhaps you discover the need more entities (tables)  Once complete, you implement the tables  And then the logical begins 2012-03-02Katherine Deibel, Fluency in Information Technology23

24  Designing a database is more about thinking than typing  Sketch out the relationships on paper  Identify the needs of the clients  Key aspect is to separate the logical and physical aspects  Physical is about entities and their relationships  Logical is about the user 2012-03-02Katherine Deibel, Fluency in Information Technology24

25  Work on GoPosts  Make sure you understand Lab 9  Project 3 is about databases and spreadsheets  Install Access on your home computer if you want  Get ready for an interstellar vacation (I'm 100% serious) 2012-03-02Katherine Deibel, Fluency in Information Technology25


Download ppt "Fluency with Information Technology INFO100 and CSE100 Katherine Deibel 2012-03-02Katherine Deibel, Fluency in Information Technology1."

Similar presentations


Ads by Google