meljun cortes database system

79
DATABASE DATABASE SYSTEM SYSTEM MELJUN CORTES MELJUN CORTES

Upload: meljun-cortes

Post on 18-Jan-2017

104 views

Category:

Technology


0 download

TRANSCRIPT

  • DATABASE SYSTEM

    MELJUN CORTES

  • We Are Learning TodayTo recognize what a database is and identify where one might be used in and out of school.To reconize the meaning of key database terms such as Table, Record, Field, Form, Report and Query.To understand what querying a database is.Understanding Basic Database concepts

    MELJUN CORTES

  • DATA ORGANIZATIONCHARACTER is the basic building block of DATA which consist of upper & lower case letter numeric digit (0, 1, 2, etc.) or special character (-, +, -).

    CHARACTER are put together to form a FACT. FACT are called Field, Item, Word, or String of Character.FACT a number, a name, or a combination of Character.RECORD a collection of related FACTS.Example:1.) Employee Record it is collection of FACT about one employee.2.) It indicates name, address, phone #, pay rate, earning made to date & so on.MELJUN CORTES

  • FILE is a collection of related RECORD.Example: 1.) A collection of all employee record for one company would be an Employee File. 2.) Inventory File collection of all inventory record for a particular company or organization.DATA ORGANIZATION

    Student ID# : 034456Student Name : MELJUN CORTESCourse : BSCS 4Birthday : October 2, 1975Zodiac Sign : LibraStudent ID# : 034456Student Name : MELJUN CORTESCourse : BSCS 4Birthday : October 2, 1975Zodiac Sign : Libra

    Student ID# : 034456Student Name : MELJUN CORTESCourse : BSCS 4Birthday : October 2, 1975Zodiac Sign : LibraFILERECORDMELJUN CORTES

  • DATA ORGANIZATIONHIERARCHY OF DATA :CHARACTER are combined to make a Fact.

    FACT are combined to make Record.

    RECORD are combined to make File.

    FILE are combined to make DataBase

    DataBaseFileRecordFactCharacterNote: The Heart of most Organization is DATA.DataBase is a collection of integrated & related master file.

    Note: A data base is used as the raw material or input data for all of the application system perform by the organization.MELJUN CORTES

  • DATABASE SYSTEM

    MELJUN CORTESEach ROW is a RECORD.Each COLUMN is a FIELD.COLUMN TITLES are FIELD NAME.The type of DATA stored in a FIELD is a FIELD TYPE.The number of CHARACTER in a FIELD is its FIELD WIDTH.A DATABASE is composed of one or more TABLE.A DATABASE is a FILE which is created in automated DBMS SOFTWARE.FIELD NAMERECORDRECORDRECORDRECORDTABLE

    NumberDateCustomerAmount 101Oct 30, 2009MELJUN CORTES12,500102Dec. 12, 2009PIOLO PASCAUL78,452103Nov. 15,2009MARTIN RIVERA89,500104Jan. 14,2010SAM MELBY10,500

  • MELJUN CORTESDATABASE SYSTEM

    EXAMPLE OF DATABASE STRUCTURE:Structure for Database :C:\STLMASTER.dbfNumber of Data Records : 268 recordsDate of last update : 10/26/1996Filename of DATABASE FILE : STLMASTER.dbf

    Field Field Name Field Data Types Field Width Dec IndexAppNumbercharacter 6 AppDate date 8Namecharacter 20Address character 30LoanAmount numeric 12 2Rebate numeric 7 2Interest numeric 7 2Balance numeric 12 2Penalty numeric 7 2

  • DATA ORGANIZATIONDATA is a raw materials or input to any data processing system. - is considered as INPUT DATA. - is manipulated to provide OUTPUT DATA.Example: Student Admission Form & Enrollment Form Pay Slip of an employee INFORMATION when this OUTPUT DATA can be used to help people make economic decision making.DATA PROCESSING is that procedures of transforming INPUT DATA into desired OUTPUT DATA.MELJUN CORTES

  • DATA ORGANIZATIONINFORMATION PROCESSING a special case of data processing is the procedure of transforming data into information which can be used to make better decision.

    Data Processing System includes all people, procedures & computer device used to produce desirable output or meaningful information.Information Processing System includes all people, procedures, computer devices used to procedure useful that can be used in decision making MELJUN CORTES

  • DATA ORGANIZATIONOverview of DATA ProcessingEx. Payroll System

    INPUTPROCESSINGOUTPUTExample:1.) Pay Rate2.) Hours Worked3.) Payroll DeductionExample:1.) Classifying2.) Sorting3.) Calculating4.) Storing5.) Summarizing6.) ReproducingExample: 1.) Pay Slip 2.) Payroll ReportMELJUN CORTES

  • INFORMATION SYSTEMHardware, Software, People, Procedures, Policies, DATA are combined to create an INFORMATION SYSTEM. The term INFORMATION SYSTEM is a generic reference to a Computer-Based System that provides the following:1.) DATA PROCESSING capabilities for a company . - DATA PROCESSING capability refers to the Systems ability to handle and process DATA.2.) INFORMATION SYSTEM people need to make better more informed Decisions. - The more sophisticated INFORMATION SYSTEMS provide Decision Makers with ON-DEMAND REPORTS and INQUIRY CAPABILITIES as well as routine periodic reports.MELJUN CORTES

  • DATABASE SYSTEM

    MELJUN CORTES

  • Database ConceptsData vs.InformationDBMSDATABASE SYSTEMMELJUN CORTES

  • DatabaseComputerized Record Keeping SystemCollection of Data used by an organization to

    Record its OperationsSupport Decision MakingMELJUN CORTES

  • Data

    Raw facts and figures

    Can be of type

    TextNumberSound, Image, Chart, VideoMELJUN CORTESDATABASE SYSTEM

  • Information

    Processed DataUsed for Decision Making

    Data is also INFORMATIONInformation creates DATAMELJUN CORTESDATABASE SYSTEM

  • MELJUN CORTESDATABASE SYSTEM

    EXAMPLE OF DATABASE STRUCTURE:Structure for Database :C:\STLMASTER.dbfNumber of Data Records : 268 recordsDate of last update : 10/26/1996Filename of DATABASE FILE : STLMASTER.dbf

    Field Field Name Field Data Types Field Width Dec IndexAppNumbercharacter 6 AppDate date 8Namecharacter 20Address character 30LoanAmount numeric 12 2Rebate numeric 7 2Interest numeric 7 2Balance numeric 12 2Penalty numeric 7 2

  • DATABASE SYSTEM

    MELJUN CORTESEach ROW is a RECORD.Each COLUMN is a FIELD.COLUMN TITLES are FIELD NAME.The type of DATA stored in a FIELD is a FIELD TYPE.The number of CHARACTER in a FIELD is its FIELD WIDTH.A DATABASE is composed of one or more TABLE.A DATABASE is a FILE which is created in automated DBMS SOFTWARE.FIELD NAMERECORDRECORDRECORDRECORDTABLE

    NumberDateCustomerAmount 101Oct 30, 2009MELJUN CORTES12,500102Dec. 12, 2009PIOLO PASCAUL78,452103Nov. 15,2009MARTIN RIVERA89,500104Jan. 14,2010SAM MELBY10,500

  • A DataBase Management System (DBMS)often just called Database SoftwareSources DocumentsLike:Enrollment FormsPrintedDocumentsLike:Assessment FormsMELJUN CORTES

  • Database Terminology

    An organised collection (or Store) of data.A collection of related records, such as all the pupil records in a class.A collection of related fields, such as a pupils record.An individual data item, such as Firstname or Date of Birth.Type of information in a field such astext, numeric, date and boolean (Yes/No)MELJUN CORTES

    TermMeaningDatabaseTable

    Record

    Field

    Data Type

  • The Russian Doll AnalogyFields inside ofA DatabaseTables inside ofRecords inside ofData inside ofMELJUN CORTESDATABASE SYSTEM

  • DATABASE SYSTEM

    MELJUN CORTESEach ROW is a RECORD.Each COLUMN is a FIELD.COLUMN TITLES are FIELD NAME.The type of DATA stored in a FIELD is a FIELD TYPE.The number of CHARACTER in a FIELD is its FIELD WIDTH.A DATABASE is composed of one or more TABLE.A DATABASE is a FILE which is created in automated DBMS SOFTWARE.FIELD NAMERECORDRECORDRECORDRECORDTABLE

    NumberDateCustomerAmount 101Oct 30, 2009MELJUN CORTES12,500102Dec. 12, 2009PIOLO PASCAUL78,452103Nov. 15,2009MARTIN RIVERA89,500104Jan. 14,2010SAM MELBY10,500

  • MELJUN CORTESDATABASE SYSTEM

    EXAMPLE OF DATABASE STRUCTURE:Structure for Database :C:\STLMASTER.dbfNumber of Data Records : 268 recordsDate of last update : 10/26/1996Filename of DATABASE FILE : STLMASTER.dbf

    Field Field Name Field Data Types Field Width Dec IndexAppNumbercharacter 6 AppDate date 8Namecharacter 20Address character 30LoanAmount numeric 12 2Rebate numeric 7 2Interest numeric 7 2Balance numeric 12 2Penalty numeric 7 2

  • What is a DBMS?A collection of computer programs that allow storage, modification, and extraction of information from a database. There are many different types of DBMS ranging from small systems that run on personal computers to huge systems that run on mainframes.Examples--Computerized library systems, automated teller machines, flight reservation systems, computerized parts inventory systems. MELJUN CORTESDATABASE SYSTEM

  • Introduction To DBMS Concepts

    MELJUN CORTESDATABASE SYSTEM

  • What is a DBMS?A collection of computer programs that allow storage, modification, and extraction of information from a database. There are many different types of DBMS ranging from small systems that run on personal computers to huge systems that run on mainframes.Examples--Computerized library systems, automated teller machines, flight reservation systems, computerized parts inventory systems. MELJUN CORTESDATABASE SYSTEM

  • Examples of DATABASE(1)Admission System Examination System Library SystemPayroll & Personnel Management SystemAccounting SystemHotel Reservation SystemAirline Reservation System

    MELJUN CORTESDATABASE SYSTEM

  • Examples of DATABASE (2)Patient Recording SystemInventory SystemSales and Purchase and Accounting SystemEnrollment SystemKnowledge-Based Management System

    Every Government, Military, Private and other organizations plus Individual can make use of DB

    DATABASE SYSTEMMELJUN CORTES

  • Data Management

    Manual Filing SystemComputerized Filing SystemDatabase Systems

    DATABASE SYSTEMMELJUN CORTES

  • Filing System

    Every Department/Company has its own

    Data File(s)

    Application to Maintain Data File(s) -- Computerized Data Maintenance SystemDATABASE SYSTEMMELJUN CORTES

  • Library System - Example

    MembersCatalogRegisterMembersManagementApplicationCatalogManagementApplicationTransactionManagementApplicationLists of All Members, New Members, Joins between specified Dates. etcLists of All Books, New Books, Issued Books, Lost Books,. etcBooks Issued Today,Books Receipt Today,etcFilesApplicationsOperationsDATABASE SYSTEMMELJUN CORTES

  • Database SystemSingle, Central, Large Repository

    Shared Resource

    Have Logical Connections among data items

    DBA is responsible of its design, creation and maintenanceDATABASE SYSTEMMELJUN CORTESIs a PERSON

  • Library System - Example

    MembersManagementApplicationCatalogManagementApplicationTransactionManagementApplicationLists of All Members, New Members, Joins between specified Dates. etcLists of All Books, New Books, Issued Books, Lost Books,. etcBooks Issued Today,Books Receipt Today,etc

    Members

    Catalog

    RegisterDBMSDatabaseDATABASE SYSTEMMELJUN CORTES

  • DBMSSoftware Package that provides

    Support to applications system -- Computerized DATA HandlingUser-interface for on-line queriesDATABASE SYSTEMMELJUN CORTES

  • Advantages of DBMS (1)Sharing of DataControl of Redundancy-(unnecessary wastage of disk space)Data ConsistencyImprovement of Data StandardsImprovement of Data Integrity-(Intra-record, inter-record, referential)Balancing of ConflictsFaster Development of New ApplicationsDATABASE SYSTEMMELJUN CORTES

  • Advantages of DBMS (2)Better SecurityPasswordsEncryptionViews and Stored ProceduresBetter Data Accessibility(query language- SQL programming)Economy of ScaleTransaction handlingBetter backup and Recovery ProceduresDATABASE SYSTEMMELJUN CORTES

  • Disadvantages of DBMSHigher Costs ofDBMSHardwareConversionProgrammingSlow Processing of Some ApplicationsMore Security RisksMore Difficult RecoveryDATABASE SYSTEMMELJUN CORTES

  • Kinds of Databases

    Relational: Oracle 9i/8i, SQL-Server 2000/7.0/6.5,Teradata, Sybase(SQL Anywhere),DB2, InformixMS-Access, Foxpro 2.6/2.5,dbase IV/3 +Network e.g. IDS ServerParadox, FoxBase, Dbase3+, DbaseIVDBU, Visual FoxPro, MS-Access Windows 7

    DATABASE SYSTEMMELJUN CORTES

  • Relational DBMSDATABASE SYSTEMTABLETABLETABLETABLE

  • Important RDBMS ObjectsTablesViewsTriggersStored ProceduresFunctionsPrimary KeyForeign Key

    DATABASE SYSTEMMELJUN CORTES

  • Networked DBMSMELJUN CORTESDATABASE SYSTEM

  • SQL:

    It is an acronym for Structured Query Language. It is the language in which, the client sends the request to the database for data Eg. Select name, address From emp Where city = BUTUAN CITYSQL:MELJUN CORTESDATABASE SYSTEM

  • PL/SQL:It is an acronym for Programming Language/Structured Query Language Apart from writing the SQL you also have the programming language constructs like If then else (checking conditions) Looping (Executing the set of statements more that once) Exception and error handling (Taking care of run time errors)

    MELJUN CORTESDATABASE SYSTEM

  • Database DesignDatabase design is the process of producing a detailed data model of a database. This logical data model contains all the needed logical and physical design choices and physical storage parameters needed to generate a design in a Data Definition Language, which can then be used to create a database. A fully attributed data model contains detailed attributes for each entity.

    Process:Determine the data to be stored in the databaseDetermine the relationships between the different data elementsSuperimpose a logical structure upon the data on the basisof these relationships.

    MELJUN CORTESDATABASE SYSTEM

    *

  • Database ObjectsA Database Trigger is procedural code that is automatically executed in response to certain events on a particular table in a database. Triggers can restrict access to specific data, perform logging, or audit data modifications.

    A Database View is a virtual or logical table composed of the result set of a query. Unlike ordinary tables (base tables) in a relational database, a view is not part of the physical schema: it is a dynamic, virtual table computed or collated from data in the database. Changing the data in a table alters the data shown in the view

    In relational databases, SQL databases, and flat file databases,a Table is a set of data elements (values) that is organized using a model of horizontal rows and vertical columns. MELJUN CORTESDATABASE SYSTEM

    *

  • In database packages, the term Cursor refers to a control structure for the successive traversal (and potential processing) of records in a result set.

    A Transaction Log (also database log or binary log) is a history of actions executed by a database management system to guarantee ACID properties over crashes or hardware failures. Physically, a log is a file of updates done to the database, stored in stable storage.

    A Database Index is a data structure that improves the speed of operations in a table. Indexes can be created using one or more columns, providing the basis for both rapid random lookups and efficient ordering of access to records.

    A Stored Procedure is a subroutine available to applications accessing a relational database system. Stored procedures (sometimes called a sproc or SP) are actually stored in the database.

    Database ObjectsDATABASE SYSTEMMELJUN CORTES

    *

  • NormalizationWhy Normalize?

    Ideally, a relational database table should be designed in such a way as to exclude the possibility of update, insertion, and deletion anomalies. The normal forms of relational database theory provide guidelines for deciding whether a particular design will be vulnerable to such anomalies. It is possible to correct an unnormalized design so as to make it adhere to the demands of the normal forms: this is called normalization.

    A table that is not sufficiently normalized can suffer from logical inconsistencies of various types, and fromanomalies involving data operations causingUpdate, Insert and Delete Anomalies.

    MELJUN CORTESDATABASE SYSTEM

    *

  • TRANSACTION MANAGEMENTWhat is a Database Transaction ?

    A database transaction is a unit of interaction with a database management system or similar system that is treated in a coherent and reliable way independent of other transactions. In general, a database transaction must be atomic, meaning that it must be either entirely completed or aborted. Ideally, a database system will guarantee the properties of Atomicity, Consistency, Isolation and Durability (ACID) for each transaction.

    A Simple TransactionBegin the transactionExecute several queries Commit the transaction

    MELJUN CORTESDATABASE SYSTEM

    *

  • ACIDIn computer science, ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties that guarantee that database transactions are processed reliably. In the context of databases, a single logical operation on the data is called a transaction.

    Atomicity - Atomicity refers to the ability of the DBMS to guarantee that either all of the tasks of a transaction are performed or none of them are.Consistency - Consistency refers to the database being in a legal state when the transaction begins and when it ends. This means that a transaction cannot break the rules, or integrity constraints, of the database.Isolation - Isolation refers to the ability of the application to make operations in a transaction appear isolated from all other operationsDurability -Durability ensures that the results of a completed transaction are permanent and can survive future system and media failures; that is, once they are done, they can not be undone.

    DATABASE SYSTEMMELJUN CORTES

    *

  • Kinds of Database ConsultantsDATABASE Designers

    is a personDATABASE Developers

    is a personDBA (Data Base Administrator)

    is a personDATABASE SYSTEMMELJUN CORTES

  • DATABASE Designers:These consultants Analyze, design the complete structure of the database.

    They design Tables, Views, Normalization, ER Diagram, Integrity constraints, etc.

    DATABASE SYSTEMMELJUN CORTES

  • DATABASE Developers:These consultant write stored procedures, triggers, functions, etc.Technical terms found in the resume of such consultants TriggersStored ProceduresPackagesUnix Shell Scripting

    DATABASE SYSTEMMELJUN CORTES

  • DBADMINISTRATOR:These consultants profile includes installation, configuration, migration, backup, recovery operationsVarious Tasks of the DBA are:

    a) Granting accessb) User creation and deletionc) Performance tuningd) Query optimizationDATABASE SYSTEMMELJUN CORTES

  • Related Skills in DATABASE SYSTEMData Warehousing Development of a data warehouse includes development of systems to extract data from operating systems plus installation of a warehouse database system that provides managers flexible access to the data Data MiningA class of database applications that look for hidden patterns in a group of data that can be used to predict future behavior Data ModelingThe analysis of data objects and their relationships to other data objects. Data modeling is often the first step in database design and object-oriented programming as the designers first create a conceptual model of how data items relate to each other. Data modeling involves a progression from conceptual model to logical model to physical schema.

    MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

  • MELJUN CORTES

    *

    *

    *

    *

    *

    *