engineeeringg

download engineeeringg

of 30

Transcript of engineeeringg

  • 8/14/2019 engineeeringg

    1/30

    Chapter1 Introduction

    File system vs DBMS

    Advantages of DBMS

    Storage of data in DBMS

    People who work with DBMS

  • 8/14/2019 engineeeringg

    2/30

    Data vs. information:Data vs. information:

    What is the difference?What is the difference?

    What is data?What is data? Data can be defined inData can be defined in

    many ways. Informationmany ways. Information

    science defines data asscience defines data as

    unprocessed information.unprocessed information.

    What is information?What is information? Information is data that haveInformation is data that have

    been organized andbeen organized and

    communicated in a coherentcommunicated in a coherent

    and meaningful manner.and meaningful manner.

    Data is converted intoData is converted into

    information, and information isinformation, and information is

    converted into knowledge.converted into knowledge.

    Knowledge; informationKnowledge; information

    evaluated and organized soevaluated and organized so

    that it can be used purposefully.that it can be used purposefully.

  • 8/14/2019 engineeeringg

    3/30

    What is the ultimate purpose ofWhat is the ultimate purpose of

    a database managementa database management

    system?system?

    Data

    Data Information

    Information Knowledge

    Knowledge Action

    Action

    Is to transformIs to transform

  • 8/14/2019 engineeeringg

    4/30

    Qualities of information

    Accuracy

    Timeliness

    Relevancy

  • 8/14/2019 engineeeringg

    5/30

    What is a databaseWhat is a database

    A database is any organized collection of data typically describingA database is any organized collection of data typically describingthe activities of one or more related organizations.the activities of one or more related organizations. ExamplesExamples

    A university database might contain information about the followingA university database might contain information about the following

    Entities such as students, faculty, courses and classrooms. (entitiesEntities such as students, faculty, courses and classrooms. (entitiesare the basic units used in modeling class of concrete or abstractare the basic units used in modeling class of concrete or abstractobjects.eg: building room, chair .objects.eg: building room, chair .

    Relationship between entities such as students enrollment inRelationship between entities such as students enrollment incourses faculty teaching courses and the use of rooms and courses.courses faculty teaching courses and the use of rooms and courses.

  • 8/14/2019 engineeeringg

    6/30

    A database is a collection of data which can be used:A database is a collection of data which can be used:

    alone, or combined / related to other data to providealone, or combined / related to other data to provideanswers to the users question.answers to the users question.

    Some examples of databases you may encounter in yourSome examples of databases you may encounter in yourdaily life are:daily life are: a telephone booka telephone book

    airline reservation systemairline reservation system

    motor vehicle registration recordsmotor vehicle registration records

    papers in your filing cabinetpapers in your filing cabinet

    files on your computer hard drive.files on your computer hard drive.

  • 8/14/2019 engineeeringg

    7/30

    Why do we need a database?Why do we need a database?

    Keep records of our:Keep records of our:

    ClientsClients

    StaffStaff

    VolunteersVolunteers

    To keep a record of activities and interventions;To keep a record of activities and interventions;

    Keep sales records;Keep sales records;

    Develop reports;Develop reports;

    Perform researchPerform research

  • 8/14/2019 engineeeringg

    8/30

    Tables comprise the fundamental building blocks of any database. If you're familiar withTables comprise the fundamental building blocks of any database. If you're familiar with

    spreadsheets, you'll find database tables extremely similar. Take a look at this example of aspreadsheets, you'll find database tables extremely similar. Take a look at this example of a

    table sample database:table sample database:

    The table above contains the employee information for our organization -- characteristics likeThe table above contains the employee information for our organization -- characteristics like

    name, date of birth and title. Examine the construction of the table and you'll find that eachname, date of birth and title. Examine the construction of the table and you'll find that each

    column of the table corresponds to a specific employee characteristic (orcolumn of the table corresponds to a specific employee characteristic (orattributeattribute in databasein database

    terms). Each row corresponds to one particular employee and contains his or her information.terms). Each row corresponds to one particular employee and contains his or her information.

    That's all there is to it! If it helps, think of each one of these tables as a spreadsheet-styleThat's all there is to it! If it helps, think of each one of these tables as a spreadsheet-style

    listing of information.listing of information.

    Fundamental building blocksFundamental building blocks

  • 8/14/2019 engineeeringg

    9/30

    Types of DatabasesTypes of Databases

    Non-relational databasesNon-relational databasesNon-relational databases place information in field categories that we create so that information is available forNon-relational databases place information in field categories that we create so that information is available forsorting and disseminating the way we need it. The data in a non-relational database, however, is limited to thatsorting and disseminating the way we need it. The data in a non-relational database, however, is limited to thatprogram and cannot be extracted and applied to a number of other software programs, orprogram and cannot be extracted and applied to a number of other software programs, orother database filesother database fileswithin a school or administrative system. The data can only be "copied and pasted. Example: awithin a school or administrative system. The data can only be "copied and pasted. Example: aspread sheetspread sheet

    Relational databasesRelational databasesIn relational databases, fields can be used in a number of ways (and can be of variable length),In relational databases, fields can be used in a number of ways (and can be of variable length),provided that they are linked in tables. It is developed based on a database model that provides forprovided that they are linked in tables. It is developed based on a database model that provides forlogical connections among files (known as tables) by including identifying data from one table inlogical connections among files (known as tables) by including identifying data from one table inanother tableanother table

    Note :Note :

    Traditional database applications : most of the information is stored and accessed either textual orTraditional database applications : most of the information is stored and accessed either textual ornumericnumeric

    Multimedia databases : it stores picture , video clips and sound messagesMultimedia databases : it stores picture , video clips and sound messagesGeographic information systems: it can store and analyze maps, weather data and satellite imagesGeographic information systems: it can store and analyze maps, weather data and satellite images

  • 8/14/2019 engineeeringg

    10/30

    Selecting a database system:Selecting a database system:

    Need AnalysisNeed AnalysisThe needs analysis process will be specific to your organization but, atThe needs analysis process will be specific to your organization but, at

    a minimum, should answer the following questions:a minimum, should answer the following questions:

    How many records we will warehouse and for how long?How many records we will warehouse and for how long?

    Who will be using the database and what tasks will they perform?Who will be using the database and what tasks will they perform?

    How often will the data be modified? Who will make theseHow often will the data be modified? Who will make thesemodifications?modifications?

    Who will be providing IT support for the database?Who will be providing IT support for the database?

    What hardware is available? Is there a budget for purchasingWhat hardware is available? Is there a budget for purchasing

    additional hardware?additional hardware?

    Who will be responsible for maintaining the data?Who will be responsible for maintaining the data?

    Will data access be offered over the Internet? If so, what level ofWill data access be offered over the Internet? If so, what level of

    access should be supported?access should be supported?

  • 8/14/2019 engineeeringg

    11/30

    What is database management systemWhat is database management system A DBMS is a collection of programs whichA DBMS is a collection of programs which

    provide management of databases , that enables the users to create andprovide management of databases , that enables the users to create and

    maintain a database, control access to data contain a query language tomaintain a database, control access to data contain a query language to

    retrieve information easilyretrieve information easily

    Facilities provided by DBMS :Facilities provided by DBMS :1.1. Creating a file , addition of data , modification of data, creation addition andCreating a file , addition of data , modification of data, creation addition and

    deletion of filesdeletion of files

    2.2. Retrieving data collectively or selectivelyRetrieving data collectively or selectively

    3.3. Data stored can be indexed at the users discretion and directionData stored can be indexed at the users discretion and direction

    4.4. Various reports can be generatedVarious reports can be generated5.5. Mathematical function can be performed and the data can be manipulatedMathematical function can be performed and the data can be manipulated

    6.6. To maintain data integrity and database useTo maintain data integrity and database use

  • 8/14/2019 engineeeringg

    12/30

    DBMS is a general purpose software system that facilitates the processes ofDBMS is a general purpose software system that facilitates the processes of

    definingdefining

    constructingconstructing

    manipulatingmanipulating

    sharing databases among various users and applicationssharing databases among various users and applications

    DefiningDefining a database involving specifying the data types , structures anda database involving specifying the data types , structures and

    constraints for the sat to be stored in the database.constraints for the sat to be stored in the database.

    ConstructingConstructing is the process of storing the datais the process of storing the data

    ManipulatingManipulating includes such functions such as querying the database to retrieveincludes such functions such as querying the database to retrieve

    specific dataspecific data SharingSharing a database allows multiple users and programs to access the databasea database allows multiple users and programs to access the database

    concurrently.concurrently.

  • 8/14/2019 engineeeringg

    13/30

    DBMS environment

    users/ programmers

    Applications programs/queries

    DBMS software

    Software to process

    Queries/programs

    Software to access stored data

    Stored database

    (definition)

    Stored database

  • 8/14/2019 engineeeringg

    14/30

    Characteristics of data in a

    database

    Shared

    Persistence

    Validity/integrity/correctness Security

    Consistency

    Non-redundancy Independence

  • 8/14/2019 engineeeringg

    15/30

    Advantages of DBMS

    Data independence

    Efficient data access

    Data integrity and security

    Reduction of redundancies

    Shared data

    Conflict resolution

  • 8/14/2019 engineeeringg

    16/30

    Three views of data External view highest level of abstraction as

    seen by the user . It describes the part of entiredatabase

    Conceptual view : next higher level of abstraction

    which is the sum total of users view and describeswhat data are actually stored in the database

    Internal level lowest level of abstraction at which

    one describes how the data are physically stored

    Student name

    Student address

    Student name : var char

    Student address:var char

    Student name :varchar:25

    Student address:var:25

  • 8/14/2019 engineeeringg

    17/30

    Characteristics of a database

    approach Self describing nature of a database system (database structure

    &constraints)

    Insulation between programs and data and data abstraction(program data independence and program operationindependence)

    operation function or method

    interface of an operation includes operation name and data types

    implementation of operation is specified separately and can bechanged without affecting the interface.

    Support of multiple views of the data

    Sharing of data and multi user transaction processing

  • 8/14/2019 engineeeringg

    18/30

    File system versus DBMS

    Consider an example of an organization A company has a large collection of data on

    employees , department, products, sales and soon

    This data is accessed concurrently by severalemployees

    Queries about the data needs to be answeredquickly.

    Changes made to the data must be consistent Access to certain parts of the data must be

    restricted

  • 8/14/2019 engineeeringg

    19/30

    Traditional file oriented approach

    Traditional file-oriented approach toinformation processing has for eachapplication a separate file and its own set ofpersonal files.

    An organization needs1. flow of information across these applications

    2. Sharing of data (lacking in Traditionalapproach)

    Here programs become dependant on the filesand the files become dependent upon theprograms.

  • 8/14/2019 engineeeringg

    20/30

    Some of the drawbacks are

    1. Data redundancy

    2. Program/data dependency

    3. Lack of flexibility

    4. To hold all the data which requires a storage device5. There is a need of some methodology of identifying all data items

    6. A special program to answer each query

    7. Protection and security of data from authorized users

    8. Inconsistent changes made by different users accessing the dataconcurrently

    9. Ensuring the data is restored to a consistent state if the system crashes10. Operating system provides only a password mechanisms for security

  • 8/14/2019 engineeeringg

    21/30

    Storing data in DBMS

    User is concerned with some real world

    enterprises

    An example :

    University Database Entities are

    students, faculty,, courses.

    Data in a university databases describesthese entities and relationships

  • 8/14/2019 engineeeringg

    22/30

    Data model uses logical concepts such as objects, theirproperties and their interrelationships. Informally a datamodel is a type of data abstraction that is used toprovide conceptual representation.

    A data model is a collection of high level data descriptionconstructs that hide many low level storage details

    A DBMS allows a user to define the data to be stored in

    terms of a data model

    Most of the database management systems today arebased on RELATIONSHIP MODEL

  • 8/14/2019 engineeeringg

    23/30

    A semantic data model is a more abstract

    high level data model that makes its easier

    for a user to have a detailed description of

    the data in the enterprise

    It is typically built around a data model

    with a few basic constructs such as

    Relational model.

  • 8/14/2019 engineeeringg

    24/30

    People who work with databases

    There are a few for creation and use of

    databases . They are

    1. Database implementors- build DBMS software

    2. End users store and use data in a DBMS

    3. Application programmers

    4. Database administrators

  • 8/14/2019 engineeeringg

    25/30

    Database implementors

    They work for vendors such as IBM or oracle

    End Users

    End users are the people whose jobs require access to the database for querying ,updating and generating reports

    1. data grows in complexity and volume & care needs for maintaining it.

    2. end users use applications written by database application programmers and require lesstechnical knowledge about DBMS software

    3. sophisticated users use DBMS by writing their queries

    categories of end users1. Casual end users

    2. Sophisticated end users (scientists, engineers)

    3. Stan alone end users

  • 8/14/2019 engineeeringg

    26/30

    Database application programmers

    1. They develop packages that facilitate data

    access for end users.

    2. End users are not computer professionals

    using the host language and software tools

    that DBMS provide.

    (tools report writers, spread sheets andstatistical packages.)

  • 8/14/2019 engineeeringg

    27/30

    Database administrator

    DBMS is to have a control of data and programsaccessing that data.

    Person who has such a control is called the data

    base administrator. He administers three levels

    Sets up the definition for conceptual view

    Specifies external view for various users and

    application and is responsible for definition andimplementation of internal level including thestorage structure and access methods

  • 8/14/2019 engineeeringg

    28/30

    Changes to any of three levels in underthe control of DBA

    Mappings between internal and

    conceptual levels and conceptual leveland external level defined by DBA

    Ensuring to maintain integrity of the

    database Granting permission to end users of the

    database

  • 8/14/2019 engineeeringg

    29/30

    Summary of functions of DBA

    Schema definition

    A schema is a logical database description and is drawn as a chart ofthe types of data that are used.

    It specifies the name of the entities and attributes and specifies therelationship between them

    It is a frame work into which value of the data item can be fitted.

    Eg: an information display system gives you the arrival and departuretime at airports, railway system , the schema will remain the samethough the values displayed will change from time to time

  • 8/14/2019 engineeeringg

    30/30

    Storage structure and access method

    definition

    Granting of authorization for data access

    Integrity constraint specification