Presentation is loading. Please wait.

Presentation is loading. Please wait.

Databases CIS 422. Lifetime of Data Transient results to the evaluations of expression Variables involved in procedure activation Global variables Dynamically.

Similar presentations


Presentation on theme: "Databases CIS 422. Lifetime of Data Transient results to the evaluations of expression Variables involved in procedure activation Global variables Dynamically."— Presentation transcript:

1 Databases CIS 422

2 Lifetime of Data Transient results to the evaluations of expression Variables involved in procedure activation Global variables Dynamically allocated variables Data that exists between executions Data that exits between versions Data that outlives a program

3 Essentials to Provide Persistence Object ID Properties and relationships Scale of the store Stability of the store

4 Database vs File System Marketing Engineering Accounting DBMS Database Sales Accounts Employee Inventory Customer Parts Engineering Marketing Accounting Parts Customer Inventory Accounts

5 Database A collection of related data Represents some aspect of the real world Is a logically coherent collection of data with some inherent meaning Is designed, built, and populated with data for a specific purpose.

6 Database Management Systems Data Schema Program Independence Views

7 Hierarchical Model Motor Vehicle BusTruckCar

8 Network Model Customer Soup Order

9 Relational Model Soup-ID Soup Name Price Cust-ID Name Address Phone Order-ID Soup-ID Cust-ID Qty

10 Database Interface Approaches Data Definition Language CREATE TABLE inventory (inventory-number CHAR(20)NOT NULL description CHAR(25)NOT NULL price DECIMAL (9,2) Data Manipulation Language

11 Shareability Transactions Commit Abort Atomicity

12 Concurrency Locking Conservative Locking Policy Read Locks Write Locks

13 Object Oriented vs Traditional Objects are active components OO Databases have inheritance Allow storage in the form of objects

14 OODBMS - OO Part The system must support complex objects Object identity must be supported Objects must be encapsulated The system must support types or classes The system must support inheritance The system must avoid premature binding The system will be computationally complete The system must be extensible

15 OODBMS - DB Part It must be persistent, able to remember object state It must be able to manage very large databases It must accept concurrent users It must be able to recover from hardware and software failures Data query must be simple

16 Complex Objects Job Object OID eee Emp# E001 PositionSalary 50,000 ENAME Smith DEPT# D01 Budget 1,000,000 DNAME Mktg MgrEmpsOID ddd OID sss …... OID’s of Employee Objects

17 Object Data Management Group Model Parts Literals Objects (OID) –system assigned –not dependent on attribute values –conceptual address Collections

18 Abstract Types - Interfaces Inherit signatures of operations Noninstantiable Behaviour Inheritance –Supertype must be an interface –Subtype may be interface or class

19 Classes Specifies both attributes and behavior Instantiable Class Inheritance –supertype must be a class –subtype must be a class

20 Relationships Inverses 1-1 n-1 n-m

21 Persistent Objects Naming & Extents Reachablility Key

22 Company Schema Worker calcDeductions calcPay Employee string name string ssn int dependents Salaried double salary Hourly double hours double rate department n1 office 11

23 Representation interface Worker { method double calcDeductions(); method double calcpay(); }; class Employee : Worker ( extent workers key ssn) { atttribute string name attribute string ssn attribute int dependents relationship Department worksIn inverse Department::hasEmployees relationship Office residesAt inverse Office::houses }

24 Representation Continued class Salaried extends Employee ( extent salaried) { attribute double salary } class Department ( extent departments key number) { attribute int number attribute string name relationship set hasEmployees inverse Employee::worksIn }

25 Table-Class Mapping costcolormakemodelcar Cost color make model

26 Table-Multiple Classes Mapping nameaddresscustIDempID Employee name address empID Customer name address custID

27 Table-Inheritance Classes Mapping Employee name ssn address HourlyEmp wage SalariedEmp salary nameaddressssnwagesalary

28 Instance Relationships NameDepartmentID Name deparmentID ssn salary Department name departmentID Employee name salary ssn

29 Client Sends message to server Manages user interface –validate data –dispatch requests Solution specific logic GUI

30 Server Fulfills the client request Usually does database access functions File server Transaction server Located separate from client

31 Basic Characteristics of Client-Server Apps Front-end client acts with back-end server The two tasks have fundamentally different needs Environment is generally heterogeneous and multivendor Scalability

32 Common Components User Interface Business Processing Database Processing

33 Distributed Processing Processing divided up between processes Objects can be distributed and accessed by users across a network


Download ppt "Databases CIS 422. Lifetime of Data Transient results to the evaluations of expression Variables involved in procedure activation Global variables Dynamically."

Similar presentations


Ads by Google