1 basic db terms data: meaningful facts, text, graphics, images, sound, video segments –a...
Post on 20-Dec-2015
217 views
TRANSCRIPT
![Page 1: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/1.jpg)
1
Basic DB Terms
• Data: Meaningful facts, text, graphics, images, sound, video segments– A collection of individual responses from a marketing research
• Information: Data processed to be useful in decision making– Pattern of geographical buying habit based on analysis of a
marketing research
• Metadata: Data that describes data
![Page 2: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/2.jpg)
2
Data in Context
Large volume of facts, difficult to interpret / make decisions
![Page 3: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/3.jpg)
3
Information
Useful for decision making / interpretation
![Page 4: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/4.jpg)
4
Metadata
Descriptions of the properties or characteristics of the data, including data types, field sizes, allowable values, and documentation (Data Dictionary)
![Page 5: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/5.jpg)
5
Database
• Collection of data in electronic format– A digital library of organization
Managed by one set of software that provides access to all the data– No data redundancy, data inconsistency, poor security,
application-data dependency...
![Page 6: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/6.jpg)
6
Database Systems
DBMSDBMS Databasecontainingcentralized
shared data
Application#1
Application#2
Application#3
![Page 7: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/7.jpg)
7
Database Management System (DBMS)
• Database software
• Act as an interface between application and physical data files
• Support centralization of data
• Independent of specific computer programs
• small (MS Access), large/popular (Oracle)
![Page 8: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/8.jpg)
8
Database Models
• Hierarchical (Tree) Models
• Network Model
• Relational Models
![Page 9: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/9.jpg)
9
Hierarchical database Model
• Logically represented by an upside down tree– Each parent can have many children
– Each child has only one parent
![Page 10: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/10.jpg)
Hierarchical Database
![Page 11: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/11.jpg)
11
Hierarchical Database
A schematic diagram of a hierarchical database (a) and a sample part of a hierarchical database showing relationships among different records (b)
![Page 12: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/12.jpg)
12
Network Database Model
• Each record can have multiple parents– Composed of sets
– Each set has owner record and member record
– Member may have several owners
![Page 13: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/13.jpg)
Network Database
![Page 14: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/14.jpg)
14
Network Database
A schematic diagram of a network database (a) and a sample of part of a network database showing relationships among different records (b)
![Page 15: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/15.jpg)
15
Relational Database Model
• A group of related tables • Introduced in 1970 by E. F. Codd of IBM • The most popular model.
– Mathematical simplicity – Ease of visualization
![Page 16: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/16.jpg)
16
Relational Database
A schematic diagram of a relational database (a) and a sample part of a relational database showing different tables (b)
![Page 17: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/17.jpg)
17
Relational database and keys
• A relational database is a collection of tables that are related to one another based on a common field.
• A field, or a collection of fields, is designated as the primary key. – The primary key uniquely identifies a record in the table.
• When the primary key of one table is represented in a second table to form a relationship, it is called a foreign key.
![Page 18: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/18.jpg)
18
Relating tables using a common field
The primary key in the Employer table (EmployerID) is the common field that relates this table to the Position table.
PositionID is the primary key in the Position table. The EmployerID field is a foreign key in this table.
Primary keys can only have one occurrence in a table. Foreign keys may have multiple occurrences.
![Page 19: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/19.jpg)
19
Primary Key
• Unique identifiernt– Last name vs. SS#
• Prevent confusion• Cost of PK
– SS# vs. finger print
– Entity Integrity Rule– Any primary key is allowed to accept null values.
![Page 20: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/20.jpg)
20
Foreign Key
• An attribute in one table whose values must either match the primary key in another table or be null.
• The database must not contain any unmatched foreign key values.
![Page 21: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/21.jpg)
21
Figure 2
![Page 22: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/22.jpg)
22
Referential Integrity Rule
• Cascade Update Related Fields– Change of PK values in primary table automatic change of FK
values
• Cascade Delete Related Fields– Delete of a record in the primary table automatic delete of all
records in the related table that have a matching FK value
• See example from the class web site– Primary table: customer
![Page 23: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/23.jpg)
23
Relational Database Model
• Advantages– Easier database design, implementation, management, and use
– Ad hoc query capability with SQL
– Powerful database management system
![Page 24: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/24.jpg)
24
DATABASE MODEL PRODUCT VENDOR HARDWAREHierarchical Focus Information Builders International Mainframe/PC
IMS IBM MainframeRamis Online Software International Mainframe
Network ADABAS Software AG of North America MainframeImage Hewlett-Packard Mainframe
Relational Access Microsoft PCDB2 IBM MainframedBASE V Borland International PCEDA/SQL Information Builders International PCFoxPro Microsoft PCIngres Ask Group PCNOMAD Must Software International Mainframe/PCOracle Oracle Mainframe/PCParadox Borland International PCRbase Microrim PCSQL/DS IBM MainframeSQL Server Microsoft PCSybase Sybase PC
Object-Relational ObjectStore Object Design PCUniversalServer
Informix PC
Illustra Informix PC
![Page 25: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/25.jpg)
25
Basic Components of DBMS
• Data dictionary
• DDL (Data Definition Language)
• DML (Data Manipulation Language)
![Page 26: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/26.jpg)
26
The Data Dictionary (Metadata) - description of every piece of data in database - Maintains all information supplied by the developer when constructing the schema
A typical data dictionary for a staff file
![Page 27: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/27.jpg)
27
Data definition language to create a schema in NOMAD
• Data Definition Language (DDL)– language to create and modify data
– Access table with data type, description, and field properties
![Page 28: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/28.jpg)
28
• Data Manipulation Language (DML)– language that process, update, and retrieve data– Access query
A Paradox query by example
![Page 29: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/29.jpg)
29
Structured Query Language (SQL)
• Standard Query Language (SQL) is the relational model’s standard language.
• Another way to generate queries– MS Access: queries by QBE
– Other DBMSs: queries by SQL
![Page 30: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/30.jpg)
30
Example of SQL• You want to see the address of each employee: FirstName, LastName,
Address, City, and State
EmployeeAddressTable
SSN FirstName LastName Address City State
512687458 Joe Smith 83 First Street Howard Ohio
758420012 Mary Scott 842 Vine Ave. Losantiville Ohio
102254896 Sam Jones 33 Elm St. Paris New York
876512563 Sarah Ackerman 440 U.S. 110 Upton Michigan
![Page 31: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/31.jpg)
31
Example of SQL• SELECT FirstName, LastName, Address, City, State
FROM EmployeeAddressTable;
First Name Last Name Address City State
Joe Smith 83 First Street Howard Ohio
Mary Scott 842 Vine Ave. Losantiville Ohio
Sam Jones 33 Elm St. Paris New York
Sarah Ackerman 440 U.S. 110 Upton Michigan
SQL tutorial: w3.one.net/~jhoffman/sqltut.htm
![Page 32: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/32.jpg)
32
Database Design Process
Problem Domain
Conceptual Design
Logical Design
Physical Design
Logical Schema
Conceptual Schema
Physical Schema
![Page 33: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/33.jpg)
33
Conceptual DesignConceptual Design
• The conceptual design is a high level description of the structure of the database, independent of the particular DBMS software that will be used to implement the database.
• The conceptual design revolves around discovering and analyzing organizational and users data requirements. – What data is important
– What data should be maintained
• The major activity of this phase is constructing a data model (Entity-Relationship Diagram).
![Page 34: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/34.jpg)
Data Model: Entity-Relationship Diagram
![Page 35: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/35.jpg)
35
Why Conceptual Modeling is Important?
• Effective Communication Tool
• User involvement
• Independence from a particular DBMS
• Documentation
![Page 36: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/36.jpg)
36
Logical Design
• The logical design is a description of the structure of the database that can be processed by the DBMS software. In other words, the logical design adapts the conceptual design to a specific DBMS implementation model
• Thus, the logical design is software-dependent.
• Logical Models
– Relational Model
– Network Model
– Hierarchical Model
![Page 37: 1 Basic DB Terms Data: Meaningful facts, text, graphics, images, sound, video segments –A collection of individual responses from a marketing research](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d435503460f94a1e7dc/html5/thumbnails/37.jpg)
37
Physical Design
• The physical design describes the storage structures and
data access methods used in system. In other words, the
physical design is a description of the implementation of
the database in secondary memory.