This document provides an introduction to a database design and administration lab. It discusses using Toad Data Modeler to design an entity relationship diagram (ERD) and generate physical database tables from the ERD. The steps include drawing the ERD, checking the model, converting it in Toad Data Modeler, creating tables in the database, and verifying the tables. It also provides guidance on a team project to develop an information system and introduces database concepts like entities, attributes, and relationships.
A brief introduction to SQLite | What is Android SQLite? What are the advantage and disadvantage of SQLite? SQLite is an embedded relational database engine. Definitions. A relational database is a collection of data organised in tables. Installing SQLite from sources. To get the newest version of SQLite, we can install SQLite from sources. Tables used. Sources.
Case Study 2: Instrumentation SoftwareJunaid Lodhi
Instrumentation Software architecture by at Tektronix.
This work was carried out as a collaborative
effort between several Tektronix product divisions and the Computer
Research Laboratory over a three year period Since then the framework has been
extended and adapted to accommodate a broader class of system, while at the
same time being better adapted to the specific needs of instrumentation
software.
A brief introduction to SQLite | What is Android SQLite? What are the advantage and disadvantage of SQLite? SQLite is an embedded relational database engine. Definitions. A relational database is a collection of data organised in tables. Installing SQLite from sources. To get the newest version of SQLite, we can install SQLite from sources. Tables used. Sources.
Case Study 2: Instrumentation SoftwareJunaid Lodhi
Instrumentation Software architecture by at Tektronix.
This work was carried out as a collaborative
effort between several Tektronix product divisions and the Computer
Research Laboratory over a three year period Since then the framework has been
extended and adapted to accommodate a broader class of system, while at the
same time being better adapted to the specific needs of instrumentation
software.
Cloud Computing is the internet-based computing wherby shared resources, software, and information are provided to computers and other devices on demand, like the electrcity grid
Presentation covers all aspects about Software Designing that are followed by Software Engineering Industries. Readers can do detailed study about the Software Design Concepts like (Abstraction, Architecture, Patterns, Modularity, Information Hiding, Refinement, Functional Dependence, Cohesion, Coupling & Refactoring) plus Design Process.
Later then Design Principles are there to understand with Architectural Design, Architectural Styles, Data Centered Architecture, Data Flow Architecture, Call & Return Architecture, Object Oriented Architecture, Layered Architecture with other architectures are named at end of it.
Later then, Component Level Design is discussed. Then after UI Design & Rules of it, UI Design Models, Web Application Design, WebApp Interface Design are discussed at the end.
Comment back if you have any query about it.
A presentation on core java. in this ppt there are all the basic informations on the core java suvh as-
Features of Java
Java Program Translation
Java Virtual Machine
Java system overview
Java Program-Development phase
Advantage of java
Disadvantage of java
Project
Cloud Computing is the internet-based computing wherby shared resources, software, and information are provided to computers and other devices on demand, like the electrcity grid
Presentation covers all aspects about Software Designing that are followed by Software Engineering Industries. Readers can do detailed study about the Software Design Concepts like (Abstraction, Architecture, Patterns, Modularity, Information Hiding, Refinement, Functional Dependence, Cohesion, Coupling & Refactoring) plus Design Process.
Later then Design Principles are there to understand with Architectural Design, Architectural Styles, Data Centered Architecture, Data Flow Architecture, Call & Return Architecture, Object Oriented Architecture, Layered Architecture with other architectures are named at end of it.
Later then, Component Level Design is discussed. Then after UI Design & Rules of it, UI Design Models, Web Application Design, WebApp Interface Design are discussed at the end.
Comment back if you have any query about it.
A presentation on core java. in this ppt there are all the basic informations on the core java suvh as-
Features of Java
Java Program Translation
Java Virtual Machine
Java system overview
Java Program-Development phase
Advantage of java
Disadvantage of java
Project
De introductie slides voor de cursus Agile Software Architecture, die gegeven wordt door het Nederlands Instituut voor de Software Industrie.
Voor meer informatie, kijk op http://nisi.nl/cursussen/agile-software-architecture
Introducing ORCID at Imperial College LondonTorsten Reimer
Presentation given at the 6th German Library Congress (6. Bibliothekskongress Deutschland) in Leipzig, 15th March 2016. I discuss the position of ORCID in the scholarly communications system - in particular with reference to developments in the UK - and the ORCID implementation project at Imperial College London.
Modeling and abstraction, software development process [Software Design] [Com...Ivano Malavolta
This presentation is about a lecture I gave within the "Software Design" course of the Computer Science bachelor program, of the Vrije Universiteit Amsterdam.
http://www.ivanomalavolta.com
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesChristina Lin
Traditionally, dealing with real-time data pipelines has involved significant overhead, even for straightforward tasks like data transformation or masking. However, in this talk, we’ll venture into the dynamic realm of WebAssembly (WASM) and discover how it can revolutionize the creation of stateless streaming pipelines within a Kafka (Redpanda) broker. These pipelines are adept at managing low-latency, high-data-volume scenarios.
An Approach to Detecting Writing Styles Based on Clustering Techniquesambekarshweta25
An Approach to Detecting Writing Styles Based on Clustering Techniques
Authors:
-Devkinandan Jagtap
-Shweta Ambekar
-Harshit Singh
-Nakul Sharma (Assistant Professor)
Institution:
VIIT Pune, India
Abstract:
This paper proposes a system to differentiate between human-generated and AI-generated texts using stylometric analysis. The system analyzes text files and classifies writing styles by employing various clustering algorithms, such as k-means, k-means++, hierarchical, and DBSCAN. The effectiveness of these algorithms is measured using silhouette scores. The system successfully identifies distinct writing styles within documents, demonstrating its potential for plagiarism detection.
Introduction:
Stylometry, the study of linguistic and structural features in texts, is used for tasks like plagiarism detection, genre separation, and author verification. This paper leverages stylometric analysis to identify different writing styles and improve plagiarism detection methods.
Methodology:
The system includes data collection, preprocessing, feature extraction, dimensional reduction, machine learning models for clustering, and performance comparison using silhouette scores. Feature extraction focuses on lexical features, vocabulary richness, and readability scores. The study uses a small dataset of texts from various authors and employs algorithms like k-means, k-means++, hierarchical clustering, and DBSCAN for clustering.
Results:
Experiments show that the system effectively identifies writing styles, with silhouette scores indicating reasonable to strong clustering when k=2. As the number of clusters increases, the silhouette scores decrease, indicating a drop in accuracy. K-means and k-means++ perform similarly, while hierarchical clustering is less optimized.
Conclusion and Future Work:
The system works well for distinguishing writing styles with two clusters but becomes less accurate as the number of clusters increases. Future research could focus on adding more parameters and optimizing the methodology to improve accuracy with higher cluster values. This system can enhance existing plagiarism detection tools, especially in academic settings.
Forklift Classes Overview by Intella PartsIntella Parts
Discover the different forklift classes and their specific applications. Learn how to choose the right forklift for your needs to ensure safety, efficiency, and compliance in your operations.
For more technical information, visit our website https://intellaparts.com
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
Hierarchical Digital Twin of a Naval Power SystemKerry Sado
A hierarchical digital twin of a Naval DC power system has been developed and experimentally verified. Similar to other state-of-the-art digital twins, this technology creates a digital replica of the physical system executed in real-time or faster, which can modify hardware controls. However, its advantage stems from distributing computational efforts by utilizing a hierarchical structure composed of lower-level digital twin blocks and a higher-level system digital twin. Each digital twin block is associated with a physical subsystem of the hardware and communicates with a singular system digital twin, which creates a system-level response. By extracting information from each level of the hierarchy, power system controls of the hardware were reconfigured autonomously. This hierarchical digital twin development offers several advantages over other digital twins, particularly in the field of naval power systems. The hierarchical structure allows for greater computational efficiency and scalability while the ability to autonomously reconfigure hardware controls offers increased flexibility and responsiveness. The hierarchical decomposition and models utilized were well aligned with the physical twin, as indicated by the maximum deviations between the developed digital twin hierarchy and the hardware.
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
We have compiled the most important slides from each speaker's presentation. This year’s compilation, available for free, captures the key insights and contributions shared during the DfMAy 2024 conference.
5. Topics in Lab Sessions
Week Topics
Week 2 - 3 Toad Data Modeler –
Design the data structure using ERD
Week 3 - 5 Oracle Forms Developer (Stage 1) –
Develop simple interfaces of an information system
using PL/SQL
Week 6 No Lab - Progress Demonstration 1 (7%)
Week 7- 9 Oracle Forms Developer (Stage 2) –
Develop advanced interfaces of an information
system using PL/SQL
Week 10 No Lab - Progress Demonstration 2 (8%)
Week 11 Oracle Reports Developer and integration –
Develop managerial reports for an information system
Week 12 Project Consultation
Week 13 Project Demonstration
9
Software in ISOM3260
• 2 Servers: Oracle Database 11g (Release 2)
– Microsoft Windows Server Platform
• Client:
– Toad Data Modeler Freeware
• Design database through entity‐relationship diagram
– Oracle Developer Suite 10g (10.1.2)
• Forms Developer – build user interfaces for users to manipulate the data stored in
a database
• Reports Developer – generate managerial reports
– SQL Tools
• Allow developers (i.e., you) to access a database using SQL commands
• Client software are available at PC Lab 1 and 2
(LSKG005 and LSKG021)
10
ISOM3260 Lab (Stage 1) 5
6. Two‐tier Architecture
Toad Data Modeler,
Oracle Developer Suite and
SQL Tools are installed here!!
Oracle Databaseis
installed here!!
There are databases under 2 servers – IMZ350.ust.hk and
IMZ335.ust.hk 11
Team Project
• To develop an information system for selling
off‐the‐shelf software packages
• 6 members per group ‐ MUST be in the same
LAB session
12
ISOM3260 Lab (Stage 1) 6
7. Learning Outcomes of the Team
Project
• Develop an authentic information system
– Simulating the work of an actual IT project team in an IT
consultancy firm (eg. Oracle, IBM, etc)
• Learn to apply programming skills in business contexts
– IF statements, Loops, Functions and Procedures
• Learn to collaborate with others in a team
• Realize your strength in different aspects in a typical IT
project for future career planning
– Analysis and design?
– Programming?
– Documentation?
– Graphic design?
– Take leading role?
13
Project Grading (I)
Deliverables Date Marks
Progress Demonstration 1 Mar 13, 14 7%
Progress Demonstration 2 Apr 10, 11, 15 8%
Final Presentation
Final Report
May 7, 8 ,9 15%
Total Score 30%
14
ISOM3260 Lab (Stage 1) 7
9. Kick‐off the project
• Form a cohesive team
• Elect a “Project Leader”
• Send the group list to imchris@ust.hk
by Feb 18
• Your group list should contain
– Names and student IDs of group members
– Lab session number
– Email addresses
17
Tips
• Form the groups by this week/next week
• Keep up with the lab topics and work accordingly on your
project and work together during the lab sessions
• Plan ahead for the Progress Demonstrations 1, 2
• Complete the project early and perform detailed testing
18
ISOM3260 Lab (Stage 1) 9
13. Entity: Customer
7
Customer
Attributes/information the
system stores for a
customer
CUS_ID
CUS_LName
CUS_FName
CUS_UID
CUS_PWD
CUS_Email
Attributes
A customer record
8
ylx008
******
******
ylx@ust.hk
Peter
Johnson
CUS_ID CUS_LName CUS_FName CUS_UID CUS_PWD CUS_Email
C0001 Johnson Peter ylx008 ****** ylx@ust.hk
C0002 Alex Ng ang098 ****** ang@ust.hk
…… …… …… …… …… ……
A customer record in the
customer table
ISOM3260 Lab (Stage 1) 13
17. Caution 2: Define attribute datatype
• VARCHAR2 (Size)
– Variable Length characters (recommended)
• NUMBER (Precision, Scale)
– Real Numbers, for calculation
• DATE
– Date
(From January 1, 4712BC to December 31, 31999AD)
15
Steps in creating a database using
Toad Data Modeler
1.
Draw ERD
2.
Check the
ER Model
3.
Toad Data
Modeler
Conversion
4.
Create real
tables in
the
Database
5.
Check the
real tables
16
ISOM3260 Lab (Stage 1) 17
19. Verify the tables in the database (2)
Tables created
through Toad
Data Modeler
19
Verify the tables in the database (3)
• Type the following SQL statements :
Check tables in your database
SELECT table_name
FROM user_tables;
Check the metadata of your tables
SELECT column_name, data_type, data_length
FROM user_tab_columns
WHERE table_name=‘<table name>’;
Check the constraints of your tables
SELECT constraint_name, constraint_type,
search_condition
FROM user_constraints
WHERE table_name=‘<table name>’; 20
ISOM3260 Lab (Stage 1) 19
22. Check the physical tables using SQL Tools
25
Start the team project this week
1. Form your team
2. Refer to the list of basic functions, come up the
data required to build this information system
3. Drafting an ERD on a piece of paper (or on
Toad), base on the basic functions
4. (Optional) Pick a set of extra functions that you
want to implement
5. (Optional) Modify the ERD base on the
additional functions you suggest
Note:
• EVERY group should report the current progress to me next
week
26
ISOM3260 Lab (Stage 1) 22
23. ISOM 3260 (Spring 2014) Lab 2 Page 1 of 9
Lab 2 : Creating a database using Toad Data Modeler
1. Introduction
Toad Data Modeler is an application for designing databases. ER diagrams can be created visually in
Toad Data Modeler. The program then automatically generates Data Definition Language for
creating a database. The freeware version of the program, Toad Data Modeler 2.25, can be
downloaded in http://en.utilidades‐utiles.com/download‐toad‐data‐modeler‐windows‐xp.php .
2. Getting started with Toad Data Modeler
This is the entry screen for Toad Data Modeler.
ISOM3260 Lab (Stage 1) 23
24. ISOM 3260 (Spring 2014) Lab 2 Page 2 of 9
Step 1. Create a New Model
To get started, a new model should be
created first. Select File from menu and
then New Model.
Step 2: Select the target database
Select Oracle 10g as the target database
then press OK to continue.
Every database has slightly different data
definition language. This will create the
statements specific to Oracle 10g.
Step 3. Prepare to construct ER on the
drawing area
A drawing area appears for creating ER
Diagrams.
To construct an ERD, use the (1) Entity, (2)
Non‐identifying relationship and (3) M:N
relationship buttons.
Refer to Appendix 1 about “non‐
identifying” relationship
ISOM3260 Lab (Stage 1) 24
26. ISOM 3260 (Spring 2014) Lab 2 Page 4 of 9
Double click the attribute and modify the
datatype.
Refer to the table 1 for the appropriate
datatypes.
Table 1. Data format and the corresponding datatypes
Data Format Datatype
Character (eg. Chris Tse; HKUST, etc) VARCHAR2
Numberic (eg. 2000; 10623.48, etc) NUMBER
Date (eg. 28 Nov 1987, 10 Oct 2001) DATE
Step 8. Define the Unique
Identifier
Double click “Key” to define
Unique Identifier.
ISOM3260 Lab (Stage 1) 26
32. Checklist for Logical Model in Toad Data Modeler
Use this checklist to self‐assess the ER Model of your project
Entity : ________________________________
Checked by : ___________________________________
Items to check C NC
Entities and Attributes
1. The entity name is correctly named
2. The attributes names are appropriately named with the short name prefix
STUDENT STU_ID, STU_ADDRESS..etc
3. The sequence of attributes is defined properly such that identifier (PK) goes
first
4. The format of the attributes are correctly set appropriately
Text VARCHAR2, not CHAR
Number (for calculations) NUMBER
Date DATE
5. The maximum length of each attribute is defined logically
You should be able to explain the rationale of setting the maximum number
of each attribute
6. The column “Dec” ‐ “Decimal” ‐ is used for numeric attributes only
NUMBER(6,2) 6 digits with 2 decimal places Max = $9999.99
NUMBER(4,1) 4 digits with 1 decimal places Max = $999.9
7. The primary key/unique identifier of the entity is set appropriately
Relationship
8. Read the business rules from the ERD again, they are interpreted the same
the draft
C = Compliance ; NC = Non‐compliance
ISOM3260 Lab (Stage 1) 32
33. Checklist for Logical Model in Toad Data Modeler
Use this checklist to self‐assess the ER Model of your project
Entity : ________________________________
Checked by : ___________________________________
Items to check C NC
Entities and Attributes
1. The entity name is correctly named
2. The attributes names are appropriately named with the short name prefix
STUDENT STU_ID, STU_ADDRESS..etc
3. The sequence of attributes is defined properly such that identifier (PK) goes
first
4. The format of the attributes are correctly set appropriately
Text VARCHAR2, not CHAR
Number (for calculations) NUMBER
Date DATE
5. The maximum length of each attribute is defined logically
You should be able to explain the rationale of setting the maximum number
of each attribute
6. The column “Dec” ‐ “Decimal” ‐ is used for numeric attributes only
NUMBER(6,2) 6 digits with 2 decimal places Max = $9999.99
NUMBER(4,1) 4 digits with 1 decimal places Max = $999.9
7. The primary key/unique identifier of the entity is set appropriately
Relationship
8. Read the business rules from the ERD again, they are interpreted the same
the draft
C = Compliance ; NC = Non‐compliance
ISOM3260 Lab (Stage 1) 33
34. Checklist for Logical Model in Toad Data Modeler
Use this checklist to self‐assess the ER Model of your project
Entity : ________________________________
Checked by : ___________________________________
Items to check C NC
Entities and Attributes
1. The entity name is correctly named
2. The attributes names are appropriately named with the short name prefix
STUDENT STU_ID, STU_ADDRESS..etc
3. The sequence of attributes is defined properly such that identifier (PK) goes
first
4. The format of the attributes are correctly set appropriately
Text VARCHAR2, not CHAR
Number (for calculations) NUMBER
Date DATE
5. The maximum length of each attribute is defined logically
You should be able to explain the rationale of setting the maximum number
of each attribute
6. The column “Dec” ‐ “Decimal” ‐ is used for numeric attributes only
NUMBER(6,2) 6 digits with 2 decimal places Max = $9999.99
NUMBER(4,1) 4 digits with 1 decimal places Max = $999.9
7. The primary key/unique identifier of the entity is set appropriately
Relationship
8. Read the business rules from the ERD again, they are interpreted the same
the draft
C = Compliance ; NC = Non‐compliance
ISOM3260 Lab (Stage 1) 34
35. Checklist for Logical Model in Toad Data Modeler
Use this checklist to self‐assess the ER Model of your project
Entity : ________________________________
Checked by : ___________________________________
Items to check C NC
Entities and Attributes
1. The entity name is correctly named
2. The attributes names are appropriately named with the short name prefix
STUDENT STU_ID, STU_ADDRESS..etc
3. The sequence of attributes is defined properly such that identifier (PK) goes
first
4. The format of the attributes are correctly set appropriately
Text VARCHAR2, not CHAR
Number (for calculations) NUMBER
Date DATE
5. The maximum length of each attribute is defined logically
You should be able to explain the rationale of setting the maximum number
of each attribute
6. The column “Dec” ‐ “Decimal” ‐ is used for numeric attributes only
NUMBER(6,2) 6 digits with 2 decimal places Max = $9999.99
NUMBER(4,1) 4 digits with 1 decimal places Max = $999.9
7. The primary key/unique identifier of the entity is set appropriately
Relationship
8. Read the business rules from the ERD again, they are interpreted the same
the draft
C = Compliance ; NC = Non‐compliance
ISOM3260 Lab (Stage 1) 35
36. 2. Checklist for Physical Tables in SQLTools
Use this checklist to self‐assess the physical tables of your project
Items to check C NC
Tables
1. The tables are created in the database, and they are consistent with your
physical design
Execute
SELECT table_name
FROM user_tables;
2. The metadata of every attribute in the table are consistent with your
physical design
Execute
SELECT column_name, data_type, data_length
FROM user_tab_columns
WHERE table_name=‘STUDENT’;
3. The constraints of every table are consistent with your physical design
Execute
SELECT constraint_name, constraint_type,
search_condition
FROM user_constraints
WHERE table_name=‘STUDENT’;
ISOM3260 Lab (Stage 1) 36
37. 3/1/13 Exploring Database Design Tips - For Dummies
www.dummies.com/how-to/content/exploring-database-design-tips.html 1/3
Advertisement
Agoda's Best Hotel Offers Save up to 75% Instant confirmation Book now! Agoda.com/Hotels
CEF Approved Courses Excel and VBA for business modeling Create and manage Access databases www.welkin.com.hk
Free Hyper-V Backup Easy to use Hyper-V backup software Free for 2 VMs, forever. No catch. www.altaro.com/free-hyper-v-backup/
Visitor Management System Guess Pre-Registration for Event, Online Counter Register & Reports. www.rentech.asia
Exploring Database Design Tips
By Doug Lowe from ASP.NET 2.0 Everyday Apps For Dummies
One of the most important aspects of any application-development project is the database design. And so, without further ado,
here are some tips for designing good databases.
Use the right number of tables
In Amadeus, the Emperor of Germany criticizes one of Mozart's works as having "too many notes." Mozart replies indignantly that
he uses neither too many nor too few notes, but the exact number of notes that the composition requires.
So it should be with database design. Your database should have as many tables as the application requires — not more, not
fewer. There is no single "right" number of tables for all databases.
Inexperienced database designers have a tendency to use too few tables — sometimes trying to cram an entire database-worth
of information into a single table. At the other extreme are databases with dozens of tables, each consisting of just a few fields.
Avoid repeating data
One of the core principles of relational database design is to handle repeating data by breaking it out into a separate table. For
example, in the old days of flat-file processing, it was common to create invoice records that had room for a certain number of
line items. Thus the invoice record would have fields with names like Item1, Item2, Item3, and so on.
Bad!
Whenever you find yourself numbering field names like that, you should create a separate table. In the case of the invoice record,
you should create a separate table to store the line item data.
Avoid redundant data
When designing the tables that make up your database, try to avoid creating redundant data. Whenever redundant data creeps
into a database, it introduces the likelihood that the data will become corrupt. For example, suppose you store a customer's
name in two different tables. Then, if you update the name in one of the tables but not the other, the database has become
inconsistent.
The most obvious type of redundant-data mistake is to create a field that exists in two or more tables. But there are more subtle
types of redundant data. For example, consider an Invoice table that contains a LineItemTotal field that represents the sum of
the Total fields in each of the invoice's line items. Technically, this field represents redundant data; the data is also stored in the
Total fields of each line item.
Whether you should allow this type of redundancy depends on the application. In many cases, it's better to put up with the
redundancy for the convenience and efficiency of not having to recalculate the total each time the data is accessed. But it's
always worth considering whether the added convenience is worth the risk of corrupting the data.
Use a naming convention
To avoid confusion, pick a naming convention for your database objects and stick to it. That way your database tables, columns,
constraints, and other objects will be named in a consistent and predictable way. (Just think of the savings on aspirin.)
You can argue from now until St. Swithen's day about what the naming conventions should be. That doesn't matter so much. What
does matter is that you make a convention — and follow it.
Avoid nulls
Allowing nulls in your database tables significantly complicates the application programming required to access the tables. As a
result, avoid nulls by specifying NOT NULL whenever you can. Use nulls rarely, and only when you truly need them.
ISOM3260 Lab (Stage 1) 37
38. 3/1/13 Exploring Database Design Tips - For Dummies
www.dummies.com/how-to/content/exploring-database-design-tips.html 2/3
Dummies Recommends
Knowing Just Enough about Relational
Databases
The Long and the Short of Coat Styles
for Your Yorkshire Terrier
How to Design a Relational Database in
Access 2010
Secrets of Access 2010 Database
Design
Getting a Look At Web Services
From Around the Web
Free tool by Microsoft helps identify and
zap malware (TechNet)
6 Things You Don't Know About Content
Marketing (King Content)
Kaazing Publishes First Definitive
Guide to HTML5 WebSocket (dlvr.it)
Making Your Home Less Cluttered (Live
Smarter)
The Gmail Add-On You Must Have
(Inc.com)
Nulls are often misused anyway. The correct use of null is for a value that is unknown; not for a blank or empty value. For example,
consider a typical address record that allows two address lines, named Address1 and Address2. Most addresses have only one
address, so the second address line is blank. The value of this second address line is, in fact, known — it's blank. That's not the
same thing as null. Null would imply that the address may have a second address line; we just don't know what it is.
Even for columns that might seem appropriate for nulls, it's usually more convenient to just leave the column value blank for values
that aren't known. For example, consider a phone number column in a Customer table. It's safe to assume that all your
customers have phone numbers, so it would be correct to use null for phone numbers that you don't know. However, from a
practical point of view, it's just as easy to disallow nulls for the phone number column, and leave the unknown phone numbers
blank.
Avoid secret codes
Avoid fields with names like CustomerType, where the value of the field is one of several constants that aren't defined elsewhere
in the database, such as R for Retail or W for Wholesale. You may have only these two types of customers today, but the needs
of the application may change in the future, requiring a third customer type.
An alternative would be to create a separate table of customer-type codes (call it CustomerTypes), and then create a foreign-key
constraint so the value of the CustomerType column must appear in the CustomerTypes table.
Use constraints wisely
Constraints let you prevent changes to the database that violate the internal consistency of your data. For example, a check
constraint lets you validate only data that meets certain criteria. For example, you can use a check constraint to make sure the
value of a field named Price is greater than zero.
A foreign-key constraint requires that the value of a column in one table must match the value that exists in some other table. For
example, if you have a LineItems table with a column named ProductID, and a Products table with a column also named
ProductID, you could use a foreign-key constraint to make sure that the ProductID value for each row in the LineItems table
matches an existing row in the Products table.
Use triggers when appropriate
A trigger is a procedure that kicks in when certain database data is updated or accessed. Triggers are a great way to enforce
those database rules that are more complicated than simple constraints. For example, suppose an Invoice table contains an
ItemCount column whose value is the number of line items for the invoice. One way to maintain the value of this column
automatically would be to create triggers that increment the ItemCount column whenever a line item is inserted, and decrement
the ItemCount column whenever a line item is deleted. Sometimes automation is a beautiful thing.
Use stored procedures
Stored procedures are SQL procedures that are tucked away in the database and are part of it. There are several advantages to
using stored procedures instead of coding SQL in your applications:
Using stored procedures removes the burden of SQL programming from your application programmers. Instead, it makes
the SQL used to access the database a part of the database itself — no fuss, no muss. All the application programs have to
do is call the appropriate stored procedures to select, insert, update, or delete database data.
Stored procedures are more efficient as a way of handling transactions, because the database server handles the entire
transaction.
Stored procedures are also more efficient because they reduce the amount of network traffic between the database server
and the Web server.
Finally, stored procedures are more secure because they reduce the risk of SQL injection attacks.
ISOM3260 Lab (Stage 1) 38
40.
ISOM3260 Spring 2014 Lab 2 Class Practice Page 1 of 1
Class Exercise:
(1) Use Toad Data Modeler to create a ER diagram of a database extract for Spirit Cruise Line.
This extract consists of three tables and two non‐identifying relationships.
Table: CRUISE
Attribute Name Datatype
*CRUISE_NO VARCHAR2
CRUISE_NAME VARCHAR2
YEAR_BUILT VARCHAR2
DISPLACEMENT NUMBER
SPEED NUMBER
ROOM NUMBER
PASSENGER NUMBER
Table: COUNTRY
Attribute Name Datatype
*COUNTRY_CODE VARCHAR2
COUNTRY_NAME VARCHAR2
Table: STAFF
Attribute Name Datatype
*STAFF_NO VARCHAR2
LAST_NAME VARCHAR2
FIRST_NAME VARCHAR2
SEX VARCHAR2
ADDRESS VARCHAR2
DOB DATE
D_ENTRY DATE
SALARY NUMBER
Note:
The attributes with asterisk (*) are unique identifiers.
All the entities here are strong entities, hence “Non‐identifying Relationship” is used
Business Rules:
(1) Each staff is from one country only, and there is more than one staff from the same
country.
(2) Each ship is built in one country only, and there is more than one ship being built in
the same country.
ISOM3260 Lab (Stage 1) 40
51. Trigger
• A series of actions written in PL/SQL
• Usually written in a button
• Event‐driven, execute when a certain action
takes place:
Most common: WHEN‐BUTTON‐PRESSED
Switching among canvases
• When user clicks “Customer” button, the login
page is shown…
• GO_BLOCK (‘Datablock Name’);
– Not Canvas Name
GO_BLOCK(‘CUST_LOGIN’);
GO_BLOCK(‘WELCOME’);
ISOM3260 Lab (Stage 1) 51
59. Canvas: STUDENT_INSERTE_C
(A page in an information systems)
Datablock:
STUDENT_INSERT
(Textboxes created
base on the columns in
table “STUDENTS”)
Buttons (contains Trigger) :
BTN_INSERT
(Created under the datablock “STUDENT_INSERT)
7
Location of Objects
• The locations of different objects (eg.
textboxes) are crucial in PL/SQL programming:
– Capture textbox values for inserting data
– Retrieve data from database to corresponding
textboxes
: <Datablock Name> . <Object Name>
8
ISOM3260 Lab (Stage 1) 59
63. A customer record
15
ylx008
******
******
ylx@ust.hk
Peter
Johnson
CUS_ID CUS_LName CUS_FName CUS_UID CUS_PWD CUS_Email
C0001 Johnson Peter ylx008 ****** ylx@ust.hk
C0002 Alex Ng ang098 ****** ang@ust.hk
…… …… …… …… …… ……
After user presses “Signup”, a
customer record is created in
the customer table
Datablock Wizard (1)
• Create a datablock using Datablock Wizard
16
ISOM3260 Lab (Stage 1) 63
64. Datablock Wizard (2)
Create a datablock base on Table or View
17
Datablock Wizard (3)
• Click Browse and
login to your
Oracle account
• Username : lab5
• Password : lab5
• Database: imz350
18
ISOM3260 Lab (Stage 1) 64
78. Generate unique ID for records
45
ylx008
******
******
ylx@ust.hk
Peter
Johnson
CUS_ID CUS_LName CUS_FName CUS_UID CUS_PWD CUS_Email
C0001 Johnson Peter ylx008 ****** ylx@ust.hk
C0002 Alex Ng ang098 ****** ang@ust.hk
…… …… …… …… …… ……
When a new record is inserted,
a new ID will be generated
sequentially.
The new ID is generated using
an IF statement.
Summary
• Identify location of textboxes
:<Datablock Name> . <Object Name>
• Create Oracle Forms user interfaces to
insert records in the database
• Generate unique ID for records in database
46
ISOM3260 Lab (Stage 1) 78
98. Test the program
• How?
– Right click the textbox
– Set Update allowed and Insert allowed to “NO” to
avoid user changing the values retrieved under
Property Palette
13
Standardized Exception (1)
• Oracle Forms generates standardized
exceptions to protect data integrity:
• Example:
– Primary Key clash (ORA‐00001)
– NULL value in mandatory key fields (ORA‐01400)
– Value exceed the column size (ORA‐01401)
– No query result retrieved (ORA‐01403)
– Wrong datatype (ORA‐06502)
(Insert string into numeric fields)
– Some others….
14
ISOM3260 Lab (Stage 1) 98
99. Standardized Exception (2)
Users are not supposed deal with the error codes when using an
information system. This is considered as an unhandled exception
– a system bug
15
Standardized Exception (3)
• How to check the exception code?
– Type in the code and Google it …
16
ISOM3260 Lab (Stage 1) 99
101. Why do we need validation triggers?
There are some instances
Entered by users that are
not valid!!!!
19
Validation Triggers in Forms Developer
• Validation triggers ensure users insert correct
values in the system
• Example:
– Student_ID should be in 8‐characters
– Year should not exceed 5 and
should not less than 0
20
ISOM3260 Lab (Stage 1) 101
103. Progress Demonstration 1 (7%)
• Deliverable
1. Entity‐relationship Diagram
2. Data Dictionary
3. Workable system with the following functions:
• Allow staff to insert new product information
• Allow staff to update product information
• Allow customers to register as members
(i.e., insert new member information)
• Allow customers to update customer information
• Login as members and staff
23
Progress Demonstration 1 (7%)
• Refer to Progress Demonstration 1 checklist
for the grading criteria
24
ISOM3260 Lab (Stage 1) 103
106. Spring 2014
Page 1 of 11
ISOM3260 Database Design and Administration
Project Guideline
Overview
To truly learn how to build business applications with databases, you need to work on a group
project. The group project is simpler than real life cases, but complex enough to illustrate
common problems that you may encounter.
The project will reinforce the concepts discussed in lectures, especially database design (ER
diagrams, normalization, SQL). By working on the project throughout the semester, you can have
a better understanding of the topics.
Project Requirements
This group project (6 members each) is to develop a database system for a newly established
e-Commerce company. It contributes 30 points (30%) to the course grade. By the end of the
project, students should be able to
Non-technical
Perform a comprehensive analysis on functional requirements, both data and process
Allocate different tasks to group members effectively as in IT development projects
Build professional IT documentations
Technical
Perform data modeling of the application using Toad Data Modeler
Build a simple information system using a database programming language - PL/SQL
Compile valuable managerial reports from the database using SQL
Work with contemporary Oracle products
Deliverables
1. Progress Demonstrations (15%)
All project groups are required to demonstrate the progress of their project twice throughout
the semester. It is mandatory for each group walk-through the project with the tutor during
the two demonstrations. This is to make sure the project is developed on an appropriate track.
Date Duration Weighing
Progress Demonstration I 13, 14 March 2014 20 mins 7%
Progress Demonstration II 10, 11, 15 April 2014 25 mins 8%
There will be no make-up demonstrations available. Groups which are failed to
demonstrate during the specified periods are scored 0% in the demonstrations.
ISOM3260 Lab (Stage 1) 105
107. Spring 2014
Page 2 of 11
Progress Demonstration I : System Analysis and Design (7%)
In the first Progress Demonstration, project groups should prepare a progress documentation
which includes the following:
Data-related
o Conceptual data model (i.e., ER Diagram)
o Data Dictionary
Describes the attributes names, meanings, data types, sizes and
attribute domains (if any) of each Entity.
Process-related
o A list of functions to be implemented
In addition to the progress documentation, project groups should also show the table
structure physically created in the Oracle Database.
In addition, all project groups should demonstrate their ‘workable’ systems with the
following functions:
a. Allow staff to insert new product information
b. Allow staff to update product information
d. Allow customers to register as members
e. Allow members to update their personal information
ISOM3260 Lab (Stage 1) 106
108. Spring 2014
Page 3 of 11
Progress Demonstration II: System Implementation and Testing (8%)
In the second Progress Demonstration, all project groups should demonstrate their ‘workable’
systems with the following functions:
c. Allow staff to prepare managerial reports
(Note: Only prepare for a dummy page for managerial reports by the time of
demonstration)
f. Allow members search products and view product details
g. Allow members to make purchase
h. Allow members to view their order records
Meanwhile, project groups are welcomed to demonstrate the extra functions
implemented
In addition, project groups are required to show a Problem Log. A Problem Log serves the
following purposes:
Encourage project teams to carefully test the functions of the system before
demonstration
Help project teams to systematically document system flaws and bugs that are found,
and the person who is responsible for resolving the flaws and bugs
Help the instructor monitor the progress of each group and resolve conflicts
All group members should take the responsibility of maintaining one Problem Log. You are
recommended to import the Problem Log as a Spreadsheet into online collaboration platforms
such as Google Drive. And be sure that every group member should have access to it.
“Problem Log” is a document that is widely used in IT Project Management. It is important
for group members to maintain problem log such that it serves the intended purposes, you
should not build a Problem Log deliberately for grading purpose.
ISOM3260 Lab (Stage 1) 107
109. Spring 2014
Page 4 of 11
Sample Problem Log (Extracts):
Problem
ID
Date Created
by
Module Error
Description
Severity Actions to be
taken
Responsible
Person and Status
13 19/3 William Customer Unable to read
multiple lines of
Shopping Cart
Medium Infinite loop –
Declare a
separate variable
for the second
loop
Fixed by Chris
Test OK on 22/3
14 30/3 Angie Customer No scroll bar for
product
description
Low Enable it in
Forms Developer
Fixed by William
Test OK on 1/4
15 31/3 Linda Staff Cannot update
product
information,
records do not
change
accordingly in
Database
High To be checked by
Angie and
William
Problem not fixed
ISOM3260 Lab (Stage 1) 108
110. Spring 2014
Page 5 of 11
2. Project Demonstration and Final Report (15%)
All groups must conduct final project demonstrations to the professor and tutor on 7-9 May. Each
group is given 30 minutes to demonstrate all functions and managerial reports of their systems.
Details and rules will be given in due course.
After the project demonstration, all project groups are required to submit a Final Report. The
report is the formal document of your system. It should be integrate all work you have done in
this semester, containing the following sections:
1. Introduction to the project – 1 page
2. Conceptual data model (improved from Progress Demonstration I) – 2 to 3 pages
You should present the finalized E-R diagram and provide necessary explanations of the model,
such as why specific entity classes, relationships, and attributes are modeled in your model. You
should state the business rules and assumptions you have made.
3. Logical data model – 1 to 2 pages, landscape
You should map the E-R diagram into relations and normalize the relations into 3NF. To prove
that the relations are all in 3NF, you must list all functional dependencies for every relation.
You may consider using Excel to draw the relations, with hand-drawn functional dependencies
and referential integrity.
4. Data dictionary (improved from Progress Demonstration I) – 2 to 10 pages
You should describe all tables including their attributes, primary keys, and foreign keys.
5. Functional Requirements (improved from Progress Demonstration I) – 2 to 3 pages
You should include a list of functions that you have implemented, including extra functions
(if any), you may find Context Diagram and Use Case Diagram useful in this section.
6. A brief conclusion - 0.5 page
Summarize the state of your project and any thoughts you have on this project including
suggestions and comments for further development. Above all, please highlight the important
features of your project.
Appendix
A. Problem Log
Document the system bugs you found while testing, including the error descriptions, actions taken
person responsible and current status. You can leave the outstanding issues in the Problem Log, if
any.
B. Assumptions
You should document any extra assumptions (in point form) that you make when you implement
the project.
ISOM3260 Lab (Stage 1) 109
111. Spring 2014
Page 6 of 11
Note:
The length of the report (excluding Appendix) should not exceed 30 pages.
As your project is graded based on the final report, it is very important to follow the
guideline above to prepare and organize your final report. Omission of any part of the
report will result in deduction of the project grade.
You should make sure that the final report is consistent with what you actually
implemented. Consistency is part of the project score.
You do not have to make any screenshots of your project, and you do not have to copy
any codes written onto your final report
Peer Evaluation
Each member is required to submit a peer evaluation form to evaluate the contribution of all
members after the project submission. You are recommended to reflect the actual
contribution of every group member with honesty.
For students who do not contribute in the project and take the advantage of others’
contribution (i.e., Free-riders), their project scores are adjusted, and may result to a fail
grade in the course.
Important Dates
Progress Demonstration I 13, 14 March 2014
Progress Demonstration II 10, 11, 15 April 2014
Final Report 7, 8 ,9 May 2014
Project Presentation 7, 8, 9 May 2014
ISOM3260 Lab (Stage 1) 110
112. Spring 2014
Page 7 of 11
Project Case
1. Introduction
Recently founded by a group of HKUST business graduates, Softwareman is an e-Commerce
company selling off-the-shelf PC software package CD/DVD, etc. Your team has been hired
as IT consultants to develop an online purchasing system for the company.
2. Requirements Definition
Softwareman has a similar business model as typical online retailing stores of other products
like Amazon for books, YesAsia for CDs, etc. For simplicity, customers are required to
register as members, before they can log in to the system.
Customers view available products in the system directly. Search functions should be
implemented such that customers can search for their desired products using keywords.
When customer find favorite products, he inserts products into shopping cart. The products in
his shopping cart should be stored such that the products can be retrieved next time when he
logs into the system.
Customer views the shopping cart and makes changes. For instance, changing purchase
quantity of different products, remove undesired products, etc. Customer proceeds with
purchase through shopping cart page when he is ready. He inputs a credit card number to
make purchase. After payment is confirmed, order is stored in the database. Moreover,
customer can view his purchasing record using the system.
On the other hand, staff log into the system to manage products. For instance, adding new
products, changing the inventory of products, modifying price of products, etc.
Manager, who is also the staff of the company, can also login to the system and generate
managerial reports for making decisions on product portfolio, replenishment strategies, etc.
ISOM3260 Lab (Stage 1) 111
113. Spring 2014
Page 8 of 11
3. Use case diagram of the system
ISOM3260 Lab (Stage 1) 112
114. Spring 2014
Page 9 of 11
4. Summarized Basic functional requirements
Data Requirement
a. Member data (e.g., name, address, email, password, status, etc.)
b. Product data (e.g., brand, name, price, inventory, description, category, etc.)
c. Order data (e.g., member id, date, order total, etc.)
d. Order line data (e.g., products sold in each order, quantity, subtotal, etc.)
e. Shopping cart line data (e.g., member id, product id, quantity, etc.)
f. Staff login data (e.g., ID, password, etc.)
g. Any other data that you think will be relevant to additional functions
Process Requirement
Staff
a. Allow staff to insert new product information
b. Allow staff to update product information
c. Allow staff to prepare managerial reports (refer below for the managerial reports
requirement)
Customer/Member
d. Allow customers to register as members
e. Allow members to update their personal information
f. Allow members to search products and view product details
g. Allow members to make purchase
h. Allow members to view their order records
Managerial Reports Requirements
a. Report total sales of a selected date
b. Report total sales of last 30 days
(Note: Show the breakdown of the sales calculation by each sales order)
c. Report on the 10 most popular products, in terms of quantity sold
d. Report on the top 10 customers, in terms of sales value
e. Report sales of a particular product, in terms of quantity sold
f. Report sales of a particular category, in terms of quantity sold
g. Report showing stock-out products
ISOM3260 Lab (Stage 1) 113
115. Spring 2014
Page 10 of 11
5. Assumptions
a) You can assume the verification of validity of credit card is done by the Credit Card
Clearing House. You do not have to verify whether the credit card number, CVC number
and expiry date inserted by the customers are correct.
b) Assume the system only sells off-the-shelf software packages, not
customization/installation services.
c) This is a purchasing system. You can assume that other business functions, such as
Accounting, Logistics, etc. are not handled by this system.
d) In this phase, we decided to store the information of all products in English only.
e) For simplicity, you can use ERD, but not Enhanced ERD, for the system design.
f) For simplicity, you are not required to use images, videos, sound clips in this system.
ISOM3260 Lab (Stage 1) 114
116. Spring 2014
Page 11 of 11
6. Extra functional requirements (Optional)
Due to time constraints, Softwareman has 3 sets of extra functional requirements which
cannot be included in the basic functional requirements above. Your team may consider
implementing 1 of the 3 sets for Softwareman:
Set 1
a) Update order status
- Allow staff to update order status for orders such that customers know whether the orders
are still under preparation, or on delivery, when they view the order records.
b) ‘Forget password’
- Allow customers to retrieve the login password/reset the login password in case they have
forgotten.
Set 2
a) Apply discount
- Allow customers to enjoy discounts when purchasing products.
Set 3
a) Rate and comment products
Allow customer to rate and comment products. Average rating and all comments are
displayed to other customers.
b) Display “hot products” on the main page
Allow the customer to view hot products on the main page.
(Note: Your team can define “hot products” on your own. For instance, a product maybe
defined as hot in terms of sales quantity)
ISOM3260 Lab (Stage 1) 115