Download Document

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts

Clusterpoint wikipedia, lookup

Relational model wikipedia, lookup

Database model wikipedia, lookup

Concurrency control wikipedia, lookup

Versant Object Database wikipedia, lookup

Database wikipedia, lookup

Entity–attribute–value model wikipedia, lookup

Business intelligence wikipedia, lookup

Open data in the United Kingdom wikipedia, lookup

Data vault modeling wikipedia, lookup

Data model wikipedia, lookup

Information privacy law wikipedia, lookup

Data analysis wikipedia, lookup

Data center wikipedia, lookup

Expense and cost recovery system (ECRS) wikipedia, lookup

Transcript
Chapter 5
Relationships & Queries in
Databases
Types of Relationships
One to One
 Examples?
 Analysis Technique




Consider ThingA and ThingB
Can ThingA be related to more than one ThingB?
Can ThingB be related to more than one ThingA?
If the two answers are NO, then it is a one to one
relationship.
Types of Relationships
One to Many
 Examples?
 Analysis Technique




Consider ThingA and ThingB
Can ThingA be related to more than one ThingB?
Can ThingB be related to more than one ThingA?
If the answers are no and yes, or yes and no, then
the relationship is one to many.
Types of Relationships
Many to Many
 Examples?
 Analysis Technique




Consider ThingA and ThingB
Can ThingA be related to more than one ThingB?
Can ThingB be related to more than one ThingA?
If the answers are yes and yes, then you have a
many to many relationship
Hierarchical
Leads to Serious
Data Redundancy
Hierarchical
Network
Network
Difficult to manage
and implement
relationships
Relational
The most popular
structure
Relational
Orders
OID
CID
PID
Quantity
001
508
199
500,000
002
508
201
2
003
510
201
1
Customers
Products
CID
FName
LName
Address
PID
Description
Cost
508
Eric
Breimer
...
199
Viagra
$45.99
509
Andrew
Zych
...
200
Tooth Paste
$2.58
510
Greg
Smith
...
201
Hair Gel
$5.99
Find the name and hire date of the manager working on the
sales manual project
Schemas
Schema - A description
of the database
Subschema – describes
a subset of the database
and which users have
access to this subset
Data Definition Language



Language Used to
describe Schemas
and Subschemas
Describes
relationships between
different data
Provides a Logical
view of the data
Data Dictionary Entry



A more detailed
description of the
data in a database
Specifies data types
and ranges
Assists programmers
in understanding the
data
Logical vs. Physical Access Paths

Database Management Systems
concentrate on Physical access
to the underlying tables




Concurrency control
Query’s
Creating/deleting tables
MIS systems are often software
packages that (Logically)
interface with a DBMS



monthly reports
charts
automated inquiries