>> Database Management System
- To develop a conceptual data model diagram
- To perform logical design
In this assignment, you need to perform the following tasks for the given case study:
- Draw an Entity Relationship (ER) diagram
- Perform logical design
- Create 3NF Relations
The CQ-Council (hereafter called as council) posts a full page advertisement, in local newspapers once a month, displaying all the Development Plan applications (here after called as application) that have been received during the previous month from the developers/ owners of the plots under the council's purview.
General public members are allowed to raise objections against the applications that appear on those advertisements within a certain period of time, such as two weeks from the date of the advertisement. The council maintains the details of those objections and the respective application details. The council maintains all such objections even if they are from an anonymous member of the public.
The council also maintains detailed records of the following:
- suburban areas in the council
- lots in each suburban area
- subdivision/merger plans
- plots and owners
For your information, the council designates some of its suburban areas for recreation, community, commercial, residential, etc. Some parts of the land, in each suburban area, are allocated for approach road and street facilities. The remaining land in a suburban area is further divided into land parcels (here after called as lots). Each of such lots has a unique lot number and details of at least three boundaries and at most four boundaries.
Generally speaking, only one building is allowed to exist in one lot. A developer, on behalf of the owner(s) of a lot, or an owner-developer of a lot (both of them are here after called as applicant) can submit an application to the council. The applications will be received for commercial and residential area only. Occasionally, the applicants can apply for merger of lots or subdivision of lots to create new land parcels. The details related to mergers and sub divisions of lots have not been provided here as they are not covered in the proposed information system.
If the application is complying with the council's developmental policies then the council officers issue a clearance tag to that application. Rejection letters are issued for the remaining non-compliant applications. Subsequently, they also verify the objections raised by the public on those clearance-tag-applications and discard all the irrelevant objections which are not in line with the council's developmental policy. If a clearance-tag-application is still left with the objections which are in line with the council's policy then that application is rejected and a rejection letter is issued accordingly. Thus an application is considered to be a successful application if it has received the clearance tag from the council and does not have any relevant objection from the public. All the other applications are considered to be unsuccessful applications. Each successful application will be given a unique clearance number and the date of its clearance is recorded.
The purpose of an application can be for any of the following:
- extension of the existing building
- demolition of existing building and/or construction of a new building
- tree removal
- subdivision of a lot/merger of lots
The council requires that each of the tree removal application must contain the number of trees to be removed from the relevant lot. Even though the applicable council charges for various purposes may change over a period of time, you can assume that they are fixed charges in the proposed information system. At the time of lodging an application, the applicant has to pay the total charges of the application to the council.
For each of the successful development applications, the council inspectors may perform many site-inspections such as tree-removal, building foundation, building occupancy, etc., and record their date of visit and approval/non-compliance details if any. Only one council inspector is involved in each inspection and it is needless to say that only appropriate inspections are conducted for appropriate purposes. Based on the inspection reports submitted by its inspectors, the council will issue building occupancy certificate and tree removal permission to the respective applicants.
You are expected to create an information system to cater the above information needs of the council. In this assignment, conceptual and logical design phases of the development of that information system have to be carried out. The attributes for various entities have not been purposely described in the case study so that the students are encouraged to further research and list the pertinent attributes in addition to the required identifier for each and every entity in their ERD.
1 Draw an appropriate ER diagram
Use the symbols as prescribed in your course-textbook to draw the ER diagram (ERD) for the above case study.
Your ERD must
- show all necessary entities, attributes and relationships
- show identifiers/identifying attributes as necessary
- show multi-valued attributes, if any
- show participation and cardinality
- show associative entities, if appropriate
- show weak entities, if any
- use the notation described in the set text
- use consistent and appropriate naming for entities and attributes as specified in the course text book
Some business rules or other aspects of the case study may not be clear to you when you read the case study. If this is the case, then you should either approach your lecturer or tutor for clarification, or you may simply make an assumption and then develop your ERD accordingly. For example, the case study might not mention all relevant participation information (also called minimum cardinalities). If so, you may make an assumption about what the minimum cardinalities might reasonably be, and then show them in your ERD accordingly. You should justify each assumption in terms of the business, for example: it is assumed that each customer must have at least one order because it is assumed that the business does not record customer details until the customer places an order.
To get yourself started, ask yourself, 'If I were running this business, what things I need to keep a list of?' Write those things down. For each thing, what information would you need to record about it? How can it be identified? The answers to these questions will help you to develop your ERD.
2 Assumptions and Business rules
Provide assumptions and business rules relevant to your ERD.
3 Create Logical Design:
Map your Entity Relationship diagram (ERD) into relations and make sure that all the relations are in 3NF. Provide all the relations in the following format:
Customer (CustomerId, customerName, Street, Suburb, State, PostCode, Email)
Invoice (InvoiceNumber, invoiceDate, Total, CustomerId)
foreign key (CustomerId) references Customer(CustomerId)-
This assessment item relates to the course learning outcomes numbers 1, 2 and 3 as stated in the course profile.
a) Map the ERD, from the sample solution, into a set of relations in at least Third Normal Form (3NF). You must ensure that your relations meet 3NF. There is no need to show your working.
b) Select any two (2) of your relations from the previous step, 1a), and perform the following for each of those two relations:
• List all the functional dependencies exist in the relation.
• Demonstrate that the relation meets Third Normal Form (3NF).
For your help, an example for a Student relation's 3NF justification has been provided below:
STUDENT (StudentID, Name, Address, DateOfBirth)
i. The primary key is StudentID. There will be one student name per Student ID, since only one name is recorded for each student. There will be one address per Student ID; even though a student may have multiple address (e.g. a home address and a work address), the case study states that there is a need to record the home address only. There will be only one date of birth per Student ID. Thus, there are no repeating groups. Hence, this relation is in 1NF.
ii. The primary key is StudentID. This is the only candidate key since Name is not guaranteed to be unique (two different students may have the same name). Address is also not guaranteed to be unique. This means that Student ID functionally determines every other attribute in the table. There is a single simple candidate key (StudentId) and therefore no partial dependencies are possible. Hence, the relation is in 2NF.
iii. Name cannot be used to functionally determine any other attribute in the table since two different students may have the same name; likewise for address and date of birth. Therefore there are no transitive dependencies in the table. Therefore it meets the requirements of first, second and third normal form.
2 Relational database implementation
Note: Use the relations that you created in the above step 1-Normalization to create a database. The recommended tool for this work is Microsoft Access, version 2010 or later. One reason for recommending Microsoft Access is that your course lecturer/tutor will be able to provide adequate support to you in the use of this tool. If you choose to use a different DBMS, then there is no guarantee that your lecturer/tutor will be able to provide enough support to you. The remainder of this document assumes that you are using MS-Access.
In implementing the ER model provided, you must complete the following tasks:
- Create all the relations in a Microsoft Access database. Consider each attribute in every table and make appropriate choices regarding data types & sizes, indexes, required/not required and validation rules. Your choices should be appropriate for each attribute and should support data integrity. (Note: see the Data Integrity section below for specific data integrity requirements)
- Create relationships as appropriate. Enforce referential integrity for all appropriate relationships in the database. Apply cascade update and/or delete options wherever necessary.
- Review the default indexes created by Access for each table. You should ensure that the indexes follow the guidelines given in the course textbook.
- Populate the database with sample data of your own. You must include sufficient sample data to test your queries and report. Please note that the expected result of query questions may depend on the actual sample data populated.
You are required to implement integrity constraints within the database to enforce the following requirements:
For the table TreeRemoval:
- All fields must be entered.
- Charges should be positive and expressed 2 decimals only.
- Number Of Trees should be positive round numbers only.
For the table Inspection:
- Date should not be null.
For the table Owner:
- Name should not be null.
- State value should be limited to Australian States/Territories only.
Create queries to answer the following information requests. Note: Do not use the Access query builder (QBE) to create your queries - you should type the queries manually using SQL view/editor.
The marking process of the queries for information requests may also consider the effectiveness of your SQL statements that have been used in the queries. It is important that your SQL statement must reflect the correct business logic & SQL syntax. (Use enough sample data so that the output is produced by each and every query).
1. Display the details of council inspector(s) who has/have never performed any inspection.
2. For each of the suburbs, display the number of successful applications.
3. For each of the applications display the application number, details of owner and total charges.
4. Display the lowest, the highest and average number of applications in the advertisements.
5. Which application(s) did receive the highest number of objections? Display the details of those application(s) and their respective applicant(s) in descending order of their name.
6. Display the details of the applicant(s) whose name contains the word "build". Show the results in ascending order of their name.
Note: The word ‘name' is a reserved word in MS Access. Wherever you use it for SQL query, you need to put a bracket like [name]. Follow the same technique for other reserved words too.
You must also provide a short implementation report describing your experiences with this assignment. You may discuss any of the following:
1. Any two interesting things/procedures you learnt by doing this assignment.
2. Any one requirement of the assignment that was relatively difficult / complex to solve but successfully completed by you.
Use the implementation report to demonstrate that you have thought carefully about the issues that arise when implementing a relational database.