0% found this document useful (0 votes)
17 views

Assignment 01 111191128

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Assignment 01 111191128

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

UNITED INTERNATIONAL UNIVERSITY

Assignment
Course Title: Business Analytics
Course Code: CST 2321
Section: C

Submitted To
Ahmed Imran Kabir
Lecturer
School of Business and Economics
United International University
Submitted By
Md. Shamiur Rahman
ID: 111191128

1
Table of Contents

1 Introduction 4

2 Schema Diagram 5

3 Relationship Model 6

4 Forward Engineer process 8

5 SQL Queries 8

6 Implementation 14

2
22th December, 2022

Ahmed Imran Kabir

Lecturer

School of Business & Economics,

United International University.

Subject: Report on “SQL Analysis”

Dear Sir,

I pleased to prepare my report & submit to you on “ SQL Analysis”. It’s a great
opportunity to me to carry out the report under your assistance. This report couldn’t
have been finished without your direction. Please accept my apology for any errors
that could have crept into the report despite my best effort.

I would greatly appreciate it if you could shed some light on this report by sharing
your ideas and opinions. In addition, I would be happy to respond to any question if
you have any on any part of my report.

Thank you

Your sincerely,

Md. Shamiur Rahman

ID: 111 191 128

3
Introduction

Here, A new student record system that is required to design schema diagram, an
entity relationship model ( ERM), Enhanced entity relationship diagram ( EERD),
Multiple SQL queries. Creating & Implementing a new student record system that
can store about students, staffs and courses is my responsibility for this report. New
students and staff can check and update their personal information and other things
using SQL queries.

4
Schema Diagram

Here, we create 3 types of tables. The tables are:

1. Student
2. Staff
3. Class.

Student Staff Course

• first name ( Text 15) • faculty id number ( • course code ( varchar


• surname ( Text 15) Varchar 20) 10)
• address ( Varchar 20) • first name ( Text 15) • title (text 10)
• telephone number ( • surname ( Text 15) • faculty id number(
Int 11) • role ( Text 30) Varchar 20)
• email address( • contact number (Int • students id ( Int 10)
Varchar 20) 12)
• date of birth( INT 10)
• medical condition(
Text 15)
• student id ( Int 10)

Based on the table,

Student Table: Student Id, Telephone number is the primary key.

Staff Table: faculty id number & Contact number is primary key.

Course: Student id, faculty id number is the foreign key & course code is the primary
key.

5
Relationship Model:

Entity relationship modeling (ERM) is a theoretical & Conceptual approach to


depicting data relationships in software development (ERM). The database modeling
method known as ERM, which generates an abstract diagram or visual
representation of a system’s data, can be used to build relational databases.

We know, there are 3 types of relationship:

1. One to One.
2. One to Many
3. Many to Many

This 3 types model used for entity relationship model ( ERM).

To create this report I used entity relationship model ( ERM). It also related with
Primary Key( PK) & Foreign Key ( FK)

Primary Key:

Primary key means uniqueness of the table. 1st candidate key. Confirm the
uniqueness of the column.

Ex: Based on the Student & Staff table Student Id, Faculty Id number is the primary
key.

Foreign Key:

It’s mainly 2nd table candidate key. It mainly used to build a relationship between
the two tables.

6
Ex: In course table Student id & Faculty id number is the foreign key.

In this relationship model, I create five tables. Student, Course, Staff. Student &
Course are connected each other. They have many to many relationship. Based on
the relationship we create student has course table. On the other hand staff & course
are connected. They also have many to many relationship. So, here we also create
another table name is staff has course.

7
Forward Engineer:

Here I check the table relation successfully run or not. After I completing my tables
I move to the database & going forward engineering process. I skip the creation of
foreign keys, skip creation of FK indexes as well and also disable FK checks for
inserts. Finally I run it and successfully finished forward engineer.

SQL Queries:

SQL queries is very helpful for employees. Suppose, I’m working in a company and
I need find out some employees name & id number. In this case I use SQL queries.
Using SQL Queries it is very easy to find out the employee name & id. In SQL
queries we follow some step. The steps are:

USE. It mainly indicates which database we use.

8
SELECT. Here you choose the field that you want to show in the result.
FROM. Here which table you want to use.

Here, I apply data into the 4 tables and it successfully run.

Course:

9
Staff:

Student:

10
11
Here, I entry the data into the SQL data insert & click the apply and successfully
done.

12
13
Implementation:

When I’m doing this assignment I didn’t face any problem. First I have created 5
tables that represent the entity-relationship model (ERM).

Those tables are:

1. Course
2. Student
3. Staff
4. Staff has courses
5. Student has courses.

But I face bit problem when I’m doing my SQL queries. 1st 2/3 times SQL queries
doesn’t run successfully. After little trying I can successfully run the SQL queries.

14

You might also like