3 2 Software closed systems open expandable systems
3. 2 Software - closed systems - open (expandable) systems Application program package is a set of program, which can be used for solving problems from limited problem solving domain. This problem solving area is called package subject domain. Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
Drives Shafts Statistics Optimization Problemoriented packages Methodoriented packages . . . Instrumental system GG DBMS Dialog ES System sofware Basic software, OS Hardware Software structure Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
3. 3 Databases Dialog User interface *Data description lang. *Data manipulation lang. Database management system Database Forms etc. Database schema Data base is a collection of information organized in such a way that a computer program can quickly select desired pieces of data. Database management systems are working as stand alone or client-server systems. Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
Database as a complex: * reduces data redundancy and inconsistency * allows quick access to all data * allows multiaccess to data * organizes data protection for data adding and reading * organizes data restore operations * enables communication with application programs and as a dialogue with users conceptual level | logical level | physical level Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
Produsers Projects n: m Production series n: m Locations 1: 1 1: n Employees 1: n Heads n: 1 1: n Departments Part of a factory database Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
Entity-Relationship (ER) model Entity is an object, which exists and is different from others objects Example: Arnold Tara 35106250220 Entity set is a set of entities from the same type Example: The set of all persons, who are working in the “Ilmarine” factory is an entity set personnel or (employees) An entity is given by the set of attributes Example: name, phone nr. , name of department, project nr. are attributes of an employee Relationship is a connection between different entities Example: Savi works in design department Relationship set is a set of relationships between the same type of relationships In mathemathic it is a relation n>=2 on the sets of entities. Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
If E 1, E 2, …, En are sets of entities, then set of the relationships R is a subset of {(e 1, e 2, …, en)| e 1ÎE 1, e 2ÎE 2, … , enÎEn, } , where (e 1, e 2, … , en, ) is a relationship Savi Meri Tara Tuul 525 303 601 432 331 554 331 412 B 517 B 516 C 302 C 303 design dep. 31 000 tech. dep. 25 000 E - R diagram ph. nr. name dep. nr. room nr. employee budget w_dep. department Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
Relational Data Model Data are given by two-dimensional tables. Let sets D 1, D 2, … , Dn (not different) are given. Relation R on these n sets is a set of ordered corteges (d 1, d 2, … , dn), where d 1 Î D 1 , d 2 Î D 2 , … , dn Î Dn. Sets D 1, D 2, … , Dn are domains. Index n is the rank of relation R. From the other side one can say that relation R is given on the sets D 1, D 2, … , Dn if R is a subset of Cartesian product D 1 x D 2 x…x Dn Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
PRODUCTION( PROJECT(NUMBER: numeric NAME: text STARTYEAR: numeric ENDYEAR: numeric MANAGER: text COST: numeric) HEAD(NAME: text PHONENR: numeric ROOMNR: numeric PROJECTNR: numeric NREMLOYEES: numeric) EMPLOYEE(NAME: text DEPARTMENT: text HEADNAME: text PROJECTNR: numeric ROOMNR: numeric)) 32 AUTOMATBURNER 30 LIFT MK 16 43 COMPRESSOR 45 WATERSTATION 40 GASSTORAGE 37 GASSTORAGE 2003 2007 2004 2009 2006 2009 2004 2008 VALJASTE LAGRITS SAAGE LODJA VALJASTE TUPPITS 125000 280000 317000 543000 125000 87000 Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
START SCHEMA: PRODUCTION PROJECTS, WANTWD: SET OF PROJECT SUB: SUBSET OF PROJECTS IS WANTED SUB. COND: =PROJECT. ENDYEAR<=2008 OUTPUT: DISPLAY WANTED COMPUTE OUTPUT. PRINT END 32 AUTOMATBURNER 2003 2007 30 LIFT MK 16 2004 2007 37 GASSTORAGE 2004 2008 VALJASTE LAGRITS TUPPITS 125000 280000 87000 Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
Relational algebra Main operations: SELECT - select rows PROJECT - select colums 32 AUTOMATBURNER 30 LIFT MK 16 43 COMPRESSOR 45 WATERSTATION 40 GASSTORAGE 37 GASSTORAGE VALJASTE LAGRITS SAAGE LODJA VALJASTE TUPPITS JOIN - table joining (connecting) VALJASTE SAAGE LODJA 527314 B 711 701336 C 201 525506 B 101 32 AUTOMATBURNER 43 COMPRESSOR 45 WATERSTATION UNION INTERSECTION. . . VALJASTE SAAGE LODJA VALJASTE 527314 B 711 SAAGE 701336 C 201 LODJA 525506 B 101 Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
Query - by - Example This is a language and system as well e. name departm proj. nr. room nr. proj. nr. pr. name start end cost e. name departm proj. nr. room nr. Engineer P. _x Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
Hierarhical Data Model Includes sets of records, which are interconnected. Tree structures are main elements. Record includes data fields. Department nr. 1 Valjaste 525 314 Lathe 1 K 52 IMS INES Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
Network Data Model R 1 SET CODASYL R 2 Department set name is Personnel owner is Department member is Employee Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
Objekt-oriented data model OOP languages SIMULA 67 Smalltalk 80, C++, Java Conferences ECOOP OOPSLA Object-oriented=objects+classes+inheritance of classes Object based language Ada + classes Class based language CLU + inheritance of classes OO language SIMULA, Smalltalk Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
Basic concepts Object, a thing, being or concept(Phil). . . a language mechanism for binding data with methods (OO ). Three properties characterize objects: - identity - state - behavior Identity: the property of an object that distinguishes it from other objects. State: describes the data stored in the object Behavior: describes the methods in the object's interface by which the object can be used A method is a subroutine(or procedure) associated with a class (object). Methods have the special property that at runtime, they have access to data stored in an instance of the class (object). Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
Object protocol is a set of operations accepted by object. Obj. interaction sender Obj. 1 message sender message Obj. 2 method utilization Example: ellipse appears on the screen ellipse. draw() Object’s behavior – set of methods, accepted by object, is determined by the class. Objects with similar characteristics are grouped into classes. Class – The object is a class instance, which behavior is determined by the class. The object is using with other objects of the same class the same set of methods. The values of state variables of the objects from the same class are different. Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
Class inheritance Classes can inherit attributes and behavior from pre-existing classes called base classes, superclasses, or parent classes. The resulting classes are known as derived classes, subclasses, or child classes. The relationships of classes through inheritance give rise to a hierarchy. Inheritance -> code reuse. superclass inherit Inherit. part from supercl. subclass Special part for subclass Exact inheritance - inherited all the features of the upper class. Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
Inexact inheritance – some features of the upper class are modified or or deleted in sub-class. Single inheritance – - a subclass inherits a superclass properties Multiple inheritance - a subclass inherits the properties of several upper classes. vehicle car boat acyclic graph amphibious car In OODB the class definition is not only a pattern for creating new objects, but class in OODM and in OODB: - specifies the behavior of instances - is a set of objects with similar characteristics Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
interface Object 1) OID- obj. identity 2) state = {values of state variables (attributes) message 3) set of methods (M), determined by class message incapsulation Architecture of OODB Application program Data structure Methods of objects Data structures Traditional DB architecture stored in DB OODB architecture Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
OODB systems First commercial system has appeared in year 1987 - Gem. Stone. The most used software products have been: ONTOS Level 5 Object Open ODB Object Store Vision Nexpert Object. . . Application areas: - geoinfosystems - CAD - CAM - computer networks - real time problems. . . Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
A Conceptual Framework for Data Management in Mechanical CAD David L. Spooner, Martin Hardwick In: Geometric Modeling for CAD Applications Elsevier Science Publishers, 1988, 317 -329. pp. Main memory Database system Main memory data structuresd Virtual objects manager DBMS Files managerr. . . Network to other systems . . . Memories hierarchy for mechanical CAD systems: • DBMS manages large database queries. • Objects manager quickly founds the missing data elements • Objects manager is as an intermediate data model. • It allows the use of a variety of application programs and a variety of data models. Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
• Important is a way to connect systems into the environment : some of the data is transferred directly to the application programs over object manager. • The environment allows to communicate with others mechanical CAD system components over network. Various components of the scheme are developed and tested in Rensselaer Polytechnic Institute, NY, USA Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
Commercial database systems relational Fox. Pro Clipper Dataflex Paradox d. BASE II, DBASE III, IV Aston-Tate Ingres Informix Microsoft SQL Progress Sybase Oracle My. SQL Postgre. SQL free-ware Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
Technology of developing DB-s: 1. 2. 3. 4. 5. 6. Describing the scope of the model (conceptual model), choice of data structures. Choice of data model and DBMS Developing database schema. Developing user interface Data loading Preparation of standard queries • There are involved: analysts, developers, data acquisition related specialists, database administrator etc. • There exists a lot of environments which supports different operations (UML and Rational technology, CASE environments, SDK-s etc. ). Masinprojekteerimine * A. Kalja * Arvutitehnika instituut
- Slides: 25