Presentation is loading. Please wait.

Presentation is loading. Please wait.

Muhamad AbduhInstitut Teknologi Bandung5.1 W e e k 5 5 DATABASE.

Similar presentations


Presentation on theme: "Muhamad AbduhInstitut Teknologi Bandung5.1 W e e k 5 5 DATABASE."— Presentation transcript:

1 Muhamad AbduhInstitut Teknologi Bandung5.1 W e e k 5 5 DATABASE

2 Muhamad AbduhInstitut Teknologi Bandung5.2 FILE ORGANIZATION BIT: Binary Digit (0,1; Y,N; On,Off) BYTE: Combination of BITS which represent a CHARACTER FIELD: Collection of BYTES which represent a DATUM or Fact RECORD: Collection of FIELDS which reflect a TRANSACTION *

3 Muhamad AbduhInstitut Teknologi Bandung5.3 FILE ORGANIZATION FILE: A Collection of similar RECORDS DATABASE: An Organization’s Electronic Library of FILES organized to serve business applications *

4 Muhamad AbduhInstitut Teknologi Bandung5.4 FILE ORGANIZATION ENTITY: Person, place, thing, event about which data must be kept ATTRIBUTE: Description of a particular ENTITY KEY FIELD: Field used to retrieve, update, sort RECORD *

5 Muhamad AbduhInstitut Teknologi Bandung5.5 KEY FIELD Field in Each Record Uniquely Identifies THIS Record For RETRIEVAL UPDATING SORTING *

6 Muhamad AbduhInstitut Teknologi Bandung5.6 DATA REDUNDANCY PROGRAM / DATA DEPENDENCY LACK OF FLEXIBILITY POOR SECURITY LACK OF DATA SHARING & AVAILABILITY * PROBLEMS WITH TRADITIONAL FILE ENVIRONMENT

7 Muhamad AbduhInstitut Teknologi Bandung5.7 SEQUENTIAL VS. DIRECT FILE ORGANIZATION SEQUENTIAL: Tape oriented; one file follows another; follows physical sequence DIRECT: Disk oriented; can be accessed without regard to physical sequence *

8 Muhamad AbduhInstitut Teknologi Bandung5.8 FILING METHODS INDEXED SEQUENTIAL ACCESS METHOD (ISAM) : –EACH RECORD IDENTIFIED BY KEY –GROUPED IN BLOCKS AND CYLINDERS –KEYS IN INDEX VIRTUAL STORAGE ACCESS METHOD (VSAM) : –MEMORY DIVIDED INTO AREAS & INTERVALS –DYNAMIC FILE SPACE VSAM WIDELY USED FOR RELATIONAL DATABASES DIRECT FILE ACCESS METHOD *

9 Muhamad AbduhInstitut Teknologi Bandung5.9 DIRECT FILE ACCESS METHOD EACH RECORD HAS KEY FIELD KEY FIELD FED INTO TRANSFORM ALGORITHM ALGORITHM GENERATES PHYSICAL STORAGE LOCATION OF RECORD (RECORD ADDRESS) *

10 Muhamad AbduhInstitut Teknologi Bandung5.10 DATABASE MANAGEMENT SYSTEM (DBMS) SOFTWARE TO CREATE & MAINTAIN DATA ENABLES BUSINESS APPLICATIONS TO EXTRACT DATA INDEPENDENT OF SPECIFIC COMPUTER PROGRAMS *

11 Muhamad AbduhInstitut Teknologi Bandung5.11 COMPONENTS OF DBMS: DATA DEFINITION LANGUAGE: –Defines data elements in database DATA MANIPULATION LANGUAGE: –Manipulates data for applications DATA DICTIONARY: –Formal definitions of all variables in database, controls variety of database contents, data elements *

12 Muhamad AbduhInstitut Teknologi Bandung5.12 STRUCTURED QUERY LANGUAGE (SQL) EMERGING STANDARD DATA MANIPULATION LANGUAGE FOR RELATIONAL DATABASES *

13 Muhamad AbduhInstitut Teknologi Bandung5.13 ELEMENTS OF SQL SELECT: List of columns from tables desired FROM: Identifies tables from which columns will be selected WHERE: Includes conditions for selecting specific rows, conditions for joining multiple tables *

14 Muhamad AbduhInstitut Teknologi Bandung5.14 TWO VIEWS OF DATA PHYSICAL VIEW: Where is data physically? –DRIVE, DISK, SURFACE, TRACK, SECTOR (BLOCK), RECORD –TAPE, BLOCK, RECORD NUMBER (KEY) LOGICAL VIEW: What data is needed by application? –SUCCESSION OF FACTS NEEDED BY APPLICATION –NAME, TYPE, LENGTH OF FIELD *

15 Muhamad AbduhInstitut Teknologi Bandung5.15 RELATIONAL DATA MODEL DATA IN TABLE FORMAT RELATION: TABLE TUPLE: ROW (RECORD) IN TABLE FIELD: COLUMN (ATTRIBUTE) IN TABLE *

16 Muhamad AbduhInstitut Teknologi Bandung5.16 TYPES OR RELATIONS ONE-TO-ONE: STUDENT ID ONE-TO-MANY: CLASS STUDENT A STUDENT B STUDENT C MANY-TO-MANY: STUDENT A STUDENT B STUDENT C CLASS 1 CLASS 2

17 Muhamad AbduhInstitut Teknologi Bandung5.17 ROOT FIRST CHILD 2nd CHILD RatingsSalary Compensation Job Assignments PensionInsuranceHealth Benefits Employer HIERARCHICAL DATA MODEL

18 Muhamad AbduhInstitut Teknologi Bandung5.18 NETWORK DATA MODEL VARIATION OF HIERARCHICAL MODEL USEFUL FOR MANY-TO-MANY RELATIONSHIPS * NETWORK A NETWORK B NETWORK C NETWORK 1 NETWORK 2

19 Muhamad AbduhInstitut Teknologi Bandung5.19 OTHER SYSTEMS LEGACY SYSTEM: older system OBJECT - ORIENTED DBMS: stores data & procedures as objects OBJECT - RELATIONAL DBMS: hybrid *

20 Muhamad AbduhInstitut Teknologi Bandung5.20 CREATING A DATABASE CONCEPTUAL DESIGN PHYSICAL DESIGN *

21 Muhamad AbduhInstitut Teknologi Bandung5.21 CREATING A DATABASE CONCEPTUAL DESIGN: ABSTRACT MODEL, BUSINESS PERSPECTIVE HOW WILL DATA BE GROUPED? RELATIONSHIPS AMONG ELEMENTS ESTABLISH END-USER NEEDS *

22 Muhamad AbduhInstitut Teknologi Bandung5.22 DETAILED MODEL BY DATABASE SPECIALISTS ENTITY-RELATIONSHIP DIAGRAM NORMALIZATION HARDWARE / SOFTWARESPECIFIC * CREATING A DATABASE PHYSICAL DESIGN:

23 Muhamad AbduhInstitut Teknologi Bandung5.23 ELEMENTS OF DATABASE ENVIRONMENT DATABASE MANAGEMENT SYSTEM DATA ADMINISTRATION DATABASE TECHNOLOGY & MANAGEMENT USERS DATA PLANNING & MODELING METHODOLOGY

24 Muhamad AbduhInstitut Teknologi Bandung5.24 ENTITY- RELATIONSHIP DIAGRAM 1 1 M 1 ORDER CAN HAVE PART SUPPLIER CAN HAVE ORDER: #, DATE, PART #, QUANTITY PART: #, DESCRIPTION, UNIT PRICE, SUPPLIER # SUPPLIER: #, NAME, ADDRESS

25 Muhamad AbduhInstitut Teknologi Bandung5.25 NORMALIZATION PROCESS OF CREATING SMALL DATA STRUCTURES FROM COMPLEX GROUPS OF DATA EXAMPLES: ACCOUNTS RECEIVABLE PERSONNEL RECORDS PAYROLL *

26 Muhamad AbduhInstitut Teknologi Bandung5.26 Requirements of the normalization process –Forms a lossless decomposition. The replacement of a relation by several others should not result in the loss of any information The decomposed relations, when rejoined form the original relation Normalization Requirements M. Tamer Özsu and Patrick Valduriez (1999) Principles of Distributed Database Systems, Second Edition; Prentice Hall, New Jersey.

27 Muhamad AbduhInstitut Teknologi Bandung5.27 Normalization Anomalies Transforms arbitrary relation schemes into ones that do not contain the following kinds of problems: Repetition anomaly Update anomaly Insertion anomaly Deletion anomaly

28 Muhamad AbduhInstitut Teknologi Bandung5.28 Repetition Anomaly Information repeated unnecessarily wastes space, and is contrary to the basic concept of a relational database Smith’s and Lee’s basic employee data is repeated

29 Muhamad AbduhInstitut Teknologi Bandung5.29 updates are problematic because of the repetition of data; each of the multiple locations must be updated simultaneously Update Anomaly Lee’s classification change requires both job records to be changed.

30 Muhamad AbduhInstitut Teknologi Bandung5.30 Insertion Anomaly: –adding new information to the database may not be allowed –unnormalized data stores may require null values in concatenated keys in order to add base table data. Employee = [empNo, empName, classification, jobNumber, jobAssignment] Normalization –employee can’t be added without a job number

31 Muhamad AbduhInstitut Teknologi Bandung5.31 The converse of the insertion anomaly –Employee = [empNo, empName, classification, jobNumber, jobAssignment] if the job no longer exists it can’t be deleted without removing the employee as well Deletion Anomaly

32 Muhamad AbduhInstitut Teknologi Bandung5.32 Normalization, the solution. Employee = [empNo, empName, classification, salary, {jobNumber, jobAssignment, duration}] The Universal Relation:

33 Muhamad AbduhInstitut Teknologi Bandung5.33 Universal Relation: Employee = [empNo, empName, classification, salary,{jobNumber, jobAssignment, duration}] First Normal Form: –Is there only one value for each row and column intersection? Normalization

34 Muhamad AbduhInstitut Teknologi Bandung5.34 First Normal Form: Employee = [empNo, empName, classification, salary] Assignment = [empNo, jobNumber, jobAssignment, duration] Second Normal Form: (in the Assignment entity) –Do all the nonprimary key columns depend on the entire primary key? Normalization

35 Muhamad AbduhInstitut Teknologi Bandung5.35 Second Normal Form: Employee = [empNo, empName, classification, salary] Assignment = [empNo, jobNumber, jobAssignment, duration] Third Normal Form: (in the Employee entity) –Are there any nonprimary key columns in the table that depend on other nonprimary key columns? Normalization

36 Muhamad AbduhInstitut Teknologi Bandung5.36 Third Normal Form: Employee = [empNo, empName, classification, salary] Assignment = [empNo, jobNumber, jobAssignment, duration] Back to Data Modeling 101: –Should we be satisfied with this solution? –Is it possible that there are more entities? Normalization

37 Muhamad AbduhInstitut Teknologi Bandung5.37 Back to Data Modeling 101: –Should we be satisfied with this solution? –Is it possible that there are more entities? The Data Model Employee: empNo empName classification salary Assignment: empNo jobNumber jobAssignment duration

38 Muhamad AbduhInstitut Teknologi Bandung5.38 Classification –Does the company have a finite range of classifications? –Are they standardized? –Is it possible that there are more attributes associated with a classification then are represented here? empNoempNameclassificationsalary E1J. DoeElect.Eng40000 E2M. SmithAnalyst34000 E3A. LeeMech.Eng27000 E4J. MillerProgrammer24000 E5B. CaseySyst.Anal34000 E6L. ChuElect.Eng40000 E7R.DavisMech.Eng27000 E8J. JonesSyst.Anal34000 empNojobNumberjobAssignmentduration E11001Manager12 E21001Analyst24 E21002Analyst6 E31003Consultant10 E31004Engineer48 E41002Programmer18 E51002Manager24 E61004Manager48 E71003Engineer36 E81003Manager40 Employee Assignment Data Modeling

39 Muhamad AbduhInstitut Teknologi Bandung5.39 Job Number –Is it possible that there are other attributes that describe a job? –Do we want to enforce the integrity of the values in jobAssignment as it pertains to a specific job? empNoempNameclassificationsalary E1J. DoeElect.Eng40000 E2M. SmithAnalyst34000 E3A. LeeMech.Eng27000 E4J. MillerProgrammer24000 E5B. CaseySyst.Anal34000 E6L. ChuElect.Eng40000 E7R.DavisMech.Eng27000 E8J. JonesSyst.Anal34000 empNojobNumberjobAssignmentduration E11001Manager12 E21001Analyst24 E21002Analyst6 E31003Consultant10 E31004Engineer48 E41002Programmer18 E51002Manager24 E61004Manager48 E71003Engineer36 E81003Manager40 Employee Assignment Data Modeling

40 Muhamad AbduhInstitut Teknologi Bandung5.40 DISTRIBUTED DATABASES PARTITIONED: remote CPUs (connected to host) have files unique to that site, e.g., records on local customers DUPLICATE: each remote CPU has copies of common files, e.g., layouts for standard reports and forms *

41 Muhamad AbduhInstitut Teknologi Bandung5.41 DATABASE ADMINISTRATION DEFINES & ORGANIZES DATABASE STRUCTURE AND CONTENT DEVELOPS SECURITY PROCEDURES DEVELOPS DATABASE DOCUMENTATION MAINTAINS DBMS *

42 Muhamad AbduhInstitut Teknologi Bandung5.42 DATABASE TRENDS MULTIDIMENSIONAL DATA ANALYSIS: 3D (or higher) groupings to store complex data HYPERMEDIA: Nodes contain text, graphics, sound, video, programs. organizes data as nodes. *

43 Muhamad AbduhInstitut Teknologi Bandung5.43 DATABASE TRENDS DATA WAREHOUSE: Organization’s electronic library stores consolidated current & historic data for management reporting & analysis ON-LINE ANALYTICAL PROCESSING (OLAP): Tools for multi-dimensional data analysis *

44 Muhamad AbduhInstitut Teknologi Bandung5.44 COMPONENTS OF DATA WAREHOUSE

45 Muhamad AbduhInstitut Teknologi Bandung5.45 DATABASE TRENDS DATA MART: Small data warehouse for special function, e.g., Focused marketing based on customer info DATAMINING: Tools for finding hidden patterns, relationships, for predicting trends *

46 Muhamad AbduhInstitut Teknologi Bandung5.46 DATABASE TRENDS LINKING DATABASES TO THE WEB: WEB USER CONNECTS TO VENDOR DATABASE SPECIAL SOFTWARE CONVERTS HTML TO SQL SQL FINDS DATA, SERVER CONVERTS RESULT TO HTML *

47 Muhamad AbduhInstitut Teknologi Bandung5.47 W e e k 5 5 DATABASE


Download ppt "Muhamad AbduhInstitut Teknologi Bandung5.1 W e e k 5 5 DATABASE."

Similar presentations


Ads by Google