DBMS Assignment 2019 PDF
DBMS Assignment 2019 PDF
DBMS Assignment 2019 PDF
Re-do Assignment
Campus NP
APU Foundation & Degree
Programmes
You must hand in to the designed APU Administrator – ensure that you receive you receipt.
Marginal
Criteria Weighting Fail Pass Credit Distinction
Fail
Taking account of above factors, these overall provisional assessment of your work is:
Credi
Distinction t Pass
A+: 80- A: 75- B+: 70- C+: 60-
100% 79% 74% B: 65-69% 64% C: 55-59% C-: 50-54%
Marginal Fail Fail
F+: 30-
D: 40-49% 39% F: 20-29% F-: 0-19%
The comments and assessment result are subject to both internal and external moderation at the appropriate
Examination Board.
Consequently, they may not reflect your final grade. You may not appeal against these result on ground of
Academic Judgment.
GROUP ASSIGNMENT
TECHNOLOGY PARK MALAYSIA
CT043-3-1-IDB
NP1F1809IT
HAND OUT DATE: 23rd April 2019
HAND IN DATE: 21st July 21, 2019
WEIGHTAGE: 50%
________________________________________________________________________
INSTRUCTIONS TO CANDIDATES:
3. Normalization ......................................................................................................... 4
7. Data Dictionary..................................................................................................... 16
9. Conclusion ............................................................................................................ 27
1
1.2 Advantages of DBMS
1. Reduction in data redundancy
Data consistency means that for all instances of an application, data values are the
same. This information is a cohesive method at a moment, which means that during
processing or transferring, the information is not altered. (Reference, 2019) DBMS
promotes information consistency through information redundancy elimination or
control. If the object is only recorded once in the database, all feature updates is made
once, and the fresh value is accessible instantly in DBMS.
3. Improved data integrity
The integrity of the database concerns the quality and reliability of data. The overall
concept of data integrity is completeness, accuracy and consistency of data. This can
file, so the data will remain intact. Data integrity is generally implemented during the
using several error monitoring and inspection methods, DBMS maintains data
integrity.
2
4. Improved security
Database security is a database protection against unauthorized users. The DBA can
define user names and passwords (enforced by DBMS) as well as ensure that proper
access procedures are followed to identify people who can use the database. Access to
data by authorized users may be limited for each type of data access in the database,
e.g. retrieving, inserting, modifying, deleting, updating, etc. (Singh, 2009)
Improved data sharing, efficient data access, increased productivity of application
development, improved data accessibility and responsiveness, improved data backup
and recovery, etc. are some additional benefits that the DBMS offers.
2. Business Rules
1. Each branch has allocated a manager and extra information about the manager is
also stored.
3. Each branch offers different leasing facilities where an employee can manage up
4. One must register first at a Riverview database before being called as a client.
5. The database mainly composed of two types of property owner I.e. private owner
6. A lease is made between the client and the property after the property is leased.
3
3. Normalization
The table is developed in the first Normal form so that it can be readily expanded so
that information can be retrieved easily when necessary. The first normal form may
give the repeated values in each field but for each record, the values are atomic.
The Normalization process in the first Normal form follows following rules.
1. Each column in the table should be an atomic valued attribute.
2. Each value in a column should belong to the same domain.
3. No two field should have the same name. (Studytonight.com, 2019)
4
1NF (First Normal Form)--Automic Values
Branch_ID NameOfBusiness
Branch_name TypeOfBusiness
Address Client ID
Phone1 ClientName
Phone2 email
Phone3 Telephone
EmployeeID Address
EmpName AffordableRent
Address JoinedDate
Designation PropertyNo
Salary PropertyType
Supervisor Address
Username NoOfRooms
Password MonthlyRent
OwnerId LeaseID
OwnerName PaymentMethod
OwnerType PaidAmount
Address DoubleDeposit
email LeaseDuration
Password StartDate
Telephone EndDate
2NF
Two conditions must be satisfied for the table to be in second normal form.
1. The entire table must have gone through first normal form.
2. The table should not have partial dependencies. This means each record should be
uniquely identified using primary key. (Studytonight.com, 2019)
5
2NF(Second Normal Form)-Primary Key Identification
6
3NF (Third Normal form)-Transitional Dependencies
An Entity Relationship (ER) model is a high standard conceptual model which defines
information as entities, properties and their relationships. (S. Btoush and M. Hammad,
2015). The Entity Relationship diagram describes how each entity in the database is
related with each other. The information is shown in the ER model using symbols.
Rectangular box, Ovals and diamond are the symbols that gives information about
entities, attributes and relationship between entities respectively. The understanding
of relationships between entities can help us eliminate any ambiguity or unnecessary
business process. The ER diagram has been kept in the appendix section of this
assignment.
7
Relationship between Entities
Relationship is how the data are shared between the entities. Basically, there are three
types of relationship in a database management system.
1. One to one relationship
One case of an entity is associated with only one entity in this kind of relationship.
In such a relationship, an entity instance is associated to zero, one or many other entity
instances, but for a second entity, in the first table there is only one instance.
3. Many-to-many relationship
Zero, one or more instances of an entity relate to zero, one or many other entity cases in this
8
5. Database Schema
The database system is that skeleton that reflects the logical perspective of the
database. It describes the way in which the information is organized and how their
relationships exist between them. Through this, all the constraints to be applied on the
data are formulated. It defines the entities present on the database and their
relationship.
9
6. Table schema
10
Employee table explain details about employees working in a branch. This table has
details as empID, empname, address (i.e. postal code, street, district, city, and
province), designation, salary, branch_Id and supervisor. In this table, branch_id is
taken as foreign key with its references as branch table. Similarly, empID is declared
to be primary key with integer data type and field name supervisor is defined as
recursive key with its reference within the table employees. Also, here attribute
supervisor is said to be optional because all the data inserted in table employees will
be only applicable for employees working under supervisor, but supervisor will not
have any value to work with in.
This table stores employee's login details. It acquires empID as foreign key having
references with table employees. Similarly, attributes as empID and username are
declared to be unique because one employee can have access to only one login.
11
Fig – Client table
In this table, Client deliever their details to their assigned employees. Clients are
allowed to pin on their details as clientID, clientname, address (I.e. postal code, street,
district, city, province), email, telephone, affordable rent and empID. Here, clientID is
declared as primary key, email and telephone are said to be unique key. Similarly,
affordable rent is another attribute allowed to function under the check constraint
named as salary.
12
Fig – Property table
This table explains detailed description about all kinds of properties shown to clients.
This table includes preserve information like propertyNo, address (I.e. postal code,
street, district, city, province), monthly rent, ownerID, employeeID.
Here, ownerID and employeeID are foreign keys having their referneces from owner
table and employee table. Similarly, employeeID is declared to be unique because a
set of property will be assigned to a single employee only. PropertyNO is said to be
primary key and a check constraint is also allowed on column monthly rent under
the constraint_name as rent.
13
This table describes about type of owner we are dealing with (I.e. Private owner and
Business owner). In this table, ownerID is determined as primary key with integer
data type and owner type as unique key. Simialrly, owner type is also defined under
check constraint named as check_type to determine its belonging entity.
This table stores the records of all the private owner. It has the unique ID number
called OwnerID which is linked with OwnerID of Owner Table.
14
The Business Owner table keeps the records of all the business company that owns
the property for rental. Business names, Addresses, contact name, and telephone
numbers are stored here.
Each owner in the database is given a unique ID and username and password. The
owner must login first to get access to the database. The username is unique for all the
users.
Fig: Lease
15
A lease is drawn out between the client and the property when the property is rented
out. Method of payment, indication of double payment, paid amount, client details
and lease duration are stored in this table.
7. Data Dictionary
The Data Dictionary consists of a series of files that contain information on database
metadata. The database stores recordings of other objects that may be data
ownership, data relationships with other objects, and other information in the
database. Due to its significance, only information administrators can interact with
it. (Techopedia.com, 2019)
Branch Table
Employee Table
16
Client Table
Property Table
Owner Table
17
BusinessOwner Table
Lease Table
Structured Query Language (SQL) was first developed in the 1970s and is often used
by database administrators as well as developers who write data integration scripts
and information analysts who want to create and operate analytical
queries. (SearchSQLServer, 2019)
SQL comprises of Data Manipulation Language (DML) and Data Definition
Language (DDL). The DDL is for the creation, deletion and alteration of a table
structure and other database items. DML can be used in table or charts to insert,
recover and update information. (Darmawikarta and Setiadi, n.d.)
18
CREATE statements
!=phone1 ));
19
foreign key(Branch_ID) references Branch(Branch_ID))
wnerID),
references owner(ownerID),
20
8. create table BusinessOwner(OwnerID int unique foreign key references Owne
r(ownerID),
21
10. create table Property(PropertyNo int primary key,
DoubleDeposit char(3),
ALTER Statements
references Employees(EmpID)
DROP Statements
22
2. drop table Employees
Branch', '44600','Three','Kathmandu','Maitidevi','Chiuree
Galli','014468546','014254653',NULL)
(4001, 'govinda.neupane@study.lbef.edu.np','govinda@123'),
(4002, 'Kathmandu@rentcompany.org','rent@kathmandu2019');
23
8. INSERT INTO Client Values(2001,'Lal
10. INSERT INTO Lease values (3001, 'Cheque', 17000, 'yes', 3, '2019-3-
SELECT Statement
UPDATE Statement
DELETE Statement
24
1. List the details of branches in a given state
2. List the name, position, and salary of employees at a given branch (e.g., BR012),
ordered by employee name.
3. Identify the total number of employees and the sum of their salaries.
4. List the name of each Manager at each branch, ordered by branch address.
5. List the details of properties for rent managed by a named employee (e.g.,
Alexander).
25
6. Identify the total number of properties of each type at all branches.
7. List the number, name, and telephone number of clients and their property
preferences at a given branch (e.g., BR012).
SELECT Client.ClientID, Client.CLientName, Client.Telephone,
Property.*
FROM Property inner join Client on Property.PropertyNo =
Client.PropertyNo
inner join Employees on Client.EmployeeID = Employees.EmpID
WHERE Employees.Branch_ID = 'BR012'
8. List the total number of leases with rental periods that are less than one year at all
branches.
26
9. Conclusion
A database has been created that can be used by the RiverView Company for rental
purposes. A total of 10 tables were developed to store information about branches,
employees, login details, the property and its owner, customers and lease details. Each
table in the database is directly or indirectly associated with another table. This
project has provided us with fundamental knowledge of database design and the
opportunity to apply innovative skills. We have gained an understanding of the real-
time implementation of the database design.
This system makes interacting with the database easy for the operator and handling of
the database data. The operator can easily add, remove and update records in the
database.
27
10. References
1. Hernandez, M. (2014). Database Design: For mere Mortals. 3rd ed. Michigan:
Edwards Brothers Malloy, p.4.
2. Whatisdbms.com. (2019). Database Management System. [online] Available at:
https://whatisdbms.com/characteristics-of-database-management-system/
[Accessed 12 May 2019].
3. IT Definitions. (2019). Data Redundancy definition and information. [online]
Available at: https://www.defit.org/data-redundancy/ [Accessed 12 May 2019].
4. Reference. (2019). What Is Data Consistency? [online] Available at:
https://www.reference.com/technology/data-consistency-58b028890c673b3c
[Accessed 12 May 2019].
5. Singh, S. (2009). Database Systems. 3rd ed. E Rutherford: Prentice Hall
[Imprint], pp.32-33.
6. Techopedia.com. (2019). What is a Business Rule? - Definition from
Techopedia. [online] Available at:
https://www.techopedia.com/definition/28018/business-rule [Accessed 14 May
2019].
7. www.javatpoint.com. (2019). DBMS Normalization - javatpoint. [online]
Available at: https://www.javatpoint.com/dbms-normalization [Accessed 30
Jun].
8. Connolly, T. and Begg, C. (2014). Database Systems: A Practical Approach to
Design, Implementation, and Management: Global Edition. 6th ed. Harlow:
Pearson Education.
9. Studytonight.com. (2019). First Normal Form (1NF) of Database Normalization
| Studytonight. [online] Available at: https://www.studytonight.com/dbms/first-
normal-form.php [Accessed 4 Jul. 2019].
10. Studytonight.com. (2019). Second Normal Form (2NF) of Database
Normalization | Studytonight. [online] Available at:
https://www.studytonight.com/dbms/second-normal-form.php [Accessed 4 Jul.
2019].
28
11. Studytonight.com. (2019). Third Normal Form (3NF) of Database Normalization
| Studytonight. [online] Available at: https://www.studytonight.com/dbms/third-
normal-form.php [Accessed 4 Jul. 2019].
12. S. Btoush, E. and M. Hammad, M. (2015). Generating ER Diagrams from
Requirement Specifications Based on Natural Language Processing. International
Journal of Database Theory and Application, 8(2), pp.61-70.
13. Techopedia.com. (2019). What is a Data Dictionary? - Definition from
Techopedia. [online] Available at:
https://www.techopedia.com/definition/27752/data-dictionary [Accessed 7 Jul.
2019].
14. SearchSQLServer. (2019). what is SQL (Structured Query Language)? -
Definition from WhatIs.com. [online] Available at:
https://searchsqlserver.techtarget.com/definition/SQL [Accessed 9 Jul. 2019].
15. Darmawikarta, D. and Setiadi, M. (n.d.). SQL for MySQL.
16. Study.com. (2019). Data Definition Language (DDL): Definition & Example -
Video & Lesson Transcript | Study.com. [online] Available at:
https://study.com/academy/lesson/data-definition-language-ddl-definition-
example.html [Accessed 9 Jul. 2019].
17. MBA Skool-Study.Learn.Share. (2019). Data Manipulation Language (DML)
Definition | IT & Systems Dictionary | MBA Skool-Study.Learn.Share.. [online]
Available at: https://www.mbaskool.com/business-concepts/it-and-
systems/13118-data-manipulation-language-dml.html [Accessed 9 Jul. 2019].
29
11. Appendix
30
Work Load Matrix
31
CT042-3.1-IDB
Assignment Marking Scheme
Group Component
Total: _______ /70
Poor understanding of the Some understanding of the Sound understanding of Good understanding of the Excellent understanding of the
Business Rule business rules. Irrelevance business rules. Some the business rules. Most business rules. Relevant business rules. All business
(10 marks) business rules with business rules do not match business rules match the business rules with rules fully comply with the
requirements. the requirements. requirements. requirements. requirements.
Marks 0 1 2 3 4 5 6 7 8 9 10
No/little evidence in Database implemented but Database implemented Database implemented with Database implemented with
documentation or contains no integrity with minimal integrity appropriate integrity almost comprehensive integrity
Database schema and tables
softcopy. constraints and/or contains constraints. Justifications constraints but with some constraints and good
implemented
major errors. No given but poor. minor errors and/or justifications provided. Well-
(15 marks)
justifications given. Schema Referential Integrity has omissions. ERD proposed structured table implementation
not documented. error, tables partially matches the table reflecting ERD.
matches ERD proposed implemented.
Marks 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
No evidence in report or ERD missing major ERD contains some errors ERD has minor errors. ERD contains hardly any errors.
softcopy/ constraints & attributes. and/or omissions of Assumptions logical but has Assumptions logical and
Incomplete ERD / Assumptions do not reflect attributes & constraints. limitations on relationship. comprehensive.
ER Modelling individual relation the scenario as a complete Assumptions acceptable Good analysis on Excellent business rule
(10 marks) missing system. with limitation. functionalities & constraints. statement. Demonstrated
Business rules missing or Major limitation on business Minimal business rules Adequate assumptions. critical analysis
irrelevant to case study rules / incorrect analysis on stated with missing Minor error found
and database design case study. Incomplete constraints and important
proposed business rules analysis.
Marks 0 1 2 3 4 5 6 7 8 9 10
No/little evidence in Mapping and normalization Minor errors in mapping. Mapping done correctly but No errors in the mapping and
documentation or contain many errors and/or Most relations will be in there may be some minor normalization carried out
Normalization and logical softcopy. omissions. Does not reflect 3NF but there may be errors and/or omissions in correctly with appropriate
mapping Student did not attempt the group relational model some normalization the normalization explanations.
(15 marks) normalization. issues. Integration of illustration.
system relational model
has limitation
Marks 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
No evidence of data Contains minimal Moderate representation Good description of entities Excellent encode of entities
Data Dictionary dictionary / entities description of the database with some elements with some explanation on with relevant features,
(10 marks) missing / no features and the entities. Hardly any missing in features. constraints, attributes and constraints, attributes and
described by the data constraints found attribute values attribute values
dictionary
Marks 0 1 2 3 4 5 6 7 8 9 10
Comments: _______________________________________________________________________________________________
Student Name & ID : Govinda Neupane (NP000307) Individual Score:_____________________
Individual Component
Total : _______ /30
PART B: Individual
FAIL MARGINAL FAIL PASS CREDIT DISTINCTION
Marks (60%)
Demonstrates poor Demonstrates limited Demonstrates adequate Demonstrates good Demonstrates excellent
Understanding & understanding of problem. understanding of problem. understanding of the problem. understanding of the understanding of the
Problem Analysis Explanations will be limited Explanations will be limited Some explanations given but problem. Satisfactory problem. Good explanations
(10 marks) and likely to be insufficient to but sufficient to demonstrate likely to be insufficient to explanations given and will given and will be able to
demonstrate that the student that the student has some demonstrate that the student be able to demonstrate that demonstrate in-depth
understands the work. very basic understanding of understands to a reasonable the student understands to a understanding of the work
the problem. depth. reasonable depth.
Marks 0 1 2 3 4 5 6 7 8 9 10
SQL - Data Definition DDL not attempted. DDL attempted but does not Table definition created with Table definition found with Excellent data definition
Language ** Or no participation function correctly. minimal settings. Constraints appropriate constraints and with appropriate constraints,
(10 marks) evidence in table on attributes partially / not complete attributes. Data data types, formats and
development implemented types & formats not well used integrity rules applied
Marks 0 1 2 3 4 5 6 7 8 9 10
DML not attempted. DML Query attempted but Query functions correctly. Query functions correctly. Query functions correctly.
SQL - Data
** Or no participation does not function correctly. Allows searching by single Allows searching by multiple Allows searching by
Manipulation Language
evidence in web query field only. Search results fields & tables. Search results multiple fields & tables.
(10 marks)
development poorly displayed. not-well displayed. Search results well
displayed.
Marks 0 1 2 3 4 5 6 7 8 9 10
Comments: _______________________________________________________________________________________________
Student Name & ID: Lal Bahadur Budha (NP000312) Individual Score:_____________________
Individual Component
Total : _______ /30
PART B: Individual
FAIL MARGINAL FAIL PASS CREDIT DISTINCTION
Marks (60%)
Demonstrates poor Demonstrates limited Demonstrates adequate Demonstrates good Demonstrates excellent
Understanding & understanding of problem. understanding of problem. understanding of the problem. understanding of the understanding of the
Problem Analysis Explanations will be limited Explanations will be limited Some explanations given but problem. Satisfactory problem. Good explanations
(10 marks) and likely to be insufficient to but sufficient to demonstrate likely to be insufficient to explanations given and will given and will be able to
demonstrate that the student that the student has some demonstrate that the student be able to demonstrate that demonstrate in-depth
understands the work. very basic understanding of understands to a reasonable the student understands to a understanding of the work
the problem. depth. reasonable depth.
Marks 0 1 2 3 4 5 6 7 8 9 10
SQL - Data Definition DDL not attempted. DDL attempted but does not Table definition created with Table definition found with Excellent data definition
Language ** Or no participation function correctly. minimal settings. Constraints appropriate constraints and with appropriate constraints,
(10 marks) evidence in table on attributes partially / not complete attributes. Data data types, formats and
development implemented types & formats not well used integrity rules applied
Marks 0 1 2 3 4 5 6 7 8 9 10
DML not attempted. DML Query attempted but Query functions correctly. Query functions correctly. Query functions correctly.
SQL - Data
** Or no participation does not function correctly. Allows searching by single Allows searching by multiple Allows searching by
Manipulation Language
evidence in web query field only. Search results fields & tables. Search results multiple fields & tables.
(10 marks)
development poorly displayed. not-well displayed. Search results well
displayed.
Marks 0 1 2 3 4 5 6 7 8 9 10
Comments: _______________________________________________________________________________________________
Student Name & ID: Manisha Regmi Individual Score:_____________________
Individual Component
Total: _______ /30
PART B: Individual
FAIL MARGINAL FAIL PASS CREDIT DISTINCTION
Marks (60%)
Demonstrates poor Demonstrates limited Demonstrates adequate Demonstrates good Demonstrates excellent
Understanding & understanding of problem. understanding of problem. understanding of the problem. understanding of the understanding of the
Problem Analysis Explanations will be limited Explanations will be limited Some explanations given but problem. Satisfactory problem. Good explanations
(10 marks) and likely to be insufficient to but sufficient to demonstrate likely to be insufficient to explanations given and will given and will be able to
demonstrate that the student that the student has some demonstrate that the student be able to demonstrate that demonstrate in-depth
understands the work. very basic understanding of understands to a reasonable the student understands to a understanding of the work
the problem. depth. reasonable depth.
Marks 0 1 2 3 4 5 6 7 8 9 10
SQL - Data Definition DDL not attempted. DDL attempted but does not Table definition created with Table definition found with Excellent data definition
Language ** Or no participation function correctly. minimal settings. Constraints appropriate constraints and with appropriate constraints,
(10 marks) evidence in table on attributes partially / not complete attributes. Data data types, formats and
development implemented types & formats not well used integrity rules applied
Marks 0 1 2 3 4 5 6 7 8 9 10
DML not attempted. DML Query attempted but Query functions correctly. Query functions correctly. Query functions correctly.
SQL - Data
** Or no participation does not function correctly. Allows searching by single Allows searching by multiple Allows searching by
Manipulation Language
evidence in web query field only. Search results fields & tables. Search results multiple fields & tables.
(10 marks)
development poorly displayed. not-well displayed. Search results well
displayed.
Marks 0 1 2 3 4 5 6 7 8 9 10
Comments: _______________________________________________________________________________________________