03 Im Uml Construction and Data Bases

download 03 Im Uml Construction and Data Bases

of 8

Transcript of 03 Im Uml Construction and Data Bases

  • 8/19/2019 03 Im Uml Construction and Data Bases

    1/18

    Different way tostore data

    24

    Data types

    Number and strings

    Signals

    Images

    F i l es are a data storage entity that contain

    data according to the application organization.

    Binary or Text

    Da t aba se s  offer an organized mechanism for

    storing, managing and retrieving informationthat is independent from the applications.

  • 8/19/2019 03 Im Uml Construction and Data Bases

    2/18

    Databases

    25

     A da t a ba s e is a collection of files.

     A f i l e  is a collection of byte that has aname. Files are accessed by means oftheir name.

     A file is further subdivided into logicaldata r e c o r d s  .

     A record is a collection of d a t a  .

    Symbol used

    to indicate adatabase

  • 8/19/2019 03 Im Uml Construction and Data Bases

    3/18

    There are three main components to any DB application:

     A m et h o d f o r en t er i n g a n d ed i t i n g d a t a (usually data entry

    screens or import functions)

     A d a t a st o r a g e m ech a n i sm (a way of storing the data on thecomputer)

     A r ep o r t g en er a t o r to extract and interpret information fromthe stored data

  • 8/19/2019 03 Im Uml Construction and Data Bases

    4/18

    27

    Data in a DB is organized in a structured way. The structure isachieved using a database model. The model that is most commonlyused today is the relational model.

    There are two types of databases:

    Oper a t i o n a l d a t a b a se: they are primarily used in on-line

    transaction processing (OLTP) scenarios, where data is collected,modified and maintained on a daily basis.

    An a l y t i ca l d a t a b a se: they are used in on-line analytical

    processing (OLP) scenarios, where data is never modified and isused for example for statistical analysis.

  • 8/19/2019 03 Im Uml Construction and Data Bases

    5/18

    28

    D a t a a b st r a ct i o n : a data model is used to hide storage detailsand present the users with a conceptual view of the database;programs refer to the data model constructs rather than datastorage details

    Su pp o r t o f m u l t i p l e v i ew s o f t h e d a t a : each user may see a

    different view of the database, which describe only the data ofinterest to that user

    Sh a r i n g o f d a t a e m u l t i -u ser t r a n sa ct i o n p r o cessi n g :

    allowing a set of concurrent users to retrieve from and to updatethe database.

  • 8/19/2019 03 Im Uml Construction and Data Bases

    6/18

    DBMS

    29

    DataBase Management System

    (DBMS) is a software system that isused to define, create and maintaindatabases.

    It assists in maintaining and utilizinglarge collections of data and also

    provides various levels of accesscontrol to users.

    It can be seen as a mediator betweenusers and/or applications anddatabases.

  • 8/19/2019 03 Im Uml Construction and Data Bases

    7/18

    30

    DBMS may have utilities software such as database designer tools,

    report writers and application development tools.

    Examples of DBMS are Oracle, Access, SQL server …

    DBMS manage backup and recovery.

    DBMS is installed on a computer that is called database server.

    It can be a single or multi-user system.

  • 8/19/2019 03 Im Uml Construction and Data Bases

    8/18

    31

    In large organizations there is a large number of users and volume of datais high.

    In this case to allow its management by several users, data is integratedand shared.

    Data is kept on various database servers and with the help of computernetworks data can be transmitted from one server to another.

    It is responsibility of DBMS to provide data to various users at a timeand ensure that no users can modify the same piece of data at thesame time.

    Users share data but may have different levels of access to databases:some users may only be allowed to view data, others may also modifydata.

    These permissions are called privileges.

  • 8/19/2019 03 Im Uml Construction and Data Bases

    9/18

    32

    Data Dictionary keeps all kind of information about Users

    Internal structure of databases

    Privileges

  • 8/19/2019 03 Im Uml Construction and Data Bases

    10/18

    33

    Single tier system.Mainframes or minicomputers were used tokeep centralized databases. Terminals were usedto access databases through DBMS

    Two-tier system.

    It is an example of distributed computing wheredifferent software is required for server machineand for the client machine.

    This system is called Client/Server

    database system. A client-server environment was common in thepreInternet days where a transactional databaseserviced users within a single company.

  • 8/19/2019 03 Im Uml Construction and Data Bases

    11/18

    3434

    Three-tier system.In this system a special software called

    middleware is used to connect client of oneDBMS to access another DBMS.

    In a distributed computing system there are many DBMS installed on differentserver machines.

     Applications can access data from local and remote databases.Data is stored geographically and resides to nearer where it will be used.

  • 8/19/2019 03 Im Uml Construction and Data Bases

    12/18

    35

    : application programs are independent fromdetails of data storage and representation. Also data are independent fromapplications.

    : security is provided bycontrolling the operations that each user may perform (privileges); dataintegrity is the result of having each datum stored only in one place (inconventional systems data are duplicated in multiple files).

    : changes are often necessary to the contents of the data; because programs and data are independent, programs do not have to bemodified when physical storage changes.

    : complexrequests can be handled much more rapidly then if the data were located inseparated files.

  • 8/19/2019 03 Im Uml Construction and Data Bases

    13/18

    3636

    : in the conventional file

    processing system, every user group maintains its own files for handling its datafiles. This may lead to:

    Duplication of the same data in different files

     Wastage of storage space Errors may be generated when the same data are updated in different

    files

    Time wasted in entering data again and again

    : when data are duplicated indifferent files modifications may lead to inconsistency; a DBMS contains amechanisms to avoid inconsistency.

  • 8/19/2019 03 Im Uml Construction and Data Bases

    14/18

    37

    : is a person (or a group of persons) who is responsible for the supervision of the database. He is responsible for givingpermission to the users by grant and revoke privileges. He is also responsible forcoordinating and monitoring its use, managing backups and recovery, and for

    acquiring hardware and software resources as needed.: they are responsible for identifying the data to be

    stored and for choosing the appropriate structure to represent and store the data.

    : are the people who interact with the database through applicationsand utilities. There are different types of end users:

    Casual end users – people that need different information each time; they uses thedatabase query language;

    Native end users – they uses the same queries each time, usually by means ofapplications.

    : they write programs, that make use of

    databases, to handle a specific job.

  • 8/19/2019 03 Im Uml Construction and Data Bases

    15/18

    38

     A database model is used to explain the logical layout meaning the relationshipsamong the various parts the database consists of.

    In fact data must be stored in some fashion in a file for it to be useful.

    Over the past 30 years there have been three groups of logical databasemodels:

    Hierarchical

    Network

    Relational

    meaning three ways of logically perceiving the arrangement of data in the filestructure.

    The relational database modeling is currently the best solution for both storage

    and retrieval of data.

  • 8/19/2019 03 Im Uml Construction and Data Bases

    16/18

    39

    The initial solution was no virtually database model at all: the file

    system (also known as flat files).The term flat file is a way of describing a simple text file, containingno structure. Flat files are not database at all.

    Pre 1950

    1980

    The evolution of database modeling occurred when each database

    model improved upon the previous one.

    HIERARCHICAL model

    is an inverted tree-like

    structure.

    1950

    1990

  • 8/19/2019 03 Im Uml Construction and Data Bases

    17/18

    40

    NETWORK model

    organizes files in a mannerthat associates each file with nnumber of other files.

    1960

    2000

    RELATIONAL modelis a data is stored in tables (also referredto as entities). Each table has rows (alsoreferred as records) and columns (also

    referred to as attributes). In this modelany table can be linked together.

    1970

  • 8/19/2019 03 Im Uml Construction and Data Bases

    18/18

    41

    Basato su tabelle e relazioni