250 likes | 378 Views
3.2 Software. - closed systems - open ( expandable ) s ystems. 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. Drives. Problem- oriented pa ckages.
E N D
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 Problem- oriented packages Shafts Statis- tics Opti- mization Method- oriented 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. Forms etc. Database management system Data- base Data- base 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 addingand reading * organizesdata restore operations * enables communication with application prog- rams and as a dialogue with users conceptual level | logicallevel | physical level Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Produsers Projects n:m 1:1 n:m 1:n Production series Heads 1:n Employees n:m n:1 1:n Departments Locations Part of a factory database Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Entity-Relationship (ER) model Entity is an object, which existsand is different from others objects Example:Arnold Tara 35106250220 Entity setis a set of entities from the same type Example:The set of all persons, who are working in the “Ilmarine” factory is an entity setpersonnelor(employees) An entity is given by the set of attributes Example:name, phone nr., name of department, project nr. are attributes of an employee Relationshipis a connection between different entities Example:Savi works in design department Relationship setis 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 E1, E2,…, Enare sets of entities, then set of the relationships R is a subset of {(e1, e2,…, en)| e1ÎE1, e2ÎE2, … , enÎEn, } , where (e1, e2, … , en,) is a relationship Savi 525 303 B517 Meri 601 432 B516 Tara 331 554 C302 Tuul 331 412 C303 design dep. 31 000 tech. dep. 25 000 E - R diagram ph.nr. dep. nr. name room nr. budget department employee w_dep. Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Relational Data Model Data are given by two-dimensional tables. Let sets D1, D2, … , Dn (not different) are given. Relation R on these n sets isa set of ordered corteges (d1, d2, … , dn), where d1Î D1 , d2Î D2 , … , dnÎ Dn . Sets D1, D2, … , 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 D1, D2, … , Dnif R is a subset ofCartesian product D1x D2 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 2003 2007 VALJASTE 125000 30 LIFT MK16 2004 2007 LAGRITS 280000 43 COMPRESSOR 2004 2009 SAAGE 317000 45 WATERSTATION2006 2009 LODJA 543000 40 GASSTORAGE2006 2009 VALJASTE 125000 37 GASSTORAGE2004 2008 TUPPITS 87000 Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
START SCHEMA:PRODUCTION PROJECTS,WANTWD:SET OF PROJECTSUB:SUBSET OF PROJECTS IS WANTED SUB.COND:=PROJECT.ENDYEAR<=2008OUTPUT:DISPLAY WANTEDCOMPUTE OUTPUT.PRINT END 32 AUTOMATBURNER 2003 2007 VALJASTE 125000 30 LIFT MK16 2004 2007 LAGRITS 280000 37 GASSTORAGE2004 2008 TUPPITS 87000 Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Relational algebra Main operations: SELECT - select rows PROJECT - select colums 32 AUTOMATBURNER VALJASTE 30 LIFT MK16 LAGRITS 43 COMPRESSOR SAAGE 45 WATERSTATION LODJA 40 GASSTORAGE VALJASTE 37 GASSTORAGE TUPPITS JOIN - table joining (connecting) VALJASTE 527314 B711 SAAGE 701336 C201 LODJA 525506 B101 32 AUTOMATBURNER VALJASTE 43 COMPRESSOR SAAGE 45 WATERSTATION LODJA 32 AUTOMATBURNER VALJASTE 43 COMPRESSOR SAAGE 45 WATERSTATION LODJA 527314 B711 701336 C201 525506 B101 UNION INTERSECTION ... Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Query - by - Example This is a language and system as well e.namedepartm proj. nr. room nr. proj. nr. pr. namestart endcost e.namedepartm 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 1K52 IMS INES Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Network Data Model R1 CODASYL SET R2 Department set name is Personnel owner is Department member is Employee Employee Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Objekt-orienteddata model OOP languages SIMULA 67 Smalltalk 80, C++, Java Conferences ECOOP OOPSLA Object-oriented=objects+classes+inheritance of classes Object based language + classes Class based language Ada + inheritance of classes CLU 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 protocolis a set of operations accepted by object. Obj. interaction sender sender message message Obj.2 Obj.1 methodutilization Example: ellipse appears on the screen ellipse 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 isdetermined 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 severalupper classes. vehicle acyclic graph car boat amphi- bious car • In OODB the class definition is not only a pattern forcreating 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 message 3) set of methods (M), determined by class message message incapsulation Architecture of OODB Application program Application program Data structure stored in DB Methods of objects Data structures TraditionalDB architecture OODB architecture Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
OODBsystems First commercial system has appeared in year 1987 - GemStone. 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 objectsmanager DBMS Files managerr ... ... Network to other systems • Memories hierarchy for mechanical CAD systems: • DBMS manages large database queries. • Objects managerquickly 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 andtested in Rensselaer Polytechnic Institute, NY, USA Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Commercial database systems relational FoxPro Clipper Dataflex Paradox dBASE II, DBASE III, IV Aston-Tate Ingres Informix Microsoft SQL Progress Sybase Oracle MySQL free-ware PostgreSQL Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Technology of developing DB-s: • 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