Iresha - Kur-1696400921716-288483-E185242 - Unit - 04 - Database - W.G. Sahan Hasakelum Jayakody
Iresha - Kur-1696400921716-288483-E185242 - Unit - 04 - Database - W.G. Sahan Hasakelum Jayakody
LO2 Develop a fully functional relational database system, based on an existing system
design
Pass, Merit & P2 P3 M2 M3 D2
Distinction Descripts
* Please note that grade decisions are provisional. They are only confirmed once internal
and external moderation has taken place and grades decisions have been agreed at the
assessment board.
Action Plan
Summative feedback
Student Date
signature
General Guidelines
1. The font size should be 12 point, and should be in the style of Time New Roman.
2. Use 1.5 line spacing. Left justify all paragraphs.
3. Ensure that all the headings are consistent in terms of the font size and font style.
4. Use footer function in the word processor to insert Your Name, Subject,
Assignment No, and Page Number on each page. This is useful if individual sheets
become detached for any reason.
5. Use word processing application spell check and grammar check function to help
editing your assignment.
Important Points:
1. It is strictly prohibited to use textboxes to add texts in the assignments, except for
the compulsory information. eg: Figures, tables of comparison etc. Adding text boxes
in the body except for the before mentioned compulsory information will result in
rejection of your work.
2. Carefully check the hand in date and the instructions given in the assignment. Late
submissions will not be accepted.
3. Ensure that you give yourself enough time to complete the assignment by the due
date.
4. Excuses of any nature will not be accepted for failure to hand in the work on time.
5. You must take responsibility for managing your own time effectively.
6. If you are unable to hand in your assignment on time and have valid reasons such as
illness, you may apply (in writing) for an extension.
7. Failure to achieve at least PASS criteria will result in a REFERRAL grade .
8. Non-submission of work without valid reasons will lead to an automatic RE FERRAL.
You will then be asked to complete an alternative assignment.
9. If you use other people’s work or ideas in your assignment, reference them properly
using HARVARD referencing system to avoid plagiarism. You have to provide both
in-text citation and a reference list.
10. If you are proven to be guilty of plagiarism or any academic misconduct, your grade
could be reduced to A REFERRAL or at worst you could be expelled from the course
I hereby, declare that I know what plagiarism entails, namely to use another’s work and to
present it as my own without attributing the sources in the correct form. I further
understand what it means to copy another’s work.
[email protected]
Student’s Signature: Date:
(Provide E-mail ID) (Provide Submission Date)
Unit Tutor
Issue Date
Submission Date
Submission format
Part 1: The submission should be in the form of an individual written report written in a concise,
formal business style using single spacing and font size 12. You are required to make use of
headings, paragraphs and subsections as appropriate, and all work must be supported with
research and referenced using Harvard referencing system. Please also provide in-text citation
and bibliography using Harvard referencing system. The recommended word limit is 3,000–
3,500 words, although you will not be penalised for exceeding the total word limit.
Part 2: The submission should be in the form of a fully functional relational database system
demonstrated to the Tutor; and an individual written report (please see details in Part 1 above).
Part 3: The submission should be in the form of a witness statement of the testing completed
by the Tutor; technical documentation; and a written report (please see details in Part 1 above).
Unit Learning Outcomes:
LO1 Use an appropriate design tool to design a relational database system for a substantial
problem.
LO2 Develop a fully functional relational database system, based on an existing system design.
LO3 Test the system against user and system requirements.
LO4 Produce technical and user documentation.
Assignment Brief and Guidance:
Activity 1
Identify the user and system requirements to design a database for the above scenario and
design a relational database system using conceptual design (ER Model) by including
identifiers (primary Key) of entities and cardinalities, participations of relationships. Convert
10
Activity 2
Develop a relational database system according to the ER diagram you have created (Use
SQL DDL statements). Provide evidence of the use of a suitable IDE to create a simple
interface to insert, update and delete data in the database. Implement proper security
mechanisms in the developed database and evaluate the database solution developed in
terms of its effectiveness with relevance to the user and system requirements identified,
system security mechanisms (EX: -User groups, access permissions) and the maintenance of
the database. Suggest improvements for any identified problems.
Assess the usage of the below SQL statements with the examples from the developed
database to prove that the data extracted through them are meaningful and relevant to the
given scenario.
Select/ Where / Update / Between / In / Group by / Order by / Having
11
3.1 Provide a suitable test plan to test the system against user and system requirements.
provide relevant test cases for the database you have implemented. Assess how the selected
test data can be used to improve the effectiveness of testing.
Note:- Learner needs to give expected results in a tabular format and screenshots of the
actual results with the conclusion
3.2 Get independent feedback on your database solution from the non-technical users and
some developers (use surveys, questioners, interviews or any other feedback collecting
method) and make a separate conclusion from the feedbacks.
Activity 4
Produce technical and user documentation for a fully functional system, including data flow
diagrams showing movement of data through the system, and flowcharts describing how the
system works. Evaluate the developed database by suggesting future enhancements to
ensure the effectiveness of the system.
12
.
M2 Implement a fullyfunctional database system, which
includes system security and database maintenance.
14
15
I would like to express my sincere gratitude to Ms. Iresha Jayarathne and Mr. Lasitha
Ranawaka, our esteemed lecturers at the ESOFT Metro Campus Kurunegala, for their
invaluable guidance and support throughout the process of creating my Database
Design and Development (Computing) assignment. Your commitment to teaching,
willingness to respond to our questions, and insightful explanations have played a
crucial role in improving my understanding of this challenging subject.
In a database, you can organize the data in rows and columns in the form of a table.
Indexing the data makes it easy to find and retrieve it again as and when required. Many
websites on the World Wide Web are managed with the help of databases. To create a
database so that the data is accessible to users through only one set of software
programs, database handlers are used. (Intellipaat, 2023)
MySQL, SQL Server, MongoDB, Oracle Database, PostgreSQL, Informix, Sybase, and
others are all different types of databases commonly used today. These modern
databases are managed by a Database Management System (DBMS). To interact with
and manipulate the data stored in these databases, a widely used language called
Structured Query Language (SQL) is utilized. (Intellipaat, 2023)
The database started with a file-based system about 50 years ago. In due time, it has
gone through generations of evolution.
Hardware:
Physical electronic devices such as storage devices, I/O devices, and many more. It can
act as an interface between computers and real-world systems. (Intellipaat, 2023)
Software:
Programs for managing and controlling the overall database. DBMS itself is software.
The OS, the database application programs that allow data access in DBMS, the network
software that shares data, etc. are all examples. (Intellipaat, 2023)
Data:
It is the information that is gathered, stored, accessed, and processed by a DBMS, e.g.,
actual data, operational data, and metadata. (Intellipaat, 2023)
Procedure:
It is the specific set of instructions and rules to use a database for designing and running
the DBMS, as well as to instruct users on how to operate and manage it. (Intellipaat,
2023)
Relational database:
Object-oriented database:
Here, the data is represented in the form of objects, as in object-oriented programming.
(Intellipaat, 2023)
Distributed database:
It has two or more files located in different places. The database may be in the same
physical location on multiple computers or scattered over different networks.
(Intellipaat, 2023)
NoSQL database:
NoSQL is a nonrelational database that contains unstructured and semistructured data. It
rose in popularity as web applications came to be commonly used and became more
complex. (Intellipaat, 2023)
Graph database:
It stores data in the form of entities and the relationships between them. (Intellipaat,
2023)
Cloud database:
This database runs on a Cloud Computing platform, and access is provided ‘as a
service.’ (Intellipaat, 2023)
Centralization database:
CDB is located, stored, and maintained in a single centralized location, for example, a
mainframe computer, desktop, or server CPU. (Intellipaat, 2023)
Operational database:
Also known as OLTP or online transactional processing database, it is designed to create
or update big amounts of data and store transactions performed by multiple users in real-
time. (Intellipaat, 2023)
7
a. The data is stored in a neater way and hence, more data can be stored.
b. A DBMS is a highly secure platform so confidential and high-risk data can also be
stored and accessed, securely.
c. DBMS makes handling of data very simple.
d. Data inconsistency is greatly reduced by a well-designed DBMS.
e. Data can be accessed quickly. (Intellipaat, 2023)
a. Maintaining the software and hardware required for a DBMS is usually expensive.
b. The more data is fed into the DBMS, the more disk space it occupies.
c. Using DBMS could seem very difficult for someone from a non-technical
background.
d. Since all the data is stored in one DBMS, if the software fails, all the data of the
organization could be lost. (Intellipaat, 2023)
The requirements for a system are the descriptions of the services that a system should
provide and the constraints on its operation. These requirements reflect the needs of
customers for a system that serves a certain purpose such as controlling a device, placing
an order, or finding information. The process of finding out, analyzing, documenting and
checking these services and constraints is called requirements engineering (RE).
(Collegenote, n.d.)
Some of the problems that arise during the requirements engineering process are a result
of failing to make a clear separation between these different levels of description. we
distinguish between them by using the term user requirements to mean the high-level
abstract requirements and system requirements to mean the detailed description of what
the system should do. User requirements and system requirements may be defined as
follows: (Collegenote, n.d.)
The most important element in the database entity is that it can be uniquely identified.
Read on to find out how entities and attributes combine to make this possible. (Nalimov,
2020)
Database entities can further be divided into tangible and intangible entities. If the entity
physically exists in the real world, then it is tangible. A person is tangible, as is a city. If
it exists logically in the real world, then it is intangible. A job is not a physical thing that
you can touch, so it is intangible. The same goes for your car – tangible – and your car
insurance – intangible. One may be tangible, and the other intangible, but they both exist
10
Tangible entity
Intangible entity
Entities are stored in tables in databases. Each table will contain an entity set or a list of
all those entities which are considered similar. For instance, in a university database, the
students might be in one table, the staff in another. If your database contains entities that
share attributes, you can group them into an entity set and store them in a single table.
(Nalimov, 2020)
One of the criteria for determining whether something is an entity is that it can be
differentiated from other entities, so the table will only contain unique entities. These
are recorded in rows. One row per entity. (Nalimov, 2020)
If you want to be able to work with your database, you need to be able to distinguish
each entity from all other entities. They need to have information describing how they
exist in the real world. The way to differentiate entities in the table from each other is
through attributes. (Nalimov, 2020)
Each entity has its own row, but all entities in a particular table will share the same
possible attributes. These attributes are the columns of the table. The attributes describe
the entity. A table of employees might contain attributes such as name, address, phone
number, and job title. (Nalimov, 2020)
To preserve uniqueness, each entity should also have a key attribute. In our employee
table, employee ID number might be the key attribute. No two employees should have
the same employee ID number, even if otherwise they’re unusual enough to share every
other attribute! (Nalimov, 2020)
11
An Entity Relationship (ER) Diagram is a form of flowchart that shows the relationships
between "entities" like people, things, or concepts within a system. ER Diagrams are
most frequently used in the disciplines of software engineering, business information
systems, education, and research to build or troubleshoot relational databases. They are
also known as ERDs or ER Models, and they use a predetermined collection of symbols
to represent the interconnectedness of entities, relationships, and their qualities. These
symbols include rectangles, diamonds, ovals, and connecting lines. They have verbs for
relationships and nouns for entities, mirroring the grammatical framework.
Data structure diagrams (DSDs), which emphasize interactions between elements within
entities rather than relationships between things themselves, are linked to ER diagrams.
ER diagrams are frequently combined with data flow diagrams (DFDs), which depict
the information flow for systems or processes.
Database design: Relational databases are modeled and designed using ER diagrams,
both in terms of the exact technology to be used (in a physical data model) and in terms
of the logic and business rules to be followed (in a logical data model). An ER diagram
12
Business process re-engineering (BPR): ER diagrams are useful for both assessing
databases used in new database modeling and business process re-engineering.
Education: Today, relational data are stored in databases for later retrieval and
instructional purposes, therefore ER Diagrams might be helpful in designing those data
structures.
Research: Since structured data is the focus of so much study, ER diagrams can be
crucial in creating useful databases to evaluate the data.
13
1. Simple Attributes
Simple attributes are those that cannot be further divided into sub-attributes. (Sugandhi,
2023)
2. Composite Attributes
Composite attributes are made up of two or more simple attributes. For example, a
person's address may be a composite attribute that is made up of the person's street
address, city, state, and zip code. Composite attributes can be used to create more
complex data models and can be helpful when trying to represent data in a concise way.
(Sugandhi, 2023)
14
4. Multivalued Attributes
Multivalued attributes can have more than one value. For example, a person may have
multiple email addresses or phone numbers. Multivalued attributes in DBMS are often
used to store information about relationships between entities. For instance, an
employee entity might have a multivalued attribute called "dependents" that stores the
names of the employee's dependents. Multivalued attributes can also be used to
represent hierarchical data. (Sugandhi, 2023)
5. Derived Attributes
Derived attributes are based on other attributes and are not stored directly in the
database. (Sugandhi, 2023)
For example: Consider a database of employees. Each employee has a date of birth, and
we might want to calculate their age. However, age is a derived attribute because it can
be determined from the date of birth. As such, it would not make sense to store it
directly in the database. (Sugandhi, 2023)
6. Complex Attributes
The complex attribute in DBMS involves both multivalued and composite attributes. For
example, someone might have more than one house, and each house might have more
than one phone. The phone is then considered a complex attribute. (Sugandhi, 2023)
In the example above, the phone number is a composite attribute of the area code,
exchange, and line number. Complex attributes are often used in database design to
represent relationships between entities. (Sugandhi, 2023)
7. Key Attributes
15
For example: In a table of employees, the employee ID would be the primary key, while
the manager ID would be the foreign key. (Sugandhi, 2023)
8. Stored Attributes
In a DBMS, stored attributes are the data that remain constant and fixed for an entity
instance. These values help in deriving the derived attributes. (Sugandhi, 2023)
For example: consider a customer entity in a bank. The customer's name, age, and
address would be stored attributes. The customer's account balance (a derived attribute)
could be calculated based on the transactions (another stored attribute) associated with
the customer (Sugandhi, 2023)
Database cardinality can be defined as the set of elements arranged in tables and rows. It
also refers to the counting done to recognize the elements in a set, identify relationships
among different tables, and identify the number of values in the tables. These
relationships can be one-to-one, many-to-many, and one-to-many. (SolarWinds, n.d.)
16
High cardinality represents a significant level of diversity with less repetition of entities.
It can be defined as tables with a large number of unique values. For instance, a data set
with unique customer IDs can be categorized under high cardinality. On the other hand,
low cardinality refers to data sets with large quantities of similar values, repetition, and
less variety. The best example is a retail shop where each data set lists the category of
each product. (SolarWinds, n.d.)
Database monitoring tools help monitor multiple database management system (DBMS)
platforms by utilizing features such as anomaly detection powered by machine learning,
support for cloud and on-premises databases, expert advice with index and query tuning
advisors, and more. Database monitoring tools help identify bottlenecks, help pinpoint
the root causes of issues, and help users prioritize actions. Moreover, these tools
17
18
Figure 1 - ER Diagram
19
Normalization is the process to eliminate data redundancy and enhance data integrity in
the table. Normalization also helps to organize the data in the database. It is a multi-step
process that sets the data into tabular form and removes the duplicated data from the
relational tables. (S, 2023)
20
Example:
Suppose you have a table for storing customer orders, and each row represents a single
order. In 1NF, you would ensure that each attribute contains atomic values, such as
having separate columns for customer name, address, and phone number instead of
combining them into one field.
Example:
Building upon the customer order table example, if the primary key of the table consists
of order ID and product ID, then any attribute in the table should be dependent on both
the order ID and the product ID to be in 2NF.
21
Example:
In the customer order table, if there's an attribute like "salesperson's phone number," and
the salesperson's phone number depends on the salesperson's name, which in turn
depends on the customer's ID, you should remove this transitive dependency to achieve
3NF. This might involve creating a separate salesperson table.
Example:
If you have a table of employees with attributes like employee ID, department ID, and
department name, and the department name depends only on the department ID, then it's
in BCNF.
a. 5NF, or Project-Join Normal Form (PJ/NF), deals with situations where a table
has multiple overlapping composite keys.
22
Example:
5NF is relatively rare in practical database design and often involves complex scenarios
where tables have multiple, interrelated composite keys.
The software should now create the logical database that was built above so that it may
be used for application. Let's examine the format of the queries used to make tables.
23
24
25
26
27
28
30
31
32
33
34
The application is created to help convert the "Quiet Attic Film" Company's handheld
database into a digital database. The user of the application will be able to easily access
the database from the application and use it without any effort of coding and other
knowledge. User of the application can perform data insertion, update, delete and
management of the database.
a. If you want to log this system firstly you have to login this system enter
username and password. Therefore, you have to insert username and password.
b. After the user logged in to the System the Main menu will appear.
c. After clicking the Production button Production interface will appear.
d. After clicking the client button client interface will appear.
35
production_id: This identifies each production record specifically. It acts as the table's
main key, making sure that each production entry has a unique and recognizable
reference.
location_id: This element serves as an identification number for various sites where
manufacturing operations are carried out. As a foreign key, it links the production record
to a particular place in the database, identifying the location of the production.
The identifier for different resources or properties that are important to the production
process is property_id. It may stand in for machinery, raw materials, or any other
production-related components. Similar to location_id, this field serves as a foreign key
that links the production record to a particular resource or property.
36
37