Presentation is loading. Please wait.

Presentation is loading. Please wait.

Feb 2001CSS/416:Module U1 Workshop 11 CSS/416 Data Design And Information Retrieval Workshop 1.

Similar presentations


Presentation on theme: "Feb 2001CSS/416:Module U1 Workshop 11 CSS/416 Data Design And Information Retrieval Workshop 1."— Presentation transcript:

1 Feb 2001CSS/416:Module U1 Workshop 11 CSS/416 Data Design And Information Retrieval Workshop 1

2 Feb 2001CSS/416:Module U1 Workshop 12 Workshop 1 Outline Introductions and Course Overview Learning Team Project Discussion Database Evolution and Architecture Student Exercise Relational Foundations Lab

3 Feb 2001CSS/416:Module U1 Workshop 13 CSS/416 Data Design and Information Retrieval Workshop 1 Part 1 – Evolution and Archtecture

4 Feb 2001CSS/416:Module U1 Workshop 14 Database Management Systems Evolution 50’s I/O routines File systems Hierarchical Network/Codasyl Relational Object-relational Object-oriented

5 Feb 2001CSS/416:Module U1 Workshop 15 File-Processing Systems Page 12 Chapter 1 Figure 1-10 © 2000 Prentice Hall

6 Feb 2001CSS/416:Module U1 Workshop 16 DBMS Processing System Page 11 Figure 1-9 © 2000 Prentice Hall

7 Feb 2001CSS/416:Module U1 Workshop 17 Database Management Systems System Components ( commonly integrated into one product on PC workstations ) Data definition facilities Development tools “Engines”, Run-time system(s) Report writers Query Facility Forms The database itself

8 Feb 2001CSS/416:Module U1 Workshop 18 Database Management Systems Database components User tables Indexes System metadata (data dictionary) Application metadata Optionally, views

9 Feb 2001CSS/416:Module U1 Workshop 19 Database Management Systems Components Dev. ToolsApp2App1 Query Sys.DB Engine DB

10 Feb 2001CSS/416:Module U1 Workshop 110 DBMS Engine Page 30 Intermediary between the design tools and run-time subsystems and the data Also handles... transaction management locking backup and recovery

11 Feb 2001CSS/416:Module U1 Workshop 111 Database Management Systems Environment Single user Workgroup Enterprise Client/Server Distributed Inter/Intranet Specialized very large scale

12 Feb 2001CSS/416:Module U1 Workshop 112 Database Management Systems Positioning Chart VLDB Enterprise Workgroup Single user Spreadsheet # Users Cost

13 Feb 2001CSS/416:Module U1 Workshop 113 Database Sizing Chapter 1 Page 10 © 2000 Prentice Hall

14 Feb 2001CSS/416:Module U1 Workshop 114 Database Management Systems Oracle DB Visual Basic App Client/Server Architecture Access

15 Feb 2001CSS/416:Module U1 Workshop 115 Database Management Systems Oracle DB Browser Web Architecture Web Server

16 Feb 2001CSS/416:Module U1 Workshop 116 Database Development Top Down App3App2App1 Data Model DB

17 Feb 2001CSS/416:Module U1 Workshop 117 Database Development “Bottom Up” App2TablesApp1 Integrate DB Tables

18 Feb 2001CSS/416:Module U1 Workshop 118 Database Development Interviewing users documenting requirements building a data model building a database prototype a process of inference (working backwards)

19 Feb 2001CSS/416:Module U1 Workshop 119 Requirements Number of users, target audiences, etc. Size of DB (#records, tables, etc.) Performance Forms, Reports, Queries Usage (OLTP, Decision Support, etc.) Business Rules Deployment Etc.

20 Feb 2001CSS/416:Module U1 Workshop 120 Implementing a Relational Database 1.Define the database structure to the DBMS 2.Allocate media space 3.Create the database data Page 195

21 Feb 2001CSS/416:Module U1 Workshop 121 Media Space Allocate space for database Initial amount Growth increment Placement Many other options Method varies by vendor – but commonly done via various visual tools Often automatic with personal databases

22 Feb 2001CSS/416:Module U1 Workshop 122 Initial Population of Database Can be major issue with enterprise systems DB vendors have tools to assist – bulk copy, import, etc. Numerous 3 rd party tools available – Data Junction, etc.

23 Feb 2001CSS/416:Module U1 Workshop 123 Evolution and Architecture Student Exercise: define the database requirements, architecture, and components for one of the following scenarios: Large insurance carrier Small retail jewelry business Mid-size manufacturer Hospital

24 Feb 2001CSS/416:Module U1 Workshop 124 CSS/416 Data Design and Information Retrieval Workshop 1 Part 2– Relational Foundations

25 Feb 2001CSS/416:Module U1 Workshop 125 Review of Terminology Relation “two-dimensional table” entries are single value attributes (columns) contain same type of data each attribute has a domain (allowed values) no two rows are identical, order is unimportant tuple (rows) Page 193

26 Examples of Relation Definitions Page 204 Figure 8-11a © 2000 Prentice Hall

27 Occurrence of a relation PATIENT(Name, DateOfBirth, Gender, AccountNumber, Physician) Page 194 Figure 8-1 © 2000 Prentice Hall

28 Attribute Domains Page 204 Figure 8-11b © 2000 Prentice Hall

29 Domain Definitions Page 204 Figure 8-11c © 2000 Prentice Hall

30 Feb 2001CSS/416:Module U1 Workshop 130 Key “Group of one or more attributes that uniquely identifies a tuple in a relation” logical physical (index) Page 194

31 Feb 2001CSS/416:Module U1 Workshop 131 Relational Schema “The relation structure plus constraints on allowable data values” Page 194

32 Feb 2001CSS/416:Module U1 Workshop 132 Data Definition Language (DDL) “The language used to describe the database structure” tables columns indexes constraints Security Typically done with a visual CASE tool (ERWin, ODD, System Architect, Visio, etc.) Page 196

33 Feb 2001CSS/416:Module U1 Workshop 133 Class Example Relations Create following relations Manufacturers (eqptmfgr, mfgraddr) Plants(plantname, eqptname, eqptmfgr)

34 Feb 2001CSS/416:Module U1 Workshop 134 Relational Data Manipulation Language (DML) Relational Algebra Transform-Oriented Languages Query-by-Example Query-by-Form Page 198

35 DML Interfaces Forms Query/Update Language Interface SELECT Name, Age FROM PATIENT WHERE Physician = ‘Levy’ Page 200 Figure 8-8 © 2000 Prentice Hall

36 Feb 2001CSS/416:Module U1 Workshop 136 DML Interfaces Stored Procedure Interface DO BILLING FOR BDATE = ‘9/15/1999’ Application Program Interface(API) COBOL BASIC Perl C++ Ex: DB-LIB for Sybase and SQL Server FoxPro calling ex: result=sqlexec(connection, SQLStatemt) Page 201

37 Feb 2001CSS/416:Module U1 Workshop 137 Relational Algebra Union (A+B) NameAge Bob23 Mary12 + NameAge Bob23 Mary12 = ? Must be union compatible Duplicates excluded

38 Feb 2001CSS/416:Module U1 Workshop 138 Relational Algebra Difference (A-B) NameAge Bob23 Mary12 - NameAge Mary12 = ? Rows that occur in first table but not in 2 nd

39 Feb 2001CSS/416:Module U1 Workshop 139 Relational Algebra NameAge Bob23 Mary12 ^ NameAge Mary12 = ? Rows that occur in both tables Intersection (A ^ B)

40 Feb 2001CSS/416:Module U1 Workshop 140 Relational Algebra Cartesian product (A X B) NameAge Bob23 Mary12 X CitySt BostonMA NashuaNH = ? Yields 4 rows and 4 columns

41 Feb 2001CSS/416:Module U1 Workshop 141 Relational Algebra NameAge Bob23 Mary12 = Name Bob Mary Project name -pulls out column name Projection

42 Feb 2001CSS/416:Module U1 Workshop 142 Relational Algebra NameAge Bob23 Mary12 = Selection (Restriction) ? Ex: select…where age = 23 -restricts rows returned

43 Feb 2001CSS/416:Module U1 Workshop 143 Join “combination of the product, selection, and (possibly) projection operations” equijoin natural join left outer join Page 207

44 Feb 2001CSS/416:Module U1 Workshop 144 Relational Algebra NameAge Bob23 Mary12 join NameState MaryNH AliceMA = ? Where a.name = b.name -how many rows in result -how may columns for equi-join? For natural? Joins(equi, natural) A B

45 Feb 2001CSS/416:Module U1 Workshop 145 Relational Algebra NameAge Bob23 Mary12 left join NameState MaryNH AliceMA = ? Outer Join (left, right, full) A B Join on name -How many rows will be in result?

46 Summary of Relational Algebra Operators Page 209 Figure 8-20 © 2000 Prentice Hall

47 Feb 2001CSS/416:Module U1 Workshop 147 Relational Algebra Lab Do inner, left, right and full outer joins (join on name) Do a projection on the result Try a “cartesian product” Use tables you created earlier Eqpt MfgrMfgr Addr ABC Exchanger 1247 Locust XYZ Pumps432 Broadway PlantNameEqptnameEqpt Mfgr ethyleneFinal coolerABC Exchanger ethyleneFeed heaterABC Exchanger styreneFeed pumpXYZ Pumps propylene styreneFeed heaterABC Exchanger

48 Feb 2001CSS/416:Module U1 Workshop 148 Expressing Queries (Lab) 1.What are the names of all manufacturers? Manufacturer [eqptmfgr] Page 210

49 Feb 2001CSS/416:Module U1 Workshop 149 Expressing Queries (Lab) 2. What are the names of all manufacturers with installed equipment? Eqptmfgr [plants] Page 211

50 Feb 2001CSS/416:Module U1 Workshop 150 Expressing Queries (Lab) 3. What are the names of all plants with incomplete data? eqptmfgr[PLANTS] – mfgrname[EQUIPMENT] Page 211

51 Feb 2001CSS/416:Module U1 Workshop 151 Expressing Queries (Lab) 4. What are the names of all plants with feed heaters? eqptmfgr[PLANTS] where eqptname = “Feed Heater” Page 211

52 Feb 2001CSS/416:Module U1 Workshop 152 Expressing Queries (Lab) 5. What are the addresses of manufacturers with installed equipment? equipment JOIN (eqptmfgr = mfgrname) [manufacturers] [mfgraddr] Page 211


Download ppt "Feb 2001CSS/416:Module U1 Workshop 11 CSS/416 Data Design And Information Retrieval Workshop 1."

Similar presentations


Ads by Google