Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Management Information System Assignment File

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

lOMoARcPSD|20475450

Management information system assignment file

B.com(hons) (Guru Gobind Singh Indraprastha University)

Studocu is not sponsored or endorsed by any college or university


Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)
lOMoARcPSD|20475450

GURU GOBIND SINGH


INDRAPRASTHA UNIVERSITY
NEW DELHI

Practical Lab File


ON
Information System Management Lab
(BBA-212)
Submitted in partial fulfillment of the requirement
for the award of degree of BBA(G)
Session:2019-2022

SUBMITTED AT:
DELHI SCHOOL OF PROFESSIONAL STUDIES & RESEARCH
ROHINI, NEW DELHI-85
[AFFILIATED TO GGSIPU-NEW DELHI]

Submitted By: Submitted To:


Kunal Agrawal Ms. Anshika Negi
Enrolment No.- 03512501719 (Assistant Professor)
BBA Sem 4

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

INDEX
S.NO. CONTENT Pg No. T.SIGN

01 Introduction of SQL and Data type 3

02 SQL DDL commands 4

03 SQL DML commands 5

04 Q.No.4 6

05 Q.No.5 7

06 Q.No.6 8-10

07 Q.No.7 11-13

08 Q.No.8 14-16

09 ER Modelling and Symbols of ER 17

10 Diagram of Organisation 18

11 Diagram of Banking System 19

12 Diagram of Hostipal Management 20


System
13 Diagram of University 21

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Question 1: Introduction to SQL. Explain what are different types of data types in SQL.

Ans . SQL stands for Structured Query Language. It is designed for managing data in a relational
database management system (RDBMS).It is pronounced as S-Q-L or sometime See-Qwell. SQL
is a database language, it is used for database creation, deletion, fetching rows, and modifying
rows, etc. SQL is used to create new databases, tables and views. It is used to insert records in a
database. It is used to update records in a database. It is required to delete records from a
database. It is required to retrieve data from a database.

Different types of Data Types in SQL

1) CHAR- A fixed length string (can contain letters , numbers, and special characters). The size
parameter specifies the column length in characters can be from 0 to 255. Default is 1.

2) VARCHAR - A variable length string (can contain letters, numbers, and special characters).

3) BOOLEAN - The BOOLEAN data type supports the storage of two values TRUE AND
FALSE.

4) INTEGER- The INTEGER data type accepts numeric values with an implied scale of zero.

5) DECIMAL - The DECIMAL data type accepts numeric values, for which you may define a
precision and a scale in the data type declaration.

6) FLOAT - The FLOAT data type accepts approximate numeric values, for which you may
define a precision up to a maximum of 64. If no precision is specified during the declaration, the
default precision is 64. Attempting to assign a value lager than the declared precision will cause
an error to be raised.

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Question 2: EXPLAIN SQL DDL COMMANDS. With Syntax and Examples.

Ans . Data Definition language is one of the subcategories of SQL. It is used to define and work
with the database structure. This includes the attributes within each table, the name of each table,
the name of the database and the connection of keys between tables.

1) CREATE COMMAND- used to create the databases, the tables, and the columns within each
table. Within the create statement we also define the data type of each column. A data type is
literally the type of data we are supposed to store within each column, whether it be an integer, a
date, or a string.

Syntax- CREATE TABLE TABLE_NAME(Attribute_name1 Data type, Attribute_name2 Data


type );

Example- CREATE TABLE STUDENT(Name Varchar(50), Age int);

2) ALTER COMMAND- used to alter existing database structures. This includes adding
columns and more.

Syntax- ALTER TABLE TABLE_NAME ADD COLUMN Attribute_name Data type;

Example- ALTER TABLE STUDENT ADD COLUMN Last Name varchar(50);

3) DROP TABLE COMMAND- This is used to destroy your database or table.

Syntax- DROP TABLE TABLE_NAME;

Example- DROP TABLE STUDENTS;

4) RENAME- This is used to rename.

Syntax- RENAME TABLE OLD_TABLE_NAME TO NEW_TABLE_NAME;

Example- RENAME TABLE Students TO Students1;

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Question 3: EXPLAIN SQL DML COMMANDS. With Syntax and Examples

Ans . Data Manipulation Language is used to work with the actual data within the database. If
we looked at an example with a users table, the table is created with DDL while the value “Caleb
Curry” is entered using DML.

1) SELECT- This is used to select data from our database. We first SELECT AND then we say
what columns to select. After we say what columns, we specify what tables using FROM. After
we select what columns and what tables we can limit our results using a WHERE clause.

Syntax- SELECT * from TABLE-NAME, WHERE CLAUSE.

2) INSERT INTO- This is used to change values.

Syntax- INSERT INTO TABLE_NAME VALUES(Value1, value2…);

Example- INSERT INTO STUDENT values (01,’Umesh’,25);

3) DELETE- This is used to delete values(the database structure stays the same, only inserted
values are removed).

Syntax- delete from table_ name where clause.

Example-delete from STUDENT where Name=’Umesh’;

4) UPDATE- This is used to change values.

Syntax- Update Table_Name SET Attribute_Name=Value where CLAUSE;

Example- Update STUDENT SET Name=Amit where p_id=05;

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Question 4: Create table customer(c_id, c_name, address, city, pincode, country) insert atleast
10 values. Display the table.

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Question 5: Create table named employee containing columns


(emp_id,emp_name,emp_desig,dob,emp_sal,emp_dept) insert 10 atleast values

Constraints applied on employee table

1.emp_id should be primary key

2.emp_sal should not contain any null value

3.emp_desig should be unique

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Question 6: Create employee table

A. EID,ENAME,DESG,BRANCH,SALARY,ADDRESS.

B. INSERT 10 RECORDS

C. Salary column should not contain any null value

D. Salary should be between 5000-35000

E. ENAME should be unique

Perform various SQL Commands.&Display Table

I. Add column in above table date of joining, experience

II. Display the table

III. Complete the table definition

IV. Delete the column DESG

V. Find out details of employee whose salary is above 25000.

VI. Find out details of employee order by salary

VII. Calculate total number of records in employee table

VIII. List employees whose salary is between 10000-30000.

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Question 7: Create the following table AND PERFORM SQL COMMANDS STUDENT
(ROLL_NO, NAME, AGE, COURSE, MARKS).

1) Select * from student where age is > 18 & course = MBA

2) List name of student where name like (%%i)

3) Find out total number of records in table

4) Find out name, course, marks from student order by marks asc.

5) Display name and course of student

6) Find the student with max marks

7) List the names of students order by Roll_No in des. Order.

8) Find out the average of all the marks. Display it as average_marks.

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Question 8: Create the following tables. Insert atleast 10 records in each.

A. Supplier (s_no, sname, status, city)


B. Parts (p_no, pname, color, weight, city)

Answer the following queries in SQL

1) Find the supplier for city = Delhi

2) Find all supplier whose name start with “ab%”

3) Find all suppliers whose status is 10, 20 or 30

4) Find total number of city of all suppliers

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Question 10: Draw Entity Relationship diagram of an Organisation.

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Question 11: Draw Entity Relationship diagram of a Banking System

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Question 12: Draw Entity Relationship diagram of a Hospital Management System.

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)


lOMoARcPSD|20475450

Question 13: Draw Entity Relationship diagram of a University.

Downloaded by ADITYA GUPTA (00424588820@jimskalkaji.com)

You might also like