0% found this document useful (0 votes)
45 views

Notes On Book PVFC Data MDM 12e

AAA s

Uploaded by

Cheng Chin Hwa
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

Notes On Book PVFC Data MDM 12e

AAA s

Uploaded by

Cheng Chin Hwa
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Pine Valley Furniture Company Databases

The Modern Database Management web sites for both instructors and students contain two
versions (called ‘Book’ and ‘Expanded’) of Pine Valley Furniture Company (PVFC), based on Figure 2-22
of the textbook. This figure shows a subset of the attributes available in the databases.

The files for the book version, covered here, contains the tables of Figure 2-22, along with much of
the sample data used in Chapter 1, 6, and 7. The tables and data are stored in five ways.

1. There is an MS Access version. Use of this version requires that MS Access or later be loaded and
operational on a computer. Copy the file PVFC_MDM_12e.mdb to the hard drive and open the
file. This version also includes the MS Access queries that match most of the SQL queries
demonstrated in Chapters 6 and 7. You may convert the file to the current version of Access you
are using.

2. There is an Oracle 12c version. An SQL script to create the tables and populate them in Oracle
12c is also included. Use of this script assumes access to Oracle 12c and SQL*Plus 3.3 (or later,
or a recent version of Oracle’s SQL Developer), and authorization to create tables. Move the
CREATEPVFC_MDM_12e.sql script to the hard drive. After entering SQL*Plus, at the SQL
prompt type Start X:\CREATEPVFC_MDM_12e.sql, where X indicates the location of the SQL
script. Pressing enter should cause the script to run, creating the tables and populating them. If
you have SQL Server Management Studio or SQL Server Management Studio Express installed,
this file, with its .sql extension, may be identified as a SQL Server file. However, it will not run
under SQL server, because it uses Oracle syntax.

3. There is a SQL Server 2005 version. The CREATE and INSERT scripts are zipped in a file named
PVFScripts_MDM_12e.zip. The database can be created with a script called
PVFDB_MDM_12e.sql. Please make sure that you update the CREATE DATABASE command so
that it refers to the correct location in your local environment.

4. There is a comma-delimited, flat-file, ASCII version in one zipped file, PVFC-ASC_MDM_12e.ZIP.


These flat files are provided for use with other database management systems. They may also
be imported into MS Excel.

5. The database is also available on Teradata University Network


(www.teradatauniversitynetwork.com) for faculty and students.

PVFC Book Version Database Documentation Page 1


Modern Database Management, 12th Edition
This textbook version of PVFC implements the data model depicted in Figure 2-22. The data
contained in the tables are only that data used in the examples in Chapters 1, 6, and 7 to demonstrate
SQL. Thus, the student may set up the database(s) and use them to compare MS Access SQL, SQL Server
2008 SQL and Oracle 12c SQL to the ANSI SQL examples of the text. Many of the queries demonstrated
in Chapters 6 and 7 have been created in the MS Access version and are available in
PVFC_MDM_12e.mdb (the query names end with the page number to help you find where the query is
presented in the text).

This database is intended to provide students with an understanding of the implementation of the
data model developed in Chapter 2 in a relational database management system. It should also allow
them to explore basic query syntax in either Oracle 12c or MS Access.

Both versions of the PVFC database are also available on Teradata University Network
(www.teradatauniversitynetwork.com for faculty and students). Faculty must define on Teradata
University Network which databases students can use because our databases are not the only ones
available on TUN. See instructions on TUN for creating a course environment for students.

The following documentation provides a more detailed explanation of the data in the Book
version of the PVFC database – the version illustrated in the textbook.

PVFC Book Version Database Documentation Page 2


Modern Database Management, 12th Edition
Book Pine Valley Furniture Company (PVFC) Datasets

The following ASC files are provided for this database (in folder ASCII_EDM_1e):

Customer_T.asc
CustomerID, CustomerName, CustomerAddress, CustomerCity, CustomerState, CustomerPostalCode

1, 'Contemporary Casuals', '1355 S Hines Blvd', 'Gainesville', 'FL', '32601-2871'


2, 'Value Furniture', '15145 S.W. 17th St.', 'Plano', 'TX', '75094-7743'
3, 'Home Furnishings', '1900 Allard Ave.', 'Albany', 'NY', '12209-1125'
4, 'Eastern Furniture', '1925 Beltline Rd.', 'Carteret', 'NJ', '07008-3188'
5, 'Impressions', '5585 Westcott Ct.', 'Sacramento', 'CA', '94206-4056'
6, 'Furniture Gallery', '325 Flatiron Dr.', 'Boulder', 'CO', '80514-4432'
7, 'Period Furniture', '394 Rainbow Dr.', 'Seattle', 'WA', '97954-5589'
8, 'California Classics', '816 Peach Rd.', 'Santa Clara', 'CA', '96915-7754'
9, 'M and H Casual Furniture', '3709 First Street', 'Clearwater', 'FL', '34620-2314'
10, 'Seminole Interiors', '2400 Rocky Point Dr.', 'Seminole', 'FL', '34646-4423'
11, 'American Euro Lifestyles', '2424 Missouri Ave N.', 'Prospect Park', 'NJ', '07508-5621'
12, 'Battle Creek Furniture', '345 Capitol Ave. SW', 'Battle Creek', 'MI', '49015-3401'
13, 'Heritage Furnishings', '66789 College Ave.', 'Carlisle', 'PA', '17013-8834'
14, 'Kaneohe Homes', '112 Kiowai St.', 'Kaneohe', 'HI', '96744-2537'
15, 'Mountain Scenes', '4132 Main Street', 'Ogden', 'UT', '84403-4432'

PVFC Book Version Database Documentation Page 3


Modern Database Management, 12th Edition
Territory_T.asc
TerritoryID, TerritoryName

1, 'SouthEast'
2, 'SouthWest'
3, 'NorthEast'
4, 'NorthWest'
5, 'Central'

DoesBusinessIn_T.asc
CustomerID, TerritoryID

1, 1
1, 2
2, 2
3, 3
4, 3
5, 2
6, 5

Salesperson_T.asc
SalespersonID, SalespersonName, SalespersonPhone, SalespersonFax, TerritoryID

1, 'Doug Henny', '8134445555', '', 1


2, 'Robert Lewis', '8139264006', '', 2
3, 'William Strong', '5053821212', '', 3
4, 'Julie Dawson', '4355346677', '', 4
5, 'Jacob Winslow', '2238973498', '', 5

PVFC Book Version Database Documentation Page 4


Modern Database Management, 12th Edition
Employee_T.asc
EmployeeID, EmployeeName, EmployeeAddress, EmployeeCity, EmployeeState, EmployeeZipCode,
EmployeeDateHired, EmployeeSupervisor

'123-44-345', 'Jim Jason', '2134 Hilltop Rd', '', 'TN', '', '12/Jun/99', '454-56-768'
'454-56-768', 'Robert Lewis', '17834 Deerfield Ln', 'Nashville', 'TN', '', '01/Jan/99', ''

Skill_T.asc
SkillID, SkillDescription

'BS12', '12in Band Saw'


'QC1', 'Quality Control'
'RT1', 'Router'
'SO1', 'Sander-Orbital'
'SB1', 'Sander-Belt'
'TS10', '10in Table Saw'
'TS12', '12in Table Saw'
'UC1', 'Upholstery Cutter'
'US1', 'Upholstery Sewer'
'UT1', 'Upholstery Tacker'

EmployeeSkills_T.asc
EmployeeID, SkillID

'123-44-345', 'BS12'
'123-44-345', 'RT1'
'454-56-768', 'BS12'

PVFC Book Version Database Documentation Page 5


Modern Database Management, 12th Edition
Order_T.asc
OrderID, OrderDate, CustomerID
1001, '21/Oct/15', 1
1002, '21/Oct/15', 8
1003, '22/Oct/15', 15
1004, '22/Oct/15', 5
1005, '24/Oct/15', 3
1006, '24/Oct/15', 2
1007, '27/Oct/15', 11
1008, '30/Oct/15', 12
1009, '05/Nov/15', 4
1010, '05/Nov/15', 1

ProductLine_T.asc
ProductLineID, ProductLineName

1, 'Cherry Tree'
2, 'Scandinavia'
3, 'Country Look'

Product_T.asc
ProductID, ProductDescription, ProductFinish, ProductStandardPrice, ProductLineID

1, 'End Table', 'Cherry', 175, 1


2, 'Coffee Table', 'Natural Ash', 200, 2
3, 'Computer Desk', 'Natural Ash', 375, 2
4, 'Entertainment Center', 'Natural Maple', 650, 3
5, 'Writers Desk', 'Cherry', 325, 1
6, '8-Drawer Desk', 'White Ash', 750, 2
7, 'Dining Table', 'Natural Ash', 800, 2
8, 'Computer Desk', 'Walnut', 250, 3

PVFC Book Version Database Documentation Page 6


Modern Database Management, 12th Edition
OrderLine_T.asc
OrderID, ProductID, OrderedQuantity

1001, 1, 2

1001, 2, 2

1001, 4, 1

1002, 3, 5

1003, 3, 3

1004, 6, 2

1004, 8, 2

1005, 4, 4

1006, 4, 1

1006, 5, 2

1006, 7, 2

1007, 1, 3

1007, 2, 2

1008, 3, 3

1008, 8, 3

1009, 4, 2

1009, 7, 3

1010, 8, 10

PVFC Book Version Database Documentation Page 7


Modern Database Management, 12th Edition
ProducedIn_T.asc
ProductID, WorkCenterID

RawMaterial_T.asc
MaterialID, MaterialName, UnitOfMeasure, MaterialStandardCost

Supplies_T.asc
VendorID, MaterialID, SuppliesUnitPrice

Vendor_T.asc
VendorID, VendorName, VendorAddress, VendorCity, VendorState, VendorZipcode

General Notes on ASC and Other Versions of the PVFC Book Datasets:

1. There may be several misspellings of data values so students can deal with data quality issues.
2. There are several examples of missing data so students can deal with this issue (some data are
actually missing, some simply represents null FKs for an optional cardinality).
3. The ProducedIn_T table is included, but it includes a FK of WorkCenterID, and WorkCenter_T is
not included; there is no data in ProducedIn_T, but there still is an unresolved FK constraint
reference for students to deal with.
4. Four tables are not populated with data (see above), but ASC files are provided with the column
names; these tables can be used for exercises with INSERT and other commands.
5. Three tables (Uses_T, WorksIn_T, and WorkCenter_T) are not included; these can be used for
DDL exercises and students can determine from the text what columns should be included in
each table.
6. There are purposeful differences between this ASC dataset and other versions of this data:
a. Oracle: All DDL and data creation statements are in one file, CREATEPVFC_EDM_1e.sql:
i. Employee_T includes an EmployeeBirthDate column
ii. There are additional columns in Vendor_T
iii. Two rows for WorkCenter_T and one row for WorksIn_T are provided
iv. Uses_T is defined but no data are provided
b. SQL Server: Three files are in folder PVFCScripts_EDM_1e –
PVTableInsertsALL_EDM_1e.sql , PVTablesALL_EDM_1e.sql, and PVFDB_EDM_1e.sql:

PVFC Book Version Database Documentation Page 8


Modern Database Management, 12th Edition
i. There are no data for the RawMaterials_T, Vendor_T, Supplies_T, ProducedIn_T,
and Uses_T, although all are defined in the database.
ii. PKs are auto created on insert for many of the tables, so PKs may not agree with
those in the other data files; Order_T does include the OrderID column with
data as in the other versions of this table.
iii. Two row are provided for WorkCenter_T and one row for WorksIn_T.
c. Access Database: File PVFC_EDM_1e.mdb
i. There are no data for the RawMaterials_T, Vendor_T, Supplies_T (actually
contains one bad row with data in only one nonPK column), ProducedIn_T, and
Uses_T, although all are defined in the database.
ii. Some columns have captions, so the column heading may not be exactly the
column name.
iii. Two rows are provided for WorkCenter_T and one row for WorksIn_T

The following table summarizes the differences between the various versions of the PVFC Book database
version:

Table Figur ASCII Oracle MS Access MS TUN


e SQL
2-21
Customer_T CutomerPostalCod CustomerPostalCode
e is VARCHAR2(10) is VARCHAR(10)
DoesBusinessIn_
T
Employee_T Has
EmployeeBirthDat
e attribute that is
not in ASCII version
EmployeeSkills_T Calle
d Has
Skill
Order_T
OrderLine_T ProductID is
NUMBER(11,0)
ProducedIn_T No data No data No data No No data
data
Product_T ProductLineID is
NUMBER(11,0)
ProductLine_T
RawMaterial_T No data No data No data No No data;
data UnitofMeasure is
MaterialUnitofMeasur
e
Salesperson_T

PVFC Book Version Database Documentation Page 9


Modern Database Management, 12th Edition
Skill_T
Supplies_T No data No data No data No No data
data
Territory_T
Vendor_T No data No data; No Data No No data;
Has VendorFax, data Has VendorFax,
VendorPhone, VendorPhone,
VendorContact, VendorContact,
VendorTaxID VendorTaxID
attributes that are attributes that are not
not in ASCII version in ASCII version
Uses_T Not No data No data No Not included
include data
d
WorkCenter_T Not Has two data rows Has two Has Not included
include data rows two
d data
row
s
WorksIn_T Not Has one data row Has one Has Not included
include data row one
d data
row
Database overall Not all PK Database is named
and FK db_pvfc_edm_1_std;
constraints FK constraints are not
and required specified; datatypes
attributes are sometimes slightly
specified; different, but the data
Relationship are the same
s diagram
does not
show all
relationships

PVFC Book Version Database Documentation Page 10


Modern Database Management, 12th Edition

You might also like