67
Kjell Orsborn 22-06-27 1 UU - DIS - UDBL DATABASE SYSTEMS - 10p Course No. ?? A second course on development of database systems Kjell Orsborn Uppsala Database Laboratory Department of Information Science, Uppsala University, Uppsala, Sweden

DATABASE SYSTEMS - 10p Course No.?

  • Upload
    chenoa

  • View
    35

  • Download
    0

Embed Size (px)

DESCRIPTION

DATABASE SYSTEMS - 10p Course No. ??. A second course on development of database systems Kjell Orsborn Uppsala Database Laboratory Department of Information Science, Uppsala University, Uppsala, Sweden. Personell - Spring 2001. Kjell Orsborn, lecturer email: [email protected] - PowerPoint PPT Presentation

Citation preview

Page 1: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

1UU - DIS - UDBL

DATABASE SYSTEMS - 10pCourse No. ??

A second course on development of database systems

Kjell OrsbornUppsala Database Laboratory

Department of Information Science, Uppsala University, Uppsala, Sweden

Page 2: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

2UU - DIS - UDBL

Personell - Spring 2001• Kjell Orsborn, lecturer

• email: [email protected]

• phone: 018 - 471 1154

• room no: A324

• Lars Westergren, lab assisstant• email: [email protected]

• phone: 018 - 471 ????

• room no: E???

Page 3: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

3UU - DIS - UDBL

Preliminary course contents• Course intro - overview and rep

of db terminologi, extended ER (KO)

• Rep relational algebra operators, relationskalkyl, QBE (KO)

• Advanced SQL (KO)

• Storage and Index Structures (KO)

• Query optimization (TR)

• OO/OR DBMSs (TR)

• AMOS/AMOSQL (TR)

• Transactions, Concurrency Control (KO)

• Recovery Techniques, Security / Authorization (KO)

• Distributed and Multi-DBMSs (TR)

• Active DBMSs (TR)

• Multimedia DBMSs (TR)

• Data warehousing / Data Mining (TR)

• Parallell DBMSs (KO)

• Project presentation / Summary (KO)

Page 4: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

4UU - DIS - UDBL

Preliminary course contents• Labs InterBase

– RDBMS

• Labs AMOS II– OO/OR DBMS

• Lab Project XX– To be decided:

InterBase alt. AMOS II

Page 5: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

5UU - DIS - UDBL

Introduction to Database Terminology

Elmasri/Navathe chs 1-2

Lecture 1

Kjell Orsborn

Department of Information Science

Uppsala University, Uppsala, Sweden

Page 6: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

6UU - DIS - UDBL

Evolution of Database Technology

{}

1960Hierarchical(IMS)

Trees

1970Network model(CODASYL)

Complex data structures

1980Relational model(e.g. ORACLE)

Tables

19901st Generation OODB(e.g. Objectivity)

OO data structures

1997Object Realtional DBMS(e.g. SQL99)

Object model

Page 7: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

7UU - DIS - UDBL

Database?

• A database (DB) is a more or less well-organized collection of related data.

• The information in a database . . .– represents information within some subarea of “the reality”

(i.e. objects, characteristics and relationships between objects)

– is logically connected through the intended meaning

– has been organized for a specific group of users and applications

Page 8: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

8UU - DIS - UDBL

Outline of a database system

Database Databaseschema

DBMS

DATABASE SYSTEM

Users’

interactive queries

Applications

procedures/statements

Data managing tools

Database language tools

Page 9: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

9UU - DIS - UDBL

An example database (Elmasri/Navathe fig. 1.2)

Page 10: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

10UU - DIS - UDBL

Database management system?

• A database management system (DBMS) is one (or several) program that provides functionality for users to develop, use, and maintain a database.

• Thus, a DBMS is a general software system for defining, populating (creating), and manipulating databases for different types of applications.

Page 11: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

11UU - DIS - UDBL

Back to the example ...

• Defining this DB involve – declaration of files, records, fields and data types for each fields.

• Population of the DB means– that the files are filled with data about individual students, courses

etc.

• Manipulation is then carried out by users directly via a query language or indirectly via application programs:– updates

– queries to the DB

Page 12: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

12UU - DIS - UDBL

Database System?

• A database system consists of . . .– the physical database (instance)

– a database management system

– one or several database languages(means for communicating with the database)

– one or several application program(s)

• A database system makes a simple and efficient manipulation of large data sets possible.

• The term DB can refer to both the content and to the system. The answer to this ambiguity is governed by the context.

Page 13: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

13UU - DIS - UDBL

Why DB?

• DB in comparison to manual paper-based registers:– Better compactness

– Faster search

– Simpler maintenance

– “Greater usability”

• DB in comparison to conventional file management:– Data model - data abstraction

– Meta-data

– Program- and data independence

– Multiple views of the same data

– High-level language for managing the database

– Efficient search/access of large data sets

Database

Page 14: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

14UU - DIS - UDBL

Problems that can be avoided using a database system

• Redundancy and inconsistency

• Slow process to find correct information

• Different formats for data storage

• Erroneous or unreasonable values

• Incomplete updates

• Concurrent access

• Unauthorized access

Page 15: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

15UU - DIS - UDBL

Data model?

• Every DB has a data model which makes it possible to “hide” the physical representation of data.

• A data model is a formalism that defines a notation for describing data on an abstract level together with a set of operations to manipulate data represented using this data model.

• Data models are used for data abstraction - making it possible to define and manipulate data on an abstract level.

Page 16: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

16UU - DIS - UDBL

Data model continued . . .

• E.g. assume that information about employees in an enterprise exists in a file employees which is a sequence records of the type:

record

name: char[30];

manager: char[30]

end

An abstract model of this file is a relation:employees(name, manager)

, where employees is the name of the relation and name and manager is the attribute of the relation.

Page 17: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

17UU - DIS - UDBL

Data models - examples

• Examples of data models within the database field are the:– Hierarchical (IMS),

– Network (IDMS),

– Relational (ORACLE, SYBASE, DB2, InterBase),

– Object-oriented (O2, ObjectStore) and

– Object-relational ( Informix, UniSQL, Iris/AMOS) data model.

• Conceptual data model– ER-model (Entity-Relationship model)

(not an implementation model since there are no operations defined for the notation)

Page 18: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

18UU - DIS - UDBL

Meta-data, i.e. “data about data”

• Information about which information that exists

• Information about how/where data is stored– file structures

– records

– data types / formats

– name of files, data types

• Information regarding mapping between different schemas

• Meta-data is stored in the, so called, system catalog or data dictionary.

Page 19: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

19UU - DIS - UDBL

Meta-data cont. ...• Meta-data is used by the DBMS to answer questions such as:

(Users)

– Which information exists in the database?

– Is the information “x” in the database?

– What is the cost to access a specific piece of information.

(Database administrator or DBMS)

– How much is different parts of the database used?

– How long is the response time for different types of queries?

– Has any user tried to break the security system of the database?

– Is optimization required of the physical organization of the database with regards to memory utilization or response times?

Page 20: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

20UU - DIS - UDBL

Schema and instance

To be able to separate data in the database and its description the terms database instance and database schema are used.

• The schema is created when a database is defined. A database schema is not changed frequently.

• The data in the database constitute an instance. Every change of data creates a new instance of the database.

Page 21: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

21UU - DIS - UDBL

Data independence

• Reduces the connection between:– the actual organization of data and

– how the users/application programs process data (or “sees” data.)

• Why?– Data should be able to change without requiring a corresponding

alteration of the application programs.

– Different applications/users need different “views” of the same data.

Page 22: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

22UU - DIS - UDBL

Data dependenciesConventional systems have, in general, a very low level of data

independence:• Even a small change of the data structure, e.g. the introduction or

reduction of a field in a record structure, usually require that one has to make changes in several programs or routines.

Programs can be dependent of that:• data is located on a specific storage medium

• data has a specific storage format (binary, compressed)

• fields have been coded according to certain rules (Man = 1, Woman = 2)

• the file records are sorted in a specific manneretc . . .

Page 23: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

23UU - DIS - UDBL

Data independence - how? By introducing a multi-level architecture where

each level represents one abstraction level.

Three-schema architecture:– In 1978 the following “standard” architecture (ANSI/SPARC

architecture ) for databases was introduced.

It consists of 3 levels:

1. Internal level

2. Conceptual level

3. External level– Each level introduces one abstraction layer and has a schema that

describes how representations should be mapped to the next lower abstraction level.

Page 24: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

24UU - DIS - UDBL

Three-schema architecture

Internal schemaInternal schema

Conceptual schemaConceptual schema

Database instanceDatabase instance

Internal levelInternal level

Conceptual levelConceptual level

External levelExternal level

End usersEnd users

view1 view2 viewn

Page 25: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

25UU - DIS - UDBL

Internal schema

• Describes storage structures and access paths for the physical database.– Abstraction level: files, index files etc.

• Is usually defined through the data definition language (DDL) of the DBMS.

Page 26: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

26UU - DIS - UDBL

Conceptual schema

• An abstract description of the physical database.

• Constitute one, for all users, common basic model of the logical content of the database.

• This abstraction level corresponds to “the real world”: object, characteristics, relationships between objects etc.

• The schema is created in the DDL according to a specific data model.

Page 27: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

27UU - DIS - UDBL

External schemas, or views

• A typical DB has several users with varying needs, demands, access privileges etc.

• External schemas describes different views of the conceptual database with respect to what different user groups would like to/are allowed to se.

• Some DBMS’s have a specific language for view definitions (else the DDL is used).

Page 28: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

28UU - DIS - UDBL

Views - example (Elmasri/Navathe fig 1.4)

Page 29: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

29UU - DIS - UDBL

Views - example in SQL

• Assume that we have a relation (table) consisting information about employees in an enterprise:

employees(name,dept,salary,address)

• and wish to give a user group rights “to see” all information in the table except the SALARY field.

• This can be accomplished by the definition of a view called safe-emp:

create view safe-emps by

select name, dept, address

from employees;

Page 30: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

30UU - DIS - UDBL

Data independence in the three-schema architecture

1. Logical data independence– The possibility to change the conceptual schema without

influencing the external schemas (views).• e.g. add another field to a conceptual schema.

2. Physical data independence– The possibility to change the internal schema without influencing

the conceptual schema.. • the effects of a physical reorganization of the database, such as

adding an access path, is eliminated.

Page 31: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

31UU - DIS - UDBL

Database languages

• The term database language is a generic term for a class of languages used for defining, communicating with or manipulating a database.

• In conventional programming languages, declarations and program sentences is implemented in one and the same language.

• A DB system uses several different languages.– Storage Definition Language (SDL)

– Data Definition Language (DDL)

– View Definition Language (VDL)

– Data Manipulation Language (DML)

Page 32: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

32UU - DIS - UDBL

DDL and DML

• DDL is used by the database administrator and others to define internal and conceptual schema.

• In this manner the database is designed. Subsequent modifications in the design is also made in DDL.

• DML is used by DB users and application programs to retrieve, add, remove, or alter the information in the database. The term query language is usually used as synonym to DML.

Page 33: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

33UU - DIS - UDBL

DDL example in SQLcreate table

flights(number: int,

Date:char(6),

Seats: int,

from:char(3),

to: char(3));

create index for flights on number;

• The first expression defines a relation, its attribute and their types.

• The second expression creates an index as part of the internal schema making search faster for flights, given a flight no. (e.g. this can be accomplished by creating a hash table with number as the key).

Page 34: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

34UU - DIS - UDBL

DML example in SQL

update flights

set seats = seats -4

where number = 123 and date = ‘AUG 31’

“Decrease the no. of seats in flight no.. 123 on August 31 with 4.”

insert into flights

values(171,

‘AUG 21’, 100, ‘ROM’, ‘JFK’)

“Add a new flight with flight no.. 171 and 100 seats, from Rom to New York (JFK) on August 21”

Page 35: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

35UU - DIS - UDBL

Host language

• Application programs that work with a DB are mainly written in a normal programming language: C, COBOL, PASCAL, C++, Java, etc.

• The part of the program that interact with the DB is normally written in a DML.

• The DML commands are embedded in the code that is written in the host language.

##get(b)

sum := sum + b;

##store(sum)

Page 36: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

36UU - DIS - UDBL

Classification criteria for DBMSs

• Type of data model– hierarchical, network, relational, object-oriented, object-relational

• Centralized vs. distributed DBMSs– Homogeneous vs. heterogeneous DDBMSs

– Multidatabase systems

• Single-user vs. multi-user systems

• General-purpose vs. special-purpose DBMSs– specific applications such as airline reservation and phone directory

systems.

• Cost

Page 37: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

37UU - DIS - UDBL

Components of a DBMS• Query processor

– DML compiler

– Embedded DML precompiler

– DDL interpreter

– Query processing unit

• Storage manager– Authorization and integrity control

– Transactions management

– File management

– Buffer management

• Physical storage– data files, meta-data (data dictionary), index, statistics

Page 38: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

39UU - DIS - UDBL

Components of a DBMS (fig 1.6 Silberschatz et al)

Page 39: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

40UU - DIS - UDBL

Introduction to Database Design Using Entity-Relationship Modeling

Elmasri/Navathe chs 3-4

Lecture 1

Kjell Orsborn

Department of Information Science

Uppsala University, Uppsala, Sweden

Page 40: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

41UU - DIS - UDBL

ER-modeling

• Aims at defining a high-level specification of the information content in the database.

• History– Chen,P.P.S., “The entity-relationship model: towards a unified view of

data”, ACM TODS, 1, 1 1976, p. 9-36.

• Why ER-models?– High-level description - easier to understand for non-technicians

– More formal than natural language - avoid misconceptions and multiple interpretations

– Implementation independent (of DBMS) - less technical details

– Documentation

– Model transformation to an implementation data model

Page 41: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

42UU - DIS - UDBL

ER-modeling cont. ...

• How to do?– Identify:

• Entity types and attributes

• Relationship types

– Normally presented in a graphical ER-diagram

– An ER-model can later be transformed to an implementation data model, such as the relational data model

Page 42: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

43UU - DIS - UDBL

Example of an ER-diagram

Page 43: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

44UU - DIS - UDBL

Terminology in ER-modeling

• Entity type - Entity– Physical or abstract concepts with some sort of identity.

.

• Attribute– Characteristics or different aspects that describes an entity.

• Relationship type - Relationship– Represents relationships between entities

ER-diagram

Page 44: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

45UU - DIS - UDBL

Entity type

• An entity type represents a set of entities that have the same set of attributes.– Entity types express the intention, i.e. the meaning of the concept

whereas the set of entities represents the extension of that type.

– Names of entity types are given in singular form.

– The description of an entity type is called its schema.PERSONname, ssn, address, phoneno

– Each attribute in an entity type is associated with a domain that indicates the allowed values of that attribute.

Page 45: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

46UU - DIS - UDBL

Attribute• An attribute describe a character or aspect of an entity type.

– Every attribute has a domain (or value set).

– A domain specifies the set of allowed values each individual attribute can be assigned.

– There is (at least) six different types of values for attributes:• simple/ sex: M or F

• composite name: (Ior, Karlsson)

• single-valued/ name: “Ior Karlsson”

• multivalued friends: {Nasse, Puh,...}

• stored/ birthdate: 980917

• derived age : 0

• null

Obs!

ER-diagram Simple Composite Multivalued Derived

Page 46: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

47UU - DIS - UDBL

Key

• An attribute that has unique values for every instance of an entity type is called a key attribute.

• Sometimes several attributes are used together to get a unique key.

• An entity type can have more than one key.

key hello

Page 47: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

48UU - DIS - UDBL

Relationship type

• A relationship type represents a relationship (or relation/connection), between a number of entity types.

• A relationship type R is a set of relational instances or tuples.

• A relationship type, R, can mathematically be defined as:R E1 E2 … En

where each Ej is a entity type.

• A tuple (or an instance) t R is written as (e1, e2, ..., en) or <e1, e2, ..., en> where ej Ej.

Page 48: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

49UU - DIS - UDBL

Structural constraints for relationship types

• Cardinality ratio constraint specifies the number of relational instances that an entity can take part in.For binary relationship types:

– one-to-one (1:1)

– one-to-many (1:N)

– many-to-many (M:N)

1 1

N

NM

1

Page 49: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

50UU - DIS - UDBL

Structural constraints cont. ...

• Participation constraint – specifies whether the entity existence is dependent of another entity via a

relationship type.E.g. can an employee exist without working for a department?

– Partial participation: the entity can exist without this relationship

– Total participation: the entity requires this relationship in order to exist.

Partial Total

works_foremployee department

manages

Page 50: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

51UU - DIS - UDBL

Roles of relationship types

• A role name specifies what role an entity type plays in a specific relationship

• Role names are sometimes used in ER-diagrams to clarify the roles of the participating entity types.

SupervisionSupervision

EmployeeEmployee

workerN1manager

Page 51: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

52UU - DIS - UDBL

Attributes for relationship types

• Also a relationship type can have attributes. E.g. in the case where the weekly number of hours an employee works on a project should be kept, that can be represented for each instance of the relation “works-on”.

• If the relation is a 1:1 or 1:N relation, the attribute can be stored at one of the participating entities.

• When the relation is of the type M:N one must store the attributes with the instance of the relation.

Page 52: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

53UU - DIS - UDBL

Weak entity types• Weak entity types are those that are meaningless without an

owner entity type.

• Weak entities are uniquely identified in the extension with their owner’s key attributes together with its own (broken) underlined attribute.

• The relationship to the owner is called the identifying relationship.

Page 53: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

54UU - DIS - UDBL

ER-notation (Elmasri/Navathe fig. 3.14)

Page 54: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

55UU - DIS - UDBL

Another ER diagram

Page 55: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

56UU - DIS - UDBL

ER model transformations

• Replacing multi-valued attributes by an entity type

DEPARTMENTDEPARTMENT

N1

Dept idDept idNameName

Location

Dept idDept idNameName

LOCATIONLOCATION

LocationLocation

located atlocated atDEPARTMENTDEPARTMENT

Page 56: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

57UU - DIS - UDBL

ER model transf. cont. ...• Replacing M-N relationships with an entity type and binary

relationships.

N

M

TimeTime

COURSECOURSE

lectureslectures

TEACHERTEACHER

ROOMROOM N

N

TimeTime

COURSECOURSE

LECTURESLECTURES

TEACHERTEACHER

ROOMROOMconsists ofconsists of

1

lectureslectures

1

booked for

booked for

N

1

Page 57: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

58UU - DIS - UDBL

Example ER-modeling

– An enterprise consists of a number of departments. Each department has a name, a number, a manager, and a number of employees. The starting date for every department manager should also be registered. A department can have several office rooms.

– Every department finances a number of projects. Each project has a name, a number and an office room.

– For each employee, the following information is kept: name, social security number, address, salary and sex. An employee works for only one department but can work with several projects that can be related to different departments. Information about the number of hours (per week) that an employee work with a project should be stored. Information about the employees manager should also be stored.

Page 58: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

62UU - DIS - UDBL

Extended Entity-Relationship (EER) modeling

• The intention of using an E-R diagram is to use it as a basis for user communication or for getting to a good design specification.– i.e. try to make it simple and avoid to much complexity.

• EER (extended or enhanced ER) introduces several notational extensions to deal concepts such as:– Superclass /subclass (supertype/subtype, is-a relationship)

• specialization/generalization

• constraints

– Aggregation (whole/part or part-of relationship)

– Union types (category)

Page 59: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

63UU - DIS - UDBL

EER diagram notation for specialization and subclass

Page 60: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

64UU - DIS - UDBL

Subclasses, superclasses & inheritance

• Two generic ideas for creating superclass/subclass relationships– Specialization of superclass into subclasses

– Generalization of subclasses into a superclass

• Constraints and characteristics of spec. & gen.– Constraints

• Predicate-defined (condition-defined) sub-classes

• Attribute-defined

• User-defined

– Disjointness• Disjoint

• Overlapping

– Completeness• Total

• Partial

Page 61: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

65UU - DIS - UDBL

Generalization of subclasses

Page 62: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

66UU - DIS - UDBL

Overlapping (nondisjoint) subclasses

Page 63: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

67UU - DIS - UDBL

Representation of aggregation in ER notation

Page 64: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

68UU - DIS - UDBL

A UML conceptual schema

Page 65: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

69UU - DIS - UDBL

Specialization/generalization in UML

Page 66: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

70UU - DIS - UDBL

Union of two entity types

Page 67: DATABASE SYSTEMS - 10p Course No.?

Kjell Orsborn 23-04-20

71UU - DIS - UDBL

Alternative diagrammatic notation for

ER/EER