Chapter 4 Relational Databases and Enterprise Systems
Chapter 4 Relational Databases and Enterprise Systems
4
Relational
Databases and
Enterprise
Systems
Learning Objectives
© McGraw Hill
LO 1
Introduction of Database 1
© McGraw Hill
LO 1
Introduction of Database 2
4-4
© McGraw Hill
LO 2
Introduction of Database 3
Relational data models offer many advantages over other data models,
including:
• Flexibility and Scalability: handle changes quickly and easily (for example, SAP,
Oracle, Microsoft, etc.).
• Simplicity: easy to communicate to both database users and database
developers.
• Reduced Information Redundancy: requires each piece of data to be recorded
only in one place.
© McGraw Hill
LO 2
© McGraw Hill
LO 2
Data Dictionary:
• Describes the data fields in each database record such as field
description, field length, field type (for example, alphanumeric,
numeric), etc.
Database Administrator:
• The person responsible for the design, implementation, repair and
security of a firm’s database.
© McGraw Hill
LO 2
Entities:
• Resources. • Cash, products.
• Events. • Sales, purchases.
• Agents. • Customers, salespeople.
Attributes:
• Characteristics. • Customer ID, Address, Name.
© McGraw Hill
LO 2
© McGraw Hill
LO 2
Illustration of a Relational
Database Using Primary and
Foreign Keys
© McGraw Hill
LO 2
Foreign key:
• Attribute in one table that
acts as primary key in
another table.
• Provides a logical
relationship, or a link,
between two tables.
© McGraw Hill
LO 2
© McGraw Hill
LO 2
1. Tables: store data which consists of a series of rows (records) and columns (attributes) connected by
relationships (links between tables by foreign keys).
2. Queries: retrieve and display data derived from records stored within the database.
3. Forms: enter data into tables and view existing records, powered by queries.
4. Reports: integrate data from one or more queries and tables, cannot edit database info.
5. Pages: web-based forms, data can be entered in real time from outside of the database system.
6. Macros: automate processes like opening a specific form.
7. Modules: alter Access’s code.
© McGraw Hill
LO 2
© McGraw Hill
LO 2
A. SSS may sell B. Every pair of C. A salesperson (new) may D. Only one salesperson
minimum one glasses created could not handle any sale greets and assists a
and maximum be sold once only. transaction yet, and at customer of the sale
many pairs of Zero means a pair most each salesperson transaction.
glasses in a sales designed already but could handle many sale
transaction. not sold yet. transactions.
© McGraw Hill
LO 2
© McGraw Hill
LO 2
E. A cashier (new) may not handle F. Each cash receipt (for example,
any cash receipt yet, or a cashier a check from a customer) is
could take charge of many cash handled by only one cashier.
receipts.
© McGraw Hill
LO 2
© McGraw Hill
LO 2
© McGraw Hill
LO 2
Step 3. File -> Save Database As, then save the database as ‘SSS.’
You will likely get a message saying, “All objects must be closed before
you save the database.” Click “Yes.”
© McGraw Hill
LO 2
Step 2. Click the tab Home View (dropdown menu) Design View.
© McGraw Hill
LO 2
Note the Field Name, Data type, Description columns. You will use these to
configure the Customer table.
© McGraw Hill
LO 2
© McGraw Hill
LO 2
Step 4. Click on the dropdown button for the Data Type and select Number. This will
force any data entered into this field to be in the form of a number.
Step 5. • Set Field Properties for each attribute. For example: for Customer
Number we would set the Field Size to Long Integer, the Validation Rule to
‘Like “######” to ensure that all Customer Numbers are 6 numbers long.
• Since this is a primary key, choose the Required field as “Yes” and the
Indexed field as “Yes (No Duplicates).”
© McGraw Hill
LO 2
© McGraw Hill
LO 2
© McGraw Hill
LO 2
Step 9. • Create the rest of the tables and attributes given before, using
appropriate data types and properties.
• Generally, validation rules are used for primary keys.
• For other fields such as Sales Date in the Sales table you will also use
Input Masks.
© McGraw Hill
LO 2
© McGraw Hill
LO 3
© McGraw Hill
LO 3
FROM
• Clause added to the SELECT statement.
• Indicates the name of table(s) from which to retrieve data.
SELECT
• Used to begin a query.
• Statement tells the query which columns (or attributes) of a table
should be included in the query.
© McGraw Hill
LO 3
© McGraw Hill
LO 3
© McGraw Hill
LO 3
© McGraw Hill
LO 3
Search criteria using relational operator- the BETWEEN operator and the LIKE
operator.
© McGraw Hill
LO 3
• SQL Example #3: Assume you would like to use a query to find
the salesperson for each customer, and you would like to show
the name of each salesperson as part of the result.
Customer# Name A/R Amt SP# SP# SP_Name
C-1 Bill 345 E-12 E-10 Howard
C-2 Mick 225 E-10 E-12 Pattie
C-3 Keith 718 E-10
E-34 Stephanie
C-4 Charlie 828 E-99
C-5 Ron 3,200 E-10 E-99 David
© McGraw Hill
LO 3
© McGraw Hill
LO 3
© McGraw Hill
LO 3
© McGraw Hill
LO 3
4-43
© McGraw Hill
LO 3
SELECT *
FROM [Cash Receipt]
WHERE [Customer Number] = ‘C-2’
ORDER BY Amount ASC;
We will get the following query result:
© McGraw Hill
LO 3
Example: You can retrieve each Example: Finding out cash receipt
customer number once from the entries made in July.
Cash Receipt table.
FROM [Cash Receipt]
SELECT DISTINCT [Customer Number] WHERE Date BETWEEN ‘01-JUL-2020’
FROM [Cash Receipt]; AND ‘31-JUL-2020’;
© McGraw Hill
LO 3
Customer
Number Amount
C-1 72,000
C-2 13,335
© McGraw Hill
LO 3
© McGraw Hill
LO 3
© McGraw Hill
LO 4
Enterprise Systems 1
Enterprise Systems 2
© McGraw Hill
LO 4
Enterprise Systems 3
Enterprise Systems:
Serve as the backbone of the company’s internal business processes.
Serve as a connection with the external business processes for supply chain and customer
relationship management systems.
Accommodate integration and support of various business processes and information needs.
Give a higher level of internal transparency compared to the typically isolated legacy systems.
Provide informational benefits needed to manage effectively an organization’s business
activities.
• Timeliness of information.
• Transparency.
• Enhanced completeness.
© McGraw Hill
LO 4
Enterprise Systems 4
Challenges of Implementation
Integrating:
• Various modules within the enterprise system.
• With external systems such as the information system of a supplier and/or
customer.
• With the firm’s own existing legacy systems.
Converting:
• Data from existing legacy systems to the enterprise system.
Implementing:
• Any big project at a firm.
© McGraw Hill
LO 5
© McGraw Hill
End of Chapter 4