Need for Complex Data Types The O-O Data Model O-O Languages. Persistent C++ Systems. Object-Relational Databases. Object-Oriented Oriented Databases

Μέγεθος: px
Εμφάνιση ξεκινά από τη σελίδα:

Download "Need for Complex Data Types The O-O Data Model O-O Languages. Persistent C++ Systems. Object-Relational Databases. Object-Oriented Oriented Databases"

Transcript

1 Αντικείµενα στις Β Object-Oriented Databases Need for Complex Data Types The O-O Data Model O-O Languages Persistent Programming Languages Persistent C++ Systems Object-Relational Databases Nested Relations Complex Types and Object Orientation Querying with Complex Types Creation of Complex Values and Objects Comparison of O-O and O-R Databases Βασική πηγή διαφανειών: Silberschatz et al., Database System Concepts, 4/e Εργαστήριο Πληροφοριακών Συστηµάτων, Παν/µιο Πειραιώς ( έκδοση: Νοέµβριος 2007 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Object-Oriented Oriented Databases Need for Complex Data Types The O-O Data Model O-O Languages Persistent Programming Languages Persistent C++ Systems 2 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.1

2 Need for Complex Data Types Traditional database applications in data processing had conceptually simple data types Relatively few data types, first normal form holds Complex data types have grown more important in recent years E.g. Addresses can be viewed as a Single string, or Separate attributes for each part, or Composite attributes (which are not in first normal form) E.g. it is often convenient to store multivalued attributes as-is, without creating a separate relation to store the values in first normal form Applications computer-aided design, computer-aided software engineering multimedia and image databases, and document/hypertext databases. 3 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Object-Oriented Oriented Data Model Loosely speaking, an object corresponds to an entity in the E- R model. The object-oriented paradigm is based on encapsulating code and data related to an object into single unit. The object-oriented data model is a logical data model (like the E-R model). Adaptation of the object-oriented programming paradigm (e.g., Smalltalk, C++) to database systems. 4 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.2

3 Object Structure An object has associated with it: A set of variables that contain the data for the object. The value of each variable is itself an object. A set of messages to which the object responds; each message may have zero, one, or more parameters. A set of methods, each of which is a body of code to implement a message; a method returns a value as the response to the message The physical representation of data is visible only to the implementor of the object Messages and responses provide the only external interface to an object. The term message does not necessarily imply physical message passing. Messages can be implemented as procedure invocations. 5 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Messages and Methods Methods are programs written in general-purpose language with the following features only variables in the object itself may be referenced directly data in other objects are referenced only by sending messages. Methods can be read-only or update methods Read-only methods do not change the value of the object Strictly speaking, every attribute of an entity must be represented by a variable and two methods, one to read and the other to update the attribute e.g., the attribute address is represented by a variable address and two messages get-address and set-address. For convenience, many object-oriented data models permit direct access to variables of other objects. 6 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.3

4 Object Classes Similar objects are grouped into a class; each such object is called an instance of its class All objects in a class have the same Variables, with the same types message interface methods The may differ in the values assigned to variables Example: Group objects for people into a person class Classes are analogous to entity sets in the E-R model 7 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Class Definition Example class employee { }; /*Variables */ string name; string address; date start-date; int salary; /* Messages */ int annual-salary(); string get-name(); string get-address(); int set-address(string new-address); int employment-length(); Methods to read and set the other variables are also needed with strict encapsulation Methods are defined separately E.g. int employment-length() { return today() start-date;} int set-address(string new-address) { address = newaddress;} 8 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.4

5 Inheritance E.g., class of bank customers is similar to class of bank employees, although there are differences both share some variables and messages, e.g., name and address. But there are variables and messages specific to each class e.g., salary for employees and credit-rating for customers. Every employee is a person; thus employee is a specialization of person Similarly, customer is a specialization of person. Create classes person, employee and customer variables/messages applicable to all persons associated with class person. variables/messages specific to employees associated with class employee; similarly for customer 9 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Inheritance (Cont.) Place classes into a specialization/is-a hierarchy variables/messages belonging to class person are inherited by class employee as well as customer Result is a class hierarchy Note analogy with ISA Hierarchy in the E-R model 10 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.5

6 Class Hierarchy Definition class person{ string name; string address: }; class customer isa person { int credit-rating; }; class employee isa person { date start-date; int salary; }; class officer isa employee { int office-number, int expense-account-number, };. 11 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Class Hierarchy Example (Cont.) Full variable list for objects in the class officer: office-number, expense-account-number: defined locally start-date, salary: inherited from employee name, address: inherited from person Methods inherited similar to variables. Substitutability any method of a class, say person, can be invoked equally well with any object belonging to any subclass, such as subclass officer of person. Class extent: set of all objects in the class. Two options: 1. Class extent of employee includes all officer, teller and secretary objects. 2. Class extent of employee includes only employee objects that are not in a subclass such as officer, teller, or secretary This is the usual choice in OO systems Can access extents of subclasses to find all objects of subtypes of employee 12 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.6

7 Example of Multiple Inheritance Class DAG for banking example. 13 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Multiple Inheritance With multiple inheritance a class may have more than one superclass. The class/subclass relationship is represented by a directed acyclic graph (DAG) Particularly useful when objects can be classified in more than one way, which are independent of each other E.g. temporary/permanent is independent of Officer/secretary/teller Create a subclass for each combination of subclasses Need not create subclasses for combinations that are not possible in the database being modeled A class inherits variables and methods from all its superclasses There is potential for ambiguity when a variable/message N with the same name is inherited from two superclasses A and B No problem if the variable/message is defined in a shared superclass Otherwise, do one of the following flag as an error, rename variables (A.N and B.N) choose one. 14 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.7

8 More Examples of Multiple Inheritance Conceptually, an object can belong to each of several subclasses A person can play the roles of student, a teacher or footballplayer, or any combination of the three E.g., student teaching assistant who also play football Can use multiple inheritance to model roles of an object That is, allow an object to take on any one or more of a set of types But many systems insist an object should have a most-specific class That is, there must be one class that an object belongs to which is a subclass of all other classes that the object belongs to Create subclasses such as student-teacher and student-teacher-footballplayer for each combination When many combinations are possible, creating subclasses for each combination can become cumbersome 15 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Object Identity An object retains its identity even if some or all of the values of variables or definitions of methods change over time. Object identity is a stronger notion of identity than in programming languages or data models not based on object orientation. Value data value; e.g. primary key value used in relational systems. Name supplied by user; used for variables in procedures. Built-in identity built into data model or programming language. no user-supplied identifier is required. Is the form of identity used in object-oriented systems. 16 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.8

9 Object Identifiers Object identifiers used to uniquely identify objects Object identifiers are unique: no two objects have the same identifier each object has only one object identifier E.g., the spouse field of a person object may be an identifier of another person object. can be stored as a field of an object, to refer to another object. Can be system generated (created by database) or external (such as social-security number) System generated identifiers: Are easier to use, but cannot be used across database systems May be redundant if unique identifier already exists 17 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Object Containment Each component in a design may contain other components Can be modeled as containment of objects. Objects containing; other objects are called composite objects. Multiple levels of containment create a containment hierarchy links interpreted as is-part-of, not is-a. Allows data to be viewed at different granularities by different users. 18 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.9

10 Object-Oriented Oriented Languages Object-oriented concepts can be used in different ways Object-orientation can be used as a design tool, and be encoded into, for example, a relational database analogous to modeling data with E-R diagram and then converting to a set of relations) The concepts of object orientation can be incorporated into a programming language that is used to manipulate the database. Object-relational systems add complex types and objectorientation to relational language. Persistent programming languages extend objectoriented programming language to deal with databases by adding concepts such as persistence and collections. 19 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Persistent Programming Languages Persistent Programming languages allow objects to be created and stored in a database, and used directly from a programming language allow data to be manipulated directly from the programming language No need to go through SQL. No need for explicit format (type) changes format changes are carried out transparently by system Without a persistent programming language, format changes becomes a burden on the programmer More code to be written More chance of bugs allow objects to be manipulated in-memory no need to explicitly load from or store to the database Saved code, and saved overhead of loading/storing large amounts of data 20 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.10

11 Persistent Prog.. Languages (Cont.) Drawbacks of persistent programming languages Due to power of most programming languages, it is easy to make programming errors that damage the database. Complexity of languages makes automatic high-level optimization more difficult. Do not support declarative querying as well as relational databases 21 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Persistence of Objects Approaches to make transient objects persistent include establishing Persistence by Class declare all objects of a class to be persistent; simple but inflexible. Persistence by Creation extend the syntax for creating objects to specify that that an object is persistent. Persistence by Marking an object that is to persist beyond program execution is marked as persistent before program termination. Persistence by Reachability - declare (root) persistent objects; objects are persistent if they are referred to (directly or indirectly) from a root object. Easier for programmer, but more overhead for database system Similar to garbage collection used e.g. in Java, which also performs reachability tests 22 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.11

12 Object Identity and Pointers A persistent object is assigned a persistent object identifier. Degrees of permanence of identity: Intraprocedure identity persists only during the executions of a single procedure Intraprogram identity persists only during execution of a single program or query. Interprogram identity persists from one program execution to another, but may change if the storage organization is changed Persistent identity persists throughout program executions and structural reorganizations of data; required for object-oriented systems. 23 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Object Identity and Pointers (Cont.) In O-O languages such as C++, an object identifier is actually an in-memory pointer. Persistent pointer persists beyond program execution can be thought of as a pointer into the database E.g. specify file identifier and offset into the file Problems due to database reorganization have to be dealt with by keeping forwarding pointers 24 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.12

13 Storage and Access of Persistent Objects How to find objects in the database: Name objects (as you would name files) Cannot scale to large number of objects. Typically given only to class extents and other collections of objects, but not objects. Expose object identifiers or persistent pointers to the objects Can be stored externally. All objects have object identifiers. Store collections of objects, and allow programs to iterate over the collections to find required objects Model collections of objects as collection types Class extent - the collection of all objects belonging to the class; usually maintained for all classes that can have persistent objects. 25 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Persistent C++ Systems C++ language allows support for persistence to be added without changing the language Declare a class called Persistent_Object with attributes and methods to support persistence Overloading ability to redefine standard function names and operators (i.e., +,, the pointer deference operator >) when applied to new types Template classes help to build a type-safe type system supporting collections and persistent types. Providing persistence without extending the C++ language is relatively easy to implement but more difficult to use Persistent C++ systems that add features to the C++ language have been built, as also systems that avoid changing the language 26 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.13

14 ODMG C++ Object Definition Language The Object Database Management Group is an industry consortium aimed at standardizing object-oriented databases in particular persistent programming languages Includes standards for C++, Smalltalk and Java ODMG-93 ODMG-2.0 and 3.0 (which is 2.0 plus extensions to Java) Our description based on ODMG-2.0 ODMG C++ standard avoids changes to the C++ language provides functionality via template classes and class libraries 27 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης ODMG Types Template class d_ref<class> used to specify references (persistent pointers) Template class d_set<class> used to define sets of objects. Methods include insert_element(e) and delete_element(e) Other collection classes such as d_bag (set with duplicates allowed), d_list and d_varray (variable length array) also provided. d_ version of many standard types provided, e.g. d_long and d_string Interpretation of these types is platform independent Dynamically allocated data (e.g. for d_string) allocated in the database, not in main memory 28 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.14

15 ODMG C++ ODL: Example class Branch : public d_object {. } class Person : public d_object { public: d_string name; // should not use String! }; d_string address; class Account : public d_object { private: d_long balance; public: d_long number; d_set <d_ref<customer>> owners; int find_balance(); int update_balance(int delta); }; 29 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Object-Relational Databases Nested Relations Complex Types and Object Orientation Querying with Complex Types Creation of Complex Values and Objects Comparison of O-O and O-R Databases 30 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.15

16 Nested Relations Motivation: Permit non-atomic domains (atomic indivisible) Example of non-atomic domain: set of integers,or set of tuples Allows more intuitive modeling for applications with complex data Intuitive definition: allow relations whenever we allow atomic (scalar) values relations within relations Retains mathematical foundation of relational model Violates first normal form. 31 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Example of a Nested Relation Example: library information system Each book has title, a set of authors, Publisher, and a set of keywords Non-1NF relation books 32 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.16

17 1NF Version of Nested Relation 1NF version of books flat-books 33 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 4NF Decomposition of Nested Relation Remove awkwardness of flat-books by assuming that the following multivalued dependencies hold: title title title author keyword pub-name, pub-branch Decompose flat-doc into 4NF using the schemas: (title, author) (title, keyword) (title, pub-name, pub-branch) 34 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.17

18 4NF Decomposition of flat books 35 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Problems with 4NF Schema 4NF design requires users to include joins in their queries. 1NF relational view flat-books defined by join of 4NF relations: eliminates the need for users to perform joins, but loses the one-to-one correspondence between tuples and documents. And has a large amount of redundancy Nested relations representation is much more natural here. 36 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.18

19 Complex Types and SQL:1999 Extensions to SQL to support complex types include: Collection and large object types Nested relations are an example of collection types Structured types Nested record structures like composite attributes Inheritance Object orientation Including object identifiers and references Our description is mainly based on the SQL:1999 standard Not fully implemented in any database system currently But some features are present in each of the major commercial database systems Read the manual of your database system to see what it supports We present some features that are not in SQL:1999 These are noted explicitly 37 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Collection Types Set type (not in SQL:1999) create table books (.. keyword-set setof(varchar(20)) ) Sets are an instance of collection types. Other instances include Arrays (are supported in SQL:1999) E.g. author-array varchar(20) array[10] Can access elements of array in usual fashion: E.g. author-array[1] Multisets (not supported in SQL:1999) I.e., unordered collections, where an element may occur multiple times Nested relations are sets of tuples SQL:1999 supports arrays of tuples 38 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.19

20 Large Object Types Large object types clob: Character large objects book-review clob(10kb) blob: binary large objects image blob(10mb) movie blob (2GB) JDBC/ODBC provide special methods to access large objects in small pieces Similar to accessing operating system files Application retrieves a locator for the large object and then manipulates the large object from the host language 39 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Structured and Collection Types Structured types can be declared and used in SQL create type Publisher as (name varchar(20), branch varchar(20)) create type Book as (title varchar(20), author-array varchar(20) array [10], pub-date date, publisher Publisher, keyword-set setof(varchar(20))) Note: setof declaration of keyword-set is not supported by SQL:1999 Using an array to store authors lets us record the order of the authors Structured types can be used to create tables create table books of Book Similar to the nested relation books, but with array of authors instead of set 40 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.20

21 Structured and Collection Types (Cont.) Structured types allow composite attributes of E-R diagrams to be represented directly. Unnamed row types can also be used in SQL:1999 to define composite attributes E.g. we can omit the declaration of type Publisher and instead use the following in declaring the type Book publisher row (name varchar(20), branch varchar(20)) Similarly, collection types allow multivalued attributes of E- R diagrams to be represented directly. 41 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Structured Types (Cont.) We can create tables without creating an intermediate type For example, the table books could also be defined as follows: create table books (title varchar(20), author-array varchar(20) array[10], pub-date date, publisher Publisher keyword-list setof(varchar(20))) Methods can be part of the type definition of a structured type: create type Employee as ( name varchar(20), salary integer) method giveraise (percent integer) We create the method body separately create method giveraise (percent integer) for Employee begin set self.salary = self.salary + (self.salary * percent) / 100; end 42 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.21

22 Creation of Values of Complex Types Values of structured types are created using constructor functions E.g. Publisher( McGraw-Hill, New York ) Note: a value is not an object SQL:1999 constructor functions E.g. create function Publisher (n varchar(20), b varchar(20)) returns Publisher begin set name=n; set branch=b; end Every structured type has a default constructor with no arguments, others can be defined as required Values of row type can be constructed by listing values in parantheses E.g. given row type row (name varchar(20), branch varchar(20)) We can assign (`McGraw-Hill,`New York ) as a value of above type 43 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Creation of Values of Complex Types Array construction array [ Silberschatz,`Korth,`Sudarshan ] Set value attributes (not supported in SQL:1999) set( v1, v2,, vn) To create a tuple of the books relation ( Compilers, array[`smith,`jones ], Publisher(`McGraw-Hill,`New York ), set(`parsing,`analysis )) To insert the preceding tuple into the relation books insert into books values (`Compilers, array[`smith,`jones ], Publisher( McGraw Hill,`New York ), set(`parsing,`analysis )) 44 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.22

23 Inheritance Suppose that we have the following type definition for people: create type Person (name varchar(20), address varchar(20)) Using inheritance to define the student and teacher types create type Student under Person (degree varchar(20), department varchar(20)) create type Teacher under Person (salary integer, department varchar(20)) Subtypes can redefine methods by using overriding method in place of method in the method declaration 45 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Multiple Inheritance SQL:1999 does not support multiple inheritance If our type system supports multiple inheritance, we can define a type for teaching assistant as follows: create type Teaching Assistant under Student, Teacher To avoid a conflict between the two occurrences of department we can rename them create type Teaching Assistant under Student with (department as student-dept), Teacher with (department as teacher-dept) 46 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.23

24 Reference Types Object-oriented languages provide the ability to create and refer to objects. In SQL:1999 References are to tuples, and References must be scoped, I.e., can only point to tuples in one specified table We will study how to define references first, and later see how to use references 47 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Reference Declaration in SQL:1999 E.g. define a type Department with a field name and a field head which is a reference to the type Person, with table people as scope create type Department( name varchar(20), head ref(person) scope people) We can then create a table departments as follows create table departments of Department We can omit the declaration scope people from the type declaration and instead make an addition to the create table statement: create table departments of Department (head with options scope people) 48 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.24

25 Initializing Reference Typed Values In Oracle, to create a tuple with a reference value, we can first create the tuple with a null reference and then set the reference separately by using the function ref(p) applied to a tuple variable E.g. to create a department with name CS and head being the person named John, we use insert into departments values (`CS, null) update departments set head = (select ref(p) from people as p where name=`john ) where name = `CS 49 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Initializing Reference Typed Values (Cont.) SQL:1999 does not support the ref() function, and instead requires a special attribute to be declared to store the object identifier The self-referential attribute is declared by adding a ref is clause to the create table statement: create table people of Person ref is oid system generated Here, oid is an attribute name, not a keyword. To get the reference to a tuple, the subquery shown earlier would use select p.oid instead of select ref(p) 50 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.25

26 User Generated Identifiers SQL:1999 allows object identifiers to be user-generated The type of the object-identifier must be specified as part of the type definition of the referenced table, and The table definition must specify that the reference is user generated E.g. create type Person (name varchar(20) address varchar(20)) ref using varchar(20) create table people of Person ref is oid user generated When creating a tuple, we must provide a unique value for the identifier (assumed to be the first attribute): insert into people values ( , John, `23 Coyote Run ) 51 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης User Generated Identifiers (Cont.) We can then use the identifier value when inserting a tuple into departments Avoids need for a separate query to retrieve the identifier: E.g. insert into departments values(`cs, ` ) It is even possible to use an existing primary key value as the identifier, by including the ref from clause, and declaring the reference to be derived create type Person (name varchar(20) primary key, address varchar(20)) ref from(name) create table people of Person ref is oid derived When inserting a tuple for departments, we can then use insert into departments values(`cs,`john ) 52 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.26

27 Path Expressions Find the names and addresses of the heads of all departments: select head >name, head >address from departments An expression such as head >name is called a path expression Path expressions help avoid explicit joins If department head were not a reference, a join of departments with people would be required to get at the address Makes expressing the query much easier for the user 53 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Querying with Structured Types Find the title and the name of the publisher of each book. select title, publisher.name from books Note the use of the dot notation to access fields of the composite attribute (structured type) publisher 54 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.27

28 Collection-Value Attributes Collection-valued attributes can be treated much like relations, using the keyword unnest The books relation has array-valued attribute author-array and setvalued attribute keyword-set To find all books that have the word database as one of their keywords, select title from books where database in (unnest(keyword-set)) Note: Above syntax is valid in SQL:1999, but the only collection type supported by SQL:1999 is the array type To get a relation containing pairs of the form title, author-name for each book and each author of the book select B.title, A from books as B, unnest (B.author-array) as A 55 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Collection Valued Attributes (Cont.) We can access individual elements of an array by using indices E.g. If we know that a particular book has three authors, we could write: select author-array[1], author-array[2], author-array[3] from books where title = `Database System Concepts 56 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.28

29 Unnesting The transformation of a nested relation into a form with fewer (or no) relation-valued attributes is called unnesting. E.g. select title, A as author, publisher.name as pub_name, publisher.branch as pub_branch, K as keyword from books as B, unnest(b.author-array) as A, unnest (B.keyword-list) as K 57 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Nesting Nesting is the opposite of unnesting, creating a collection-valued attribute NOTE: SQL:1999 does not support nesting Nesting can be done in a manner similar to aggregation, but using the function set() in place of an aggregation operation, to create a set To nest the flat-books relation on the attribute keyword: select title, author, Publisher(pub_name, pub_branch) as publisher, set(keyword) as keyword-list from flat-books groupby title, author, publisher To nest on both authors and keywords: select title, set(author) as author-list, Publisher(pub_name, pub_branch) as publisher, set(keyword) as keyword-list from flat-books groupby title, publisher 58 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.29

30 Nesting (Cont.) Another approach to creating nested relations is to use subqueries in the select clause. select title, ( select author from flat-books as M where M.title=O.title) as author-set, Publisher(pub-name, pub-branch) as publisher, (select keyword from flat-books as N where N.title = O.title) as keyword-set from flat-books as O Can use orderby clause in nested query to get an ordered collection Can thus create arrays, unlike earlier approach 59 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Functions and Procedures SQL:1999 supports functions and procedures Functions/procedures can be written in SQL itself, or in an external programming language Functions are particularly useful with specialized data types such as images and geometric objects E.g. functions to check if polygons overlap, or to compare images for similarity Some databases support table-valued functions, which can return a relation as a result SQL:1999 also supports a rich set of imperative constructs, including Loops, if-then-else, assignment Many databases have proprietary procedural extensions to SQL that differ from SQL: ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.30

31 SQL Functions Define a function that, given a book title, returns the count of the number of authors (on the 4NF schema with relations books4 and authors). create function author-count(name varchar(20)) returns integer begin declare a-count integer; select count(author) into a-count from authors where authors.title=name return a=count; end Find the titles of all books that have more than one author. select name from books4 where author-count(title)> 1 61 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης SQL Methods Methods can be viewed as functions associated with structured types They have an implicit first parameter called self which is set to the structured-type value on which the method is invoked The method code can refer to attributes of the structured-type value using the self variable E.g. self.a 62 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.31

32 SQL Functions and Procedures (cont.) The author-count function could instead be written as procedure: create procedure author-count-proc (in title varchar(20), out a-count integer) begin select count(author) into a-count from authors where authors.title = title end Procedures can be invoked either from an SQL procedure or from embedded SQL, using the call statement. E.g. from an SQL procedure declare a-count integer; call author-count-proc(`database systems Concepts, a-count); SQL:1999 allows more than one function/procedure of the same name (called name overloading), as long as the number of arguments differ, or at least the types of the arguments differ 63 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης External Language Functions/Procedures SQL:1999 permits the use of functions and procedures written in other languages such as C or C++ Declaring external language procedures and functions create procedure author-count-proc(in title varchar(20), out count integer) language C external name /usr/avi/bin/author-count-proc create function author-count(title varchar(20)) returns integer language C external name /usr/avi/bin/author-count 64 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.32

33 External Language Routines (Cont.) Benefits of external language functions/procedures: more efficient for many operations, and more expressive power Drawbacks Code to implement function may need to be loaded into database system and executed in the database system s address space risk of accidental corruption of database structures security risk, allowing users access to unauthorized data There are alternatives, which give good security at the cost of potentially worse performance Direct execution in the database system s space is used when efficiency is more important than security 65 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Procedural Constructs SQL:1999 supports a rich variety of procedural constructs Compound statement is of the form begin end, may contain multiple SQL statements between begin and end. Local variables can be declared within a compound statements While and repeat statements declare n integer default 0; while n < 10 do set n = n+1 end while repeat set n = n 1 until n = 0 end repeat 66 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.33

34 Procedural Constructs (Cont.) For loop Permits iteration over all results of a query E.g. find total of all balances at the Perryridge branch declare n integer default 0; for r as select balance from account where branch-name = Perryridge do set n = n + r.balance end for 67 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης Procedural Constructs (cont.) Conditional statements (if-then-else) E.g. To find sum of balances for each of three categories of accounts (with balance <1000, >=1000 and <5000, >= 5000) if r.balance < 1000 then set l = l + r.balance elseif r.balance < 5000 then set m = m + r.balance else set h = h + r.balance end if SQL:1999 also supports a case statement similar to C case statement Signaling of exception conditions, and declaring handlers for exceptions declare out_of_stock condition declare exit handler for out_of_stock begin.. signal out-of-stock end The handler here is exit -- causes enclosing begin..end to be exited Other actions possible on exception 68 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.34

35 Comparison of O-O O O and O-R O R Databases Summary of strengths of various database systems: Relational systems simple data types, powerful query languages, high protection. Persistent-programming-language-based OODBs complex data types, integration with programming language, high performance. Object-relational systems complex data types, powerful query languages, high protection. Note: Many real systems blur these boundaries E.g. persistent programming language built as a wrapper on a relational database offers first two benefits, but may have poor performance. 69 ΠΑ.ΠΕΙ. Γιάννης Θεοδωρίδης 10.35

Βάσεις Δεδομένων σχεσιακών αντικειμένων Βάσεις Δεδομένων Διδάσκων: Μ. Χαλκίδη

Βάσεις Δεδομένων σχεσιακών αντικειμένων Βάσεις Δεδομένων Διδάσκων: Μ. Χαλκίδη Βάσεις Δεδομένων σχεσιακών αντικειμένων Βάσεις Δεδομένων Διδάσκων: Μ. Χαλκίδη με βάση slides από A. Silberschatz, H. Korth, S. Sudarshan, Database System Concepts, 5 th edition Object-Relational Data Models

Διαβάστε περισσότερα

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων Εξάμηνο 7 ο Procedures and Functions Stored procedures and functions are named blocks of code that enable you to group and organize a series of SQL and PL/SQL

Διαβάστε περισσότερα

EE512: Error Control Coding

EE512: Error Control Coding EE512: Error Control Coding Solution for Assignment on Finite Fields February 16, 2007 1. (a) Addition and Multiplication tables for GF (5) and GF (7) are shown in Tables 1 and 2. + 0 1 2 3 4 0 0 1 2 3

Διαβάστε περισσότερα

EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 5: Component Adaptation Environment (COPE)

EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 5: Component Adaptation Environment (COPE) EPL 603 TOPICS IN SOFTWARE ENGINEERING Lab 5: Component Adaptation Environment (COPE) Performing Static Analysis 1 Class Name: The fully qualified name of the specific class Type: The type of the class

Διαβάστε περισσότερα

ΓΡΑΜΜΙΚΟΣ & ΔΙΚΤΥΑΚΟΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ

ΓΡΑΜΜΙΚΟΣ & ΔΙΚΤΥΑΚΟΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ ΓΡΑΜΜΙΚΟΣ & ΔΙΚΤΥΑΚΟΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ Ενότητα 12: Συνοπτική Παρουσίαση Ανάπτυξης Κώδικα με το Matlab Σαμαράς Νικόλαος Άδειες Χρήσης Το παρόν εκπαιδευτικό υλικό υπόκειται σε άδειες χρήσης Creative Commons.

Διαβάστε περισσότερα

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων Εξάμηνο 7 ο Oracle SQL Developer An Oracle Database stores and organizes information. Oracle SQL Developer is a tool for accessing and maintaining the data

Διαβάστε περισσότερα

department listing department name αχχουντσ ϕανε βαλικτ δδσϕηασδδη σδηφγ ασκϕηλκ τεχηνιχαλ αλαν ϕουν διξ τεχηνιχαλ ϕοην µαριανι

department listing department name αχχουντσ ϕανε βαλικτ δδσϕηασδδη σδηφγ ασκϕηλκ τεχηνιχαλ αλαν ϕουν διξ τεχηνιχαλ ϕοην µαριανι She selects the option. Jenny starts with the al listing. This has employees listed within She drills down through the employee. The inferred ER sttricture relates this to the redcords in the databasee

Διαβάστε περισσότερα

Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016

Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016 Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Dynamic types, Lambda calculus machines Apr 21 22, 2016 1 Dynamic types and contracts (a) To make sure you understand the

Διαβάστε περισσότερα

Instruction Execution Times

Instruction Execution Times 1 C Execution Times InThisAppendix... Introduction DL330 Execution Times DL330P Execution Times DL340 Execution Times C-2 Execution Times Introduction Data Registers This appendix contains several tables

Διαβάστε περισσότερα

Physical DB Design. B-Trees Index files can become quite large for large main files Indices on index files are possible.

Physical DB Design. B-Trees Index files can become quite large for large main files Indices on index files are possible. B-Trees Index files can become quite large for large main files Indices on index files are possible 3 rd -level index 2 nd -level index 1 st -level index Main file 1 The 1 st -level index consists of pairs

Διαβάστε περισσότερα

2 Composition. Invertible Mappings

2 Composition. Invertible Mappings Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan Composition. Invertible Mappings In this section we discuss two procedures for creating new mappings from old ones, namely,

Διαβάστε περισσότερα

The Simply Typed Lambda Calculus

The Simply Typed Lambda Calculus Type Inference Instead of writing type annotations, can we use an algorithm to infer what the type annotations should be? That depends on the type system. For simple type systems the answer is yes, and

Διαβάστε περισσότερα

Assalamu `alaikum wr. wb.

Assalamu `alaikum wr. wb. LUMP SUM Assalamu `alaikum wr. wb. LUMP SUM Wassalamu alaikum wr. wb. Assalamu `alaikum wr. wb. LUMP SUM Wassalamu alaikum wr. wb. LUMP SUM Lump sum lump sum lump sum. lump sum fixed price lump sum lump

Διαβάστε περισσότερα

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων Εξάμηνο 7 ο JDBC JDBC is a set of classes and interfaces written in Java that allows Java programs to send SQL statements to a database like Oracle JDBC

Διαβάστε περισσότερα

Section 8.3 Trigonometric Equations

Section 8.3 Trigonometric Equations 99 Section 8. Trigonometric Equations Objective 1: Solve Equations Involving One Trigonometric Function. In this section and the next, we will exple how to solving equations involving trigonometric functions.

Διαβάστε περισσότερα

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3 Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3 1 State vector space and the dual space Space of wavefunctions The space of wavefunctions is the set of all

Διαβάστε περισσότερα

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch: HOMEWORK 4 Problem a For the fast loading case, we want to derive the relationship between P zz and λ z. We know that the nominal stress is expressed as: P zz = ψ λ z where λ z = λ λ z. Therefore, applying

Διαβάστε περισσότερα

Approximation of distance between locations on earth given by latitude and longitude

Approximation of distance between locations on earth given by latitude and longitude Approximation of distance between locations on earth given by latitude and longitude Jan Behrens 2012-12-31 In this paper we shall provide a method to approximate distances between two points on earth

Διαβάστε περισσότερα

(C) 2010 Pearson Education, Inc. All rights reserved.

(C) 2010 Pearson Education, Inc. All rights reserved. Connectionless transmission with datagrams. Connection-oriented transmission is like the telephone system You dial and are given a connection to the telephone of fthe person with whom you wish to communicate.

Διαβάστε περισσότερα

Homework 3 Solutions

Homework 3 Solutions Homework 3 Solutions Igor Yanovsky (Math 151A TA) Problem 1: Compute the absolute error and relative error in approximations of p by p. (Use calculator!) a) p π, p 22/7; b) p π, p 3.141. Solution: For

Διαβάστε περισσότερα

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required) Phys460.nb 81 ψ n (t) is still the (same) eigenstate of H But for tdependent H. The answer is NO. 5.5.5. Solution for the tdependent Schrodinger s equation If we assume that at time t 0, the electron starts

Διαβάστε περισσότερα

6.1. Dirac Equation. Hamiltonian. Dirac Eq.

6.1. Dirac Equation. Hamiltonian. Dirac Eq. 6.1. Dirac Equation Ref: M.Kaku, Quantum Field Theory, Oxford Univ Press (1993) η μν = η μν = diag(1, -1, -1, -1) p 0 = p 0 p = p i = -p i p μ p μ = p 0 p 0 + p i p i = E c 2 - p 2 = (m c) 2 H = c p 2

Διαβάστε περισσότερα

derivation of the Laplacian from rectangular to spherical coordinates

derivation of the Laplacian from rectangular to spherical coordinates derivation of the Laplacian from rectangular to spherical coordinates swapnizzle 03-03- :5:43 We begin by recognizing the familiar conversion from rectangular to spherical coordinates (note that φ is used

Διαβάστε περισσότερα

Block Ciphers Modes. Ramki Thurimella

Block Ciphers Modes. Ramki Thurimella Block Ciphers Modes Ramki Thurimella Only Encryption I.e. messages could be modified Should not assume that nonsensical messages do no harm Always must be combined with authentication 2 Padding Must be

Διαβάστε περισσότερα

Test Data Management in Practice

Test Data Management in Practice Problems, Concepts, and the Swisscom Test Data Organizer Do you have issues with your legal and compliance department because test environments contain sensitive data outsourcing partners must not see?

Διαβάστε περισσότερα

Concrete Mathematics Exercises from 30 September 2016

Concrete Mathematics Exercises from 30 September 2016 Concrete Mathematics Exercises from 30 September 2016 Silvio Capobianco Exercise 1.7 Let H(n) = J(n + 1) J(n). Equation (1.8) tells us that H(2n) = 2, and H(2n+1) = J(2n+2) J(2n+1) = (2J(n+1) 1) (2J(n)+1)

Διαβάστε περισσότερα

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007 Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Αν κάπου κάνετε κάποιες υποθέσεις να αναφερθούν στη σχετική ερώτηση. Όλα τα αρχεία που αναφέρονται στα προβλήματα βρίσκονται στον ίδιο φάκελο με το εκτελέσιμο

Διαβάστε περισσότερα

Other Test Constructions: Likelihood Ratio & Bayes Tests

Other Test Constructions: Likelihood Ratio & Bayes Tests Other Test Constructions: Likelihood Ratio & Bayes Tests Side-Note: So far we have seen a few approaches for creating tests such as Neyman-Pearson Lemma ( most powerful tests of H 0 : θ = θ 0 vs H 1 :

Διαβάστε περισσότερα

Every set of first-order formulas is equivalent to an independent set

Every set of first-order formulas is equivalent to an independent set Every set of first-order formulas is equivalent to an independent set May 6, 2008 Abstract A set of first-order formulas, whatever the cardinality of the set of symbols, is equivalent to an independent

Διαβάστε περισσότερα

ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ - ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ ΕΠΛ 133: ΑΝΤΙΚΕΙΜΕΝΟΣΤΡΕΦΗΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ ΕΡΓΑΣΤΗΡΙΟ 3 Javadoc Tutorial

ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ - ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ ΕΠΛ 133: ΑΝΤΙΚΕΙΜΕΝΟΣΤΡΕΦΗΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ ΕΡΓΑΣΤΗΡΙΟ 3 Javadoc Tutorial ΕΡΓΑΣΤΗΡΙΟ 3 Javadoc Tutorial Introduction Το Javadoc είναι ένα εργαλείο που παράγει αρχεία html (παρόμοιο με τις σελίδες στη διεύθυνση http://docs.oracle.com/javase/8/docs/api/index.html) από τα σχόλια

Διαβάστε περισσότερα

ΠΑΝΔΠΙΣΗΜΙΟ ΜΑΚΔΓΟΝΙΑ ΠΡΟΓΡΑΜΜΑ ΜΔΣΑΠΣΤΥΙΑΚΧΝ ΠΟΤΓΧΝ ΣΜΗΜΑΣΟ ΔΦΑΡΜΟΜΔΝΗ ΠΛΗΡΟΦΟΡΙΚΗ

ΠΑΝΔΠΙΣΗΜΙΟ ΜΑΚΔΓΟΝΙΑ ΠΡΟΓΡΑΜΜΑ ΜΔΣΑΠΣΤΥΙΑΚΧΝ ΠΟΤΓΧΝ ΣΜΗΜΑΣΟ ΔΦΑΡΜΟΜΔΝΗ ΠΛΗΡΟΦΟΡΙΚΗ ΠΑΝΔΠΙΣΗΜΙΟ ΜΑΚΔΓΟΝΙΑ ΠΡΟΓΡΑΜΜΑ ΜΔΣΑΠΣΤΥΙΑΚΧΝ ΠΟΤΓΧΝ ΣΜΗΜΑΣΟ ΔΦΑΡΜΟΜΔΝΗ ΠΛΗΡΟΦΟΡΙΚΗ ΑΝΑΠΣΤΞΗ ΓΤΝΑΜΙΚΗ ΙΣΟΔΛΙΓΑ ΓΙΑ ΣΟ ΓΔΝΙΚΟ ΚΑΣΑΣΗΜΑ ΚΡΑΣΗΗ ΓΡΔΒΔΝΧΝ ΜΔ ΣΗ ΒΟΗΘΔΙΑ PHP MYSQL Γηπισκαηηθή Δξγαζία ηνπ Υξήζηνπ

Διαβάστε περισσότερα

Example Sheet 3 Solutions

Example Sheet 3 Solutions Example Sheet 3 Solutions. i Regular Sturm-Liouville. ii Singular Sturm-Liouville mixed boundary conditions. iii Not Sturm-Liouville ODE is not in Sturm-Liouville form. iv Regular Sturm-Liouville note

Διαβάστε περισσότερα

Démographie spatiale/spatial Demography

Démographie spatiale/spatial Demography ΠΑΝΕΠΙΣΤΗΜΙΟ ΘΕΣΣΑΛΙΑΣ Démographie spatiale/spatial Demography Session 1: Introduction to spatial demography Basic concepts Michail Agorastakis Department of Planning & Regional Development Άδειες Χρήσης

Διαβάστε περισσότερα

Partial Differential Equations in Biology The boundary element method. March 26, 2013

Partial Differential Equations in Biology The boundary element method. March 26, 2013 The boundary element method March 26, 203 Introduction and notation The problem: u = f in D R d u = ϕ in Γ D u n = g on Γ N, where D = Γ D Γ N, Γ D Γ N = (possibly, Γ D = [Neumann problem] or Γ N = [Dirichlet

Διαβάστε περισσότερα

Overview. Transition Semantics. Configurations and the transition relation. Executions and computation

Overview. Transition Semantics. Configurations and the transition relation. Executions and computation Overview Transition Semantics Configurations and the transition relation Executions and computation Inference rules for small-step structural operational semantics for the simple imperative language Transition

Διαβάστε περισσότερα

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS CHAPTER 5 SOLVING EQUATIONS BY ITERATIVE METHODS EXERCISE 104 Page 8 1. Find the positive root of the equation x + 3x 5 = 0, correct to 3 significant figures, using the method of bisection. Let f(x) =

Διαβάστε περισσότερα

Statistical Inference I Locally most powerful tests

Statistical Inference I Locally most powerful tests Statistical Inference I Locally most powerful tests Shirsendu Mukherjee Department of Statistics, Asutosh College, Kolkata, India. shirsendu st@yahoo.co.in So far we have treated the testing of one-sided

Διαβάστε περισσότερα

ω ω ω ω ω ω+2 ω ω+2 + ω ω ω ω+2 + ω ω+1 ω ω+2 2 ω ω ω ω ω ω ω ω+1 ω ω2 ω ω2 + ω ω ω2 + ω ω ω ω2 + ω ω+1 ω ω2 + ω ω+1 + ω ω ω ω2 + ω

ω ω ω ω ω ω+2 ω ω+2 + ω ω ω ω+2 + ω ω+1 ω ω+2 2 ω ω ω ω ω ω ω ω+1 ω ω2 ω ω2 + ω ω ω2 + ω ω ω ω2 + ω ω+1 ω ω2 + ω ω+1 + ω ω ω ω2 + ω 0 1 2 3 4 5 6 ω ω + 1 ω + 2 ω + 3 ω + 4 ω2 ω2 + 1 ω2 + 2 ω2 + 3 ω3 ω3 + 1 ω3 + 2 ω4 ω4 + 1 ω5 ω 2 ω 2 + 1 ω 2 + 2 ω 2 + ω ω 2 + ω + 1 ω 2 + ω2 ω 2 2 ω 2 2 + 1 ω 2 2 + ω ω 2 3 ω 3 ω 3 + 1 ω 3 + ω ω 3 +

Διαβάστε περισσότερα

Αρχές Τεχνολογίας Λογισμικού Εργαστήριο

Αρχές Τεχνολογίας Λογισμικού Εργαστήριο Αρχές Τεχνολογίας Λογισμικού Εργαστήριο Κωδικός Μαθήματος: TP323 Ώρες Εργαστηρίου: 2/εβδομάδα (Διαφάνειες Νίκου Βιδάκη) 1 JAVA Inheritance Εβδομάδα Νο. 3 2 Προηγούμενο μάθημα (1/2) Τι είναι αντικείμενο?

Διαβάστε περισσότερα

Στο εστιατόριο «ToDokimasesPrinToBgaleisStonKosmo?» έξω από τους δακτυλίους του Κρόνου, οι παραγγελίες γίνονται ηλεκτρονικά.

Στο εστιατόριο «ToDokimasesPrinToBgaleisStonKosmo?» έξω από τους δακτυλίους του Κρόνου, οι παραγγελίες γίνονται ηλεκτρονικά. Διαστημικό εστιατόριο του (Μ)ΑστροΈκτορα Στο εστιατόριο «ToDokimasesPrinToBgaleisStonKosmo?» έξω από τους δακτυλίους του Κρόνου, οι παραγγελίες γίνονται ηλεκτρονικά. Μόλις μια παρέα πελατών κάτσει σε ένα

Διαβάστε περισσότερα

5.4 The Poisson Distribution.

5.4 The Poisson Distribution. The worst thing you can do about a situation is nothing. Sr. O Shea Jackson 5.4 The Poisson Distribution. Description of the Poisson Distribution Discrete probability distribution. The random variable

Διαβάστε περισσότερα

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006 Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Ολοι οι αριθμοί που αναφέρονται σε όλα τα ερωτήματα είναι μικρότεροι το 1000 εκτός αν ορίζεται διαφορετικά στη διατύπωση του προβλήματος. Διάρκεια: 3,5 ώρες Καλή

Διαβάστε περισσότερα

Partial Trace and Partial Transpose

Partial Trace and Partial Transpose Partial Trace and Partial Transpose by José Luis Gómez-Muñoz http://homepage.cem.itesm.mx/lgomez/quantum/ jose.luis.gomez@itesm.mx This document is based on suggestions by Anirban Das Introduction This

Διαβάστε περισσότερα

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ. Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο The time integral of a force is referred to as impulse, is determined by and is obtained from: Newton s 2 nd Law of motion states that the action

Διαβάστε περισσότερα

4.6 Autoregressive Moving Average Model ARMA(1,1)

4.6 Autoregressive Moving Average Model ARMA(1,1) 84 CHAPTER 4. STATIONARY TS MODELS 4.6 Autoregressive Moving Average Model ARMA(,) This section is an introduction to a wide class of models ARMA(p,q) which we will consider in more detail later in this

Διαβάστε περισσότερα

PARTIAL NOTES for 6.1 Trigonometric Identities

PARTIAL NOTES for 6.1 Trigonometric Identities PARTIAL NOTES for 6.1 Trigonometric Identities tanθ = sinθ cosθ cotθ = cosθ sinθ BASIC IDENTITIES cscθ = 1 sinθ secθ = 1 cosθ cotθ = 1 tanθ PYTHAGOREAN IDENTITIES sin θ + cos θ =1 tan θ +1= sec θ 1 + cot

Διαβάστε περισσότερα

Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit

Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit Ting Zhang Stanford May 11, 2001 Stanford, 5/11/2001 1 Outline Ordinal Classification Ordinal Addition Ordinal Multiplication Ordinal

Διαβάστε περισσότερα

Μηχανική Μάθηση Hypothesis Testing

Μηχανική Μάθηση Hypothesis Testing ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Μηχανική Μάθηση Hypothesis Testing Γιώργος Μπορμπουδάκης Τμήμα Επιστήμης Υπολογιστών Procedure 1. Form the null (H 0 ) and alternative (H 1 ) hypothesis 2. Consider

Διαβάστε περισσότερα

Mean bond enthalpy Standard enthalpy of formation Bond N H N N N N H O O O

Mean bond enthalpy Standard enthalpy of formation Bond N H N N N N H O O O Q1. (a) Explain the meaning of the terms mean bond enthalpy and standard enthalpy of formation. Mean bond enthalpy... Standard enthalpy of formation... (5) (b) Some mean bond enthalpies are given below.

Διαβάστε περισσότερα

SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions

SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions SCHOOL OF MATHEMATICAL SCIENCES GLMA Linear Mathematics 00- Examination Solutions. (a) i. ( + 5i)( i) = (6 + 5) + (5 )i = + i. Real part is, imaginary part is. (b) ii. + 5i i ( + 5i)( + i) = ( i)( + i)

Διαβάστε περισσότερα

Case 1: Original version of a bill available in only one language.

Case 1: Original version of a bill available in only one language. currentid originalid attributes currentid attribute is used to identify an element and must be unique inside the document. originalid is used to mark the identifier that the structure used to have in the

Διαβάστε περισσότερα

Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in

Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in : tail in X, head in A nowhere-zero Γ-flow is a Γ-circulation such that

Διαβάστε περισσότερα

ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΕΙΡΑΙΩΣ ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ. Βάσεις Δεδομένων (4 ο εξάμηνο) Εργαστήριο MySQL #2

ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΕΙΡΑΙΩΣ ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ. Βάσεις Δεδομένων (4 ο εξάμηνο) Εργαστήριο MySQL #2 ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΕΙΡΑΙΩΣ ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ Βάσεις Δεδομένων (4 ο εξάμηνο) Εργαστήριο MySQL #2 Διδάσκων: Γιάννης Θεοδωρίδης Συντάκτης Κειμένου: Βαγγέλης Κατσικάρος Φεβρουάριος 2008 Περιεχόμενα SQL Language

Διαβάστε περισσότερα

Main source: "Discrete-time systems and computer control" by Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 4 ΔΙΑΦΑΝΕΙΑ 1

Main source: Discrete-time systems and computer control by Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 4 ΔΙΑΦΑΝΕΙΑ 1 Main source: "Discrete-time systems and computer control" by Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 4 ΔΙΑΦΑΝΕΙΑ 1 A Brief History of Sampling Research 1915 - Edmund Taylor Whittaker (1873-1956) devised a

Διαβάστε περισσότερα

Jesse Maassen and Mark Lundstrom Purdue University November 25, 2013

Jesse Maassen and Mark Lundstrom Purdue University November 25, 2013 Notes on Average Scattering imes and Hall Factors Jesse Maassen and Mar Lundstrom Purdue University November 5, 13 I. Introduction 1 II. Solution of the BE 1 III. Exercises: Woring out average scattering

Διαβάστε περισσότερα

Finite Field Problems: Solutions

Finite Field Problems: Solutions Finite Field Problems: Solutions 1. Let f = x 2 +1 Z 11 [x] and let F = Z 11 [x]/(f), a field. Let Solution: F =11 2 = 121, so F = 121 1 = 120. The possible orders are the divisors of 120. Solution: The

Διαβάστε περισσότερα

ΤΕΧΝΟΛΟΓΙΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΤΜΗΜΑ ΝΟΣΗΛΕΥΤΙΚΗΣ

ΤΕΧΝΟΛΟΓΙΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΤΜΗΜΑ ΝΟΣΗΛΕΥΤΙΚΗΣ ΤΕΧΝΟΛΟΓΙΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΤΜΗΜΑ ΝΟΣΗΛΕΥΤΙΚΗΣ ΠΤΥΧΙΑΚΗ ΕΡΓΑΣΙΑ ΨΥΧΟΛΟΓΙΚΕΣ ΕΠΙΠΤΩΣΕΙΣ ΣΕ ΓΥΝΑΙΚΕΣ ΜΕΤΑ ΑΠΟ ΜΑΣΤΕΚΤΟΜΗ ΓΕΩΡΓΙΑ ΤΡΙΣΟΚΚΑ Λευκωσία 2012 ΤΕΧΝΟΛΟΓΙΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΣΧΟΛΗ ΕΠΙΣΤΗΜΩΝ

Διαβάστε περισσότερα

SOAP API. https://bulksmsn.gr. Table of Contents

SOAP API. https://bulksmsn.gr. Table of Contents SOAP API https://bulksmsn.gr Table of Contents Send SMS...2 Query SMS...3 Multiple Query SMS...4 Credits...5 Save Contact...5 Delete Contact...7 Delete Message...8 Email: sales@bulksmsn.gr, Τηλ: 211 850

Διαβάστε περισσότερα

The Nottingham eprints service makes this work by researchers of the University of Nottingham available open access under the following conditions.

The Nottingham eprints service makes this work by researchers of the University of Nottingham available open access under the following conditions. Luevorasirikul, Kanokrat (2007) Body image and weight management: young people, internet advertisements and pharmacists. PhD thesis, University of Nottingham. Access from the University of Nottingham repository:

Διαβάστε περισσότερα

Strain gauge and rosettes

Strain gauge and rosettes Strain gauge and rosettes Introduction A strain gauge is a device which is used to measure strain (deformation) on an object subjected to forces. Strain can be measured using various types of devices classified

Διαβάστε περισσότερα

Reminders: linear functions

Reminders: linear functions Reminders: linear functions Let U and V be vector spaces over the same field F. Definition A function f : U V is linear if for every u 1, u 2 U, f (u 1 + u 2 ) = f (u 1 ) + f (u 2 ), and for every u U

Διαβάστε περισσότερα

The challenges of non-stable predicates

The challenges of non-stable predicates The challenges of non-stable predicates Consider a non-stable predicate Φ encoding, say, a safety property. We want to determine whether Φ holds for our program. The challenges of non-stable predicates

Διαβάστε περισσότερα

Πρόβλημα 1: Αναζήτηση Ελάχιστης/Μέγιστης Τιμής

Πρόβλημα 1: Αναζήτηση Ελάχιστης/Μέγιστης Τιμής Πρόβλημα 1: Αναζήτηση Ελάχιστης/Μέγιστης Τιμής Να γραφεί πρόγραμμα το οποίο δέχεται ως είσοδο μια ακολουθία S από n (n 40) ακέραιους αριθμούς και επιστρέφει ως έξοδο δύο ακολουθίες από θετικούς ακέραιους

Διαβάστε περισσότερα

Business English. Ενότητα # 9: Financial Planning. Ευαγγελία Κουτσογιάννη Τμήμα Διοίκησης Επιχειρήσεων

Business English. Ενότητα # 9: Financial Planning. Ευαγγελία Κουτσογιάννη Τμήμα Διοίκησης Επιχειρήσεων ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ Ανώτατο Εκπαιδευτικό Ίδρυμα Πειραιά Τεχνολογικού Τομέα Business English Ενότητα # 9: Financial Planning Ευαγγελία Κουτσογιάννη Τμήμα Διοίκησης Επιχειρήσεων Άδειες Χρήσης Το παρόν εκπαιδευτικό

Διαβάστε περισσότερα

Προσομοίωση BP με το Bizagi Modeler

Προσομοίωση BP με το Bizagi Modeler Προσομοίωση BP με το Bizagi Modeler Α. Τσαλγατίδου - Γ.-Δ. Κάπος Πρόγραμμα Μεταπτυχιακών Σπουδών Τεχνολογία Διοίκησης Επιχειρησιακών Διαδικασιών 2017-2018 BPMN Simulation with Bizagi Modeler: 4 Levels

Διαβάστε περισσότερα

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

Chapter 6: Systems of Linear Differential. be continuous functions on the interval Chapter 6: Systems of Linear Differential Equations Let a (t), a 2 (t),..., a nn (t), b (t), b 2 (t),..., b n (t) be continuous functions on the interval I. The system of n first-order differential equations

Διαβάστε περισσότερα

ΑΠΟΔΟΤΙΚΗ ΑΠΟΤΙΜΗΣΗ ΕΡΩΤΗΣΕΩΝ OLAP Η ΜΕΤΑΠΤΥΧΙΑΚΗ ΕΡΓΑΣΙΑ ΕΞΕΙΔΙΚΕΥΣΗΣ. Υποβάλλεται στην

ΑΠΟΔΟΤΙΚΗ ΑΠΟΤΙΜΗΣΗ ΕΡΩΤΗΣΕΩΝ OLAP Η ΜΕΤΑΠΤΥΧΙΑΚΗ ΕΡΓΑΣΙΑ ΕΞΕΙΔΙΚΕΥΣΗΣ. Υποβάλλεται στην ΑΠΟΔΟΤΙΚΗ ΑΠΟΤΙΜΗΣΗ ΕΡΩΤΗΣΕΩΝ OLAP Η ΜΕΤΑΠΤΥΧΙΑΚΗ ΕΡΓΑΣΙΑ ΕΞΕΙΔΙΚΕΥΣΗΣ Υποβάλλεται στην ορισθείσα από την Γενική Συνέλευση Ειδικής Σύνθεσης του Τμήματος Πληροφορικής Εξεταστική Επιτροπή από την Χαρά Παπαγεωργίου

Διαβάστε περισσότερα

C.S. 430 Assignment 6, Sample Solutions

C.S. 430 Assignment 6, Sample Solutions C.S. 430 Assignment 6, Sample Solutions Paul Liu November 15, 2007 Note that these are sample solutions only; in many cases there were many acceptable answers. 1 Reynolds Problem 10.1 1.1 Normal-order

Διαβάστε περισσότερα

TMA4115 Matematikk 3

TMA4115 Matematikk 3 TMA4115 Matematikk 3 Andrew Stacey Norges Teknisk-Naturvitenskapelige Universitet Trondheim Spring 2010 Lecture 12: Mathematics Marvellous Matrices Andrew Stacey Norges Teknisk-Naturvitenskapelige Universitet

Διαβάστε περισσότερα

Models for Probabilistic Programs with an Adversary

Models for Probabilistic Programs with an Adversary Models for Probabilistic Programs with an Adversary Robert Rand, Steve Zdancewic University of Pennsylvania Probabilistic Programming Semantics 2016 Interactive Proofs 2/47 Interactive Proofs 2/47 Interactive

Διαβάστε περισσότερα

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007 Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Όλοι οι αριθμοί που αναφέρονται σε όλα τα ερωτήματα μικρότεροι του 10000 εκτός αν ορίζεται διαφορετικά στη διατύπωση του προβλήματος. Αν κάπου κάνετε κάποιες υποθέσεις

Διαβάστε περισσότερα

Section 9.2 Polar Equations and Graphs

Section 9.2 Polar Equations and Graphs 180 Section 9. Polar Equations and Graphs In this section, we will be graphing polar equations on a polar grid. In the first few examples, we will write the polar equation in rectangular form to help identify

Διαβάστε περισσότερα

QUERY-BY-EXAMPLE. Η Γλώσσα SQL Σελίδα 1

QUERY-BY-EXAMPLE. Η Γλώσσα SQL Σελίδα 1 QUERY-BY-EXAMPLE Η Γλώσσα SQL Σελίδα 1 Query-by-Example (QBE) Μια Γλώσσα για ερωταποκρίσεις που αναπτύχθηκε στην IBM (από τον Moshe Zloof) και παρουσιάζεται σε ένα προϊόν (QMF) (που είναι εναλλακτικός

Διαβάστε περισσότερα

the total number of electrons passing through the lamp.

the total number of electrons passing through the lamp. 1. A 12 V 36 W lamp is lit to normal brightness using a 12 V car battery of negligible internal resistance. The lamp is switched on for one hour (3600 s). For the time of 1 hour, calculate (i) the energy

Διαβάστε περισσότερα

DESIGN OF MACHINERY SOLUTION MANUAL h in h 4 0.

DESIGN OF MACHINERY SOLUTION MANUAL h in h 4 0. DESIGN OF MACHINERY SOLUTION MANUAL -7-1! PROBLEM -7 Statement: Design a double-dwell cam to move a follower from to 25 6, dwell for 12, fall 25 and dwell for the remader The total cycle must take 4 sec

Διαβάστε περισσότερα

UNIVERSITY OF CALIFORNIA. EECS 150 Fall ) You are implementing an 4:1 Multiplexer that has the following specifications:

UNIVERSITY OF CALIFORNIA. EECS 150 Fall ) You are implementing an 4:1 Multiplexer that has the following specifications: UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences EECS 150 Fall 2001 Prof. Subramanian Midterm II 1) You are implementing an 4:1 Multiplexer that has the following specifications:

Διαβάστε περισσότερα

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β 3.4 SUM AND DIFFERENCE FORMULAS Page Theorem cos(αβ cos α cos β -sin α cos(α-β cos α cos β sin α NOTE: cos(αβ cos α cos β cos(α-β cos α -cos β Proof of cos(α-β cos α cos β sin α Let s use a unit circle

Διαβάστε περισσότερα

Fractional Colorings and Zykov Products of graphs

Fractional Colorings and Zykov Products of graphs Fractional Colorings and Zykov Products of graphs Who? Nichole Schimanski When? July 27, 2011 Graphs A graph, G, consists of a vertex set, V (G), and an edge set, E(G). V (G) is any finite set E(G) is

Διαβάστε περισσότερα

Math 6 SL Probability Distributions Practice Test Mark Scheme

Math 6 SL Probability Distributions Practice Test Mark Scheme Math 6 SL Probability Distributions Practice Test Mark Scheme. (a) Note: Award A for vertical line to right of mean, A for shading to right of their vertical line. AA N (b) evidence of recognizing symmetry

Διαβάστε περισσότερα

Code Breaker. TEACHER s NOTES

Code Breaker. TEACHER s NOTES TEACHER s NOTES Time: 50 minutes Learning Outcomes: To relate the genetic code to the assembly of proteins To summarize factors that lead to different types of mutations To distinguish among positive,

Διαβάστε περισσότερα

ΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011

ΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011 Διάρκεια Διαγωνισμού: 3 ώρες Απαντήστε όλες τις ερωτήσεις Μέγιστο Βάρος (20 Μονάδες) Δίνεται ένα σύνολο από N σφαιρίδια τα οποία δεν έχουν όλα το ίδιο βάρος μεταξύ τους και ένα κουτί που αντέχει μέχρι

Διαβάστε περισσότερα

Section 1: Listening and responding. Presenter: Niki Farfara MGTAV VCE Seminar 7 August 2016

Section 1: Listening and responding. Presenter: Niki Farfara MGTAV VCE Seminar 7 August 2016 Section 1: Listening and responding Presenter: Niki Farfara MGTAV VCE Seminar 7 August 2016 Section 1: Listening and responding Section 1: Listening and Responding/ Aκουστική εξέταση Στο πρώτο μέρος της

Διαβάστε περισσότερα

ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΕΙΡΑΙΑ ΤΜΗΜΑ ΝΑΥΤΙΛΙΑΚΩΝ ΣΠΟΥΔΩΝ ΠΡΟΓΡΑΜΜΑ ΜΕΤΑΠΤΥΧΙΑΚΩΝ ΣΠΟΥΔΩΝ ΣΤΗΝ ΝΑΥΤΙΛΙΑ

ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΕΙΡΑΙΑ ΤΜΗΜΑ ΝΑΥΤΙΛΙΑΚΩΝ ΣΠΟΥΔΩΝ ΠΡΟΓΡΑΜΜΑ ΜΕΤΑΠΤΥΧΙΑΚΩΝ ΣΠΟΥΔΩΝ ΣΤΗΝ ΝΑΥΤΙΛΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΕΙΡΑΙΑ ΤΜΗΜΑ ΝΑΥΤΙΛΙΑΚΩΝ ΣΠΟΥΔΩΝ ΠΡΟΓΡΑΜΜΑ ΜΕΤΑΠΤΥΧΙΑΚΩΝ ΣΠΟΥΔΩΝ ΣΤΗΝ ΝΑΥΤΙΛΙΑ ΝΟΜΙΚΟ ΚΑΙ ΘΕΣΜΙΚΟ ΦΟΡΟΛΟΓΙΚΟ ΠΛΑΙΣΙΟ ΚΤΗΣΗΣ ΚΑΙ ΕΚΜΕΤΑΛΛΕΥΣΗΣ ΠΛΟΙΟΥ ΔΙΠΛΩΜΑΤΙΚΗ ΕΡΓΑΣΙΑ που υποβλήθηκε στο

Διαβάστε περισσότερα

Πανεπιστήµιο Πειραιώς Τµήµα Πληροφορικής

Πανεπιστήµιο Πειραιώς Τµήµα Πληροφορικής oard Πανεπιστήµιο Πειραιώς Τµήµα Πληροφορικής Πρόγραµµα Μεταπτυχιακών Σπουδών «Πληροφορική» Μεταπτυχιακή ιατριβή Τίτλος ιατριβής Masters Thesis Title Ονοµατεπώνυµο Φοιτητή Πατρώνυµο Ανάπτυξη διαδικτυακής

Διαβάστε περισσότερα

6.3 Forecasting ARMA processes

6.3 Forecasting ARMA processes 122 CHAPTER 6. ARMA MODELS 6.3 Forecasting ARMA processes The purpose of forecasting is to predict future values of a TS based on the data collected to the present. In this section we will discuss a linear

Διαβάστε περισσότερα

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =? Teko Classes IITJEE/AIEEE Maths by SUHAAG SIR, Bhopal, Ph (0755) 3 00 000 www.tekoclasses.com ANSWERSHEET (TOPIC DIFFERENTIAL CALCULUS) COLLECTION # Question Type A.Single Correct Type Q. (A) Sol least

Διαβάστε περισσότερα

ΜΟΝΤΕΛΑ ΛΗΨΗΣ ΑΠΟΦΑΣΕΩΝ

ΜΟΝΤΕΛΑ ΛΗΨΗΣ ΑΠΟΦΑΣΕΩΝ ΜΟΝΤΕΛΑ ΛΗΨΗΣ ΑΠΟΦΑΣΕΩΝ Ενότητα 12 Τμήμα Εφαρμοσμένης Πληροφορικής Άδειες Χρήσης Το παρόν εκπαιδευτικό υλικό υπόκειται σε άδειες χρήσης Creative Commons. Για εκπαιδευτικό υλικό, όπως εικόνες, που υπόκειται

Διαβάστε περισσότερα

Modbus basic setup notes for IO-Link AL1xxx Master Block

Modbus basic setup notes for IO-Link AL1xxx Master Block n Modbus has four tables/registers where data is stored along with their associated addresses. We will be using the holding registers from address 40001 to 49999 that are R/W 16 bit/word. Two tables that

Διαβάστε περισσότερα

Elements of Information Theory

Elements of Information Theory Elements of Information Theory Model of Digital Communications System A Logarithmic Measure for Information Mutual Information Units of Information Self-Information News... Example Information Measure

Διαβάστε περισσότερα

ΕΙΣΑΓΩΓΗ ΣΤΟN ΠΡΟΓΡΑΜΜΑΤΙΣΜΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΑΤΡΩΝ ΠΟΛΥΤΕΧΝΙΚΗ ΣΧΟΛΗ ΤΜΗΜΑ ΜΗΧΑΝΙΚΩΝ Η/Υ ΚΑΙ ΠΛΗΡΟΦΟΡΙΚΗΣ

ΕΙΣΑΓΩΓΗ ΣΤΟN ΠΡΟΓΡΑΜΜΑΤΙΣΜΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΑΤΡΩΝ ΠΟΛΥΤΕΧΝΙΚΗ ΣΧΟΛΗ ΤΜΗΜΑ ΜΗΧΑΝΙΚΩΝ Η/Υ ΚΑΙ ΠΛΗΡΟΦΟΡΙΚΗΣ ΕΙΣΑΓΩΓΗ ΣΤΟN ΠΡΟΓΡΑΜΜΑΤΙΣΜΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΑΤΡΩΝ ΠΟΛΥΤΕΧΝΙΚΗ ΣΧΟΛΗ ΤΜΗΜΑ ΜΗΧΑΝΙΚΩΝ Η/Υ ΚΑΙ ΠΛΗΡΟΦΟΡΙΚΗΣ Εμβέλεια Μεταβλητών Εμβέλεια = το τμήμα του προγράμματος στο οποίο έχει ισχύ ή είναι ορατή η μεταβλητή.

Διαβάστε περισσότερα

Matrices and Determinants

Matrices and Determinants Matrices and Determinants SUBJECTIVE PROBLEMS: Q 1. For what value of k do the following system of equations possess a non-trivial (i.e., not all zero) solution over the set of rationals Q? x + ky + 3z

Διαβάστε περισσότερα

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 11/3/2006

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 11/3/2006 ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 11/3/26 Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Ολοι οι αριθμοί που αναφέρονται σε όλα τα ερωτήματα μικρότεροι το 1 εκτός αν ορίζεται διαφορετικά στη διατύπωση

Διαβάστε περισσότερα

k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R +

k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R + Chapter 3. Fuzzy Arithmetic 3- Fuzzy arithmetic: ~Addition(+) and subtraction (-): Let A = [a and B = [b, b in R If x [a and y [b, b than x+y [a +b +b Symbolically,we write A(+)B = [a (+)[b, b = [a +b

Διαβάστε περισσότερα

Αλγόριθμοι και πολυπλοκότητα NP-Completeness (2)

Αλγόριθμοι και πολυπλοκότητα NP-Completeness (2) ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Αλγόριθμοι και πολυπλοκότητα NP-Completeness (2) Ιωάννης Τόλλης Τμήμα Επιστήμης Υπολογιστών NP-Completeness (2) x 1 x 1 x 2 x 2 x 3 x 3 x 4 x 4 12 22 32 11 13 21

Διαβάστε περισσότερα

Οδηγίες Αγοράς Ηλεκτρονικού Βιβλίου Instructions for Buying an ebook

Οδηγίες Αγοράς Ηλεκτρονικού Βιβλίου Instructions for Buying an ebook Οδηγίες Αγοράς Ηλεκτρονικού Βιβλίου Instructions for Buying an ebook Βήμα 1: Step 1: Βρείτε το βιβλίο που θα θέλατε να αγοράσετε και πατήστε Add to Cart, για να το προσθέσετε στο καλάθι σας. Αυτόματα θα

Διαβάστε περισσότερα

class Movie extend Movies key title {attribute string title; attribute string review; relationship set <Actor> stars inverse Actor::acts_in;}

class Movie extend Movies key title {attribute string title; attribute string review; relationship set <Actor> stars inverse Actor::acts_in;} Πανεπιστήμιο Κρήτης Τμήμα Επιστήμης Υπολογιστών ΗΥ-562 Προχωρημένα Θέματα Βάσεων Δεδομένων Βασίλης Χριστοφίδης Τελική Εξέταση (3 ώρες) Ημερομηνία: 15 Ιουνίου 2005 Άσκηση 1 (60 μονάδες) Σας δίνεται το παρακάτω

Διαβάστε περισσότερα

[1] P Q. Fig. 3.1

[1] P Q. Fig. 3.1 1 (a) Define resistance....... [1] (b) The smallest conductor within a computer processing chip can be represented as a rectangular block that is one atom high, four atoms wide and twenty atoms long. One

Διαβάστε περισσότερα

Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics

Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics Fourier Series MATH 211, Calculus II J. Robert Buchanan Department of Mathematics Spring 2018 Introduction Not all functions can be represented by Taylor series. f (k) (c) A Taylor series f (x) = (x c)

Διαβάστε περισσότερα

Μορφοποίηση υπό όρους : Μορφή > Μορφοποίηση υπό όρους/γραμμές δεδομένων/μορφοποίηση μόο των κελιών που περιέχουν/

Μορφοποίηση υπό όρους : Μορφή > Μορφοποίηση υπό όρους/γραμμές δεδομένων/μορφοποίηση μόο των κελιών που περιέχουν/ Μορφοποίηση υπό όρους : Μορφή > Μορφοποίηση υπό όρους/γραμμές δεδομένων/μορφοποίηση μόο των κελιών που περιέχουν/ Συνάρτηση round() Περιγραφή Η συνάρτηση ROUND στρογγυλοποιεί έναν αριθμό στον δεδομένο

Διαβάστε περισσότερα