Files and Databases - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Files and Databases

Description:

Describing cardinality in a DB. Employee. Employee. Employee. Social Security Card. Timecard ... A relational database is perceived by its users to be a ... – PowerPoint PPT presentation

Number of Views:70
Avg rating:3.0/5.0
Slides: 24
Provided by: laszlo6
Category:

less

Transcript and Presenter's Notes

Title: Files and Databases


1
Files and Databases
  • Novel uses of available business data
  • what's the purpose of business data?
  • of databases?

2
Significance of data to business success
3
Some data concepts hierarchy
  • Databases
  • Files
  • Records
  • Fields
  • Bytes
  • Bits
  • Examples?

4
Data descriptors
  • Entities
  • Occurrences
  • Attributes
  • Primary keys
  • Foreign keys
  • Role of data dictionary (DD)

5
Data relationshipsassociations between entities.
Attributes
Attributes
Relationship
6
File based approach vs. Database based approach
  • File based approach
  • Simple to build
  • Inexpensive to build / high cost to maintain
  • Data redundancy
  • Software is data dependent
  • Difficulty updating
  • Proliferation of files
  • Database approach
  • Difficult to build
  • Need expertise
  • Reduced redundancy
  • No data dependency
  • Ease of update
  • Reliability
  • Simple files

7
Data terminology
  • A variable-length field expands to fit the data
    you enter.
  • A fixed-length field contains a predetermined
    number of bytes.

8
Data terminology (contd.)
  • The data type specifies the way data is
    represented on the disk and in RAM.
  • Every field in a file is assigned a data type
  • Numeric data
  • Character data
  • Date data
  • Logical data
  • Memo fields

9
A flat file (table file).
  • Sometimes used to refer to a data file in
    which all records have same
  • field names,
  • field lengths,
  • data types.
  • See Excel files
  • When using several flat files to accomplish a
    task the computer must work back and forth
    between the files.

10
Databases
  • A database has more flexibility than a flat file
    but is more difficult to design and maintain.
  • A database administrator supervises database
    design, development, testing, and maintenance.
  • More expensive
  • More prone to crash

11
Describing cardinality in a DB
one to one one to many many to many
Employee
Employee
Employee
Timecard
Job
Social Security Card
12
Data models
  • Hierarchical
  • Relational
  • Network

13
Hierarchical data model
Department is the root node. It is also the
parent node for the Employee and Job entities.
Department
The child nodes--Employee, Timecard, and
Job--have only one parent node. Department is the
parent node for Employee and Job. Employee is the
parent node for Timecard. Notice that Employee is
both a child node and a parent node.
Employee
Job
Timecard
14
Hierarchical data models
  • The simplest database model arranges record types
    as a hierarchy, or a hierarchical database.
  • A record type in a hierarchical database is
    called a node or a segment.
  • top node root node
  • parent node can have more than one child node
  • child node can have only one parent node (see
    Windows and UNIX file structures)
  • In a hierarchical database, physical links are
    created between the stored records.
  • effective for data that has simple relationships
  • less effective for complex relationships and that
    require flexible data access
  • See manufacturing firms!

15
Relational data models
  • A relational database is perceived by its users
    to be a collection of tables which are roughly
    equivalent to a collection of record types.
  • rows of a table are called tuples (a.k.a.
    records)
  • columns of a table are called attributes (a.k.a.
    fields)
  • In a relational model, records are related to the
    data stored jointly in the fields of records in
    two files.
  • Flexibility to define relationships
  • Small firms use it!

16
Relational data models
The data for each record is stored in a table. A
relational database for a hospital would have
four tables Employee, Timecard, Job, and
Department. Note that Job and Department are not
yet related.
Data from the two tables can be combined by
matching the data in two fields. For example, the
data in the Employee and the Timecard tables can
be joined by matching the data in the SocNum
field.
17
Network data model
  • In a network database, related record types are
    referred to as a set.
  • A set contains an owner which is similar to a
    parent record.
  • also contains members (like child records)
  • Only one-to-many relationships are allowed in
    the network database model.
  • The network database model allows member records
    to have more than one owner.
  • more flexibility than hierarchical

18
Network data model
One to many only!
In a network database, records are classified as
owners or members. Department and Job are owners
in relation to Employee. Employee is an owner in
relation to Timecard. Employee is a member under
Department or Job. Timecard is a member under
Employee.
Job
Department
Job
Employee
Employee
The network database model allows a member to
have more than one owner. Here the member
Employee has two owners Job and Department.
An owner and its member or members are referred
to as a set. Here the owner, Job, and the
member, Employee, are a set. You could refer to
the this section of the model as the Employment
set.
Timecard
19
Database applications
  • Data warehouses - use many data sources regarding
    the organization
  • Manufacturing
  • Inventory management
  • Vendors
  • Customer service
  • Marketing

20
Database applications (contd)
  • Data marts targeted components of data
    warehouses
  • Specific to departments and small businesses
  • Narrow market data analysis

21
Database applications (contd)
  • Data mining analysis tool, using statistical
    techniques, extracting intelligence from data
    warehouses and data marts.
  • Find patterns, trends, cycles, habits, practices,
    and rules
  • Recommend findings to managers to incorporate
    into tactical and strategic decisions

22
So what is the purpose of a database?
  • We display the relationships among all the data
    relevant to the organization.
  • As a database user, you play a crucial role in
    developing database applications for your
    business or organization.
  • Spreadsheets are good for tracking items with
    just one theme (as shown above) versus a database
    that tracks things involving more than one theme
    (as shown in example above).

23
End files and databases
Write a Comment
User Comments (0)
About PowerShow.com