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

i Bcom CA Dbms Model Final

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

i Bcom CA Dbms Model Final

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

ADITHYA COLLEGE OF ARTS AND SCIENCE

MODEL EXAMINATIONS MARCH- 2025


DEPARTMENT OF COMMERCE WITH CA/ DATABASE MANAGEMENT SYSTEM PRACTICAL
Semester : II Duration : 2 hours
Class : I- B.COM(CA) Max Marks :75

1. a)Create the Project table with the following fields.

Field Name data type width Constraint Description


Projno number 5 Primary key Project Number
Location character 20 Project Location
Custname character 20 Customer Name
Year number 4 Project Year

b)Create the Employee table with the following fields.

Field Name data type Width Constraint Description


empno number 5 Primary key Employee Number
empname character 20 Employee Name
deptno number 5 Foreign key Department Number
Project
projno number 5 Foreign key
Number
Employee
Salary number 8,2
Salary

c) Insert the following data into the tables:


Project Table
PROJNO LOCATION CUSTNAME Year
Chennai Vimal 2005
Coimbatore Vijay 2006
Salem Ramesh 2005
Chennai Ravi 2005
Chennai Suresh 2006
Salem Murali 2005
Employee Table

d) Perform the following queries:


i)Increase the salary of the employees working in department number 10 by 15%.
ii)Find the employee number and names of employees who get the salary in the range 20000 and
30000.
iii)Find the information about the employees whose name starts with the letter ‘r’.
iv)Find the employee names and salary for employees who work in ‘production’ department.
v)Find the details of the employee who gets the maximum salary.
vi)Find the department number of all departments which has more than 2 employees working in it.
ADITHYA COLLEGE OF ARTS AND SCIENCE
MODEL EXAMINATIONS MARCH- 2025
DEPARTMENT OF COMMERCE WITH CA/ DATABASE MANAGEMENT SYSTEM PRACTICAL
Semester : II Duration : 2 hours
Class : I- B.COM(CA) Max Marks :75

2. a)CREATE the table WAREHOUSES with the following fields.

Field Name data type width Constraint


Code Char 15 Primary Key

Location Char 15 Not Null


Capacity varchar 15 Not Null

b) CREATE the table BOXES with the following fields.

Field Name data type width Constraint


BCode Char 15
Contents Char 15 Not Null
Value varchar 10 Not Null
Warehouse Char Foreign Key(Primary
Key)

c)Perform the following queries.


i) Modify B Code as a Not null in “BOXES” table.
ii)In Boxes table Code must be greater than 100 how to evaluate the condition?
iii)Insert the value to WAREHOUSES table & Boxes table:

iv)Boxes table “contents” contains many duplicate values within it. Retrieve the value without any
duplication.
v)Find the values between 3 and 8 and show the results and Use all Aggregate function in boxes
table (Use Value field).
vi)Retrieve the warehouse code along with the average value of the boxes in each warehouse.
ADITHYA COLLEGE OF ARTS AND SCIENCE
MODEL EXAMINATIONS MARCH- 2025
DEPARTMENT OF COMMERCE WITH CA/ DATABASE MANAGEMENT SYSTEM PRACTICAL
Semester : II Duration : 2 hours
Class : I- B.COM(CA) Max Marks :75

3. a)Create the table Pieces with the following fields.

FIELD NAME DATATYPE WIDTH CONSTRAINT DESCRIPTION


Code Integer 6 Primary key Piece code
Name Character 25 Not null
Color Character 10 White or black

b)Create the table providers with the following fields.


FIELD NAME DATATYPE WIDTH CONSTRAINT DESCRIPTION
Code Character 8 Primary key Providers code
Name Character 25 Not null
State Character 15 Fill it with Tamil Nadu
Phoneno Number 10 Value must be 10

c)Create the table provides with the following fields.


FIELD DATATYPE WIDTH CONSTRAINT DESCRIPTION
NAME
Piece Integer 6 Primary key, Foreign key Piececode

Provider Character 6 Primary key, Foreign key Providers code

Price Numeric 8,2 Price of the piece


Qty Numeric 5 Not null Number of
pieces

d)Perform the following queries:


i)Insert the following records into all tables: Piece Provider Price Qty
1 HAL 10 5
Code Name Color
1 Sprocket White 1 RBT 15 7
2 Screw Black 2 HAL 20 5
3 Nut White 2 RBT 15 8
4 Bolt Black 2 TNBC 14 10
3 RBT 50 1
3 TNBC 45 5
Code Name State Phone no
HAL Clarke Enterprises Tamil nadu 6543980987
RBT Susan Calvin corp. Tamil nadu 9756437206
TNBC Skellington supplies Tamil nadu 9875438790

ii) Obtain the names of all providers who supply piece 1.


iii)Obtain the name of piece and price from all provides where piece equals to 2.
iv)display the details of pieces whose price is in the range of 10 to 50(both values included).
v)display name and price of the piece in descending order.
vi)Select the name of pieces provided by provider with code "HAL".
ADITHYA COLLEGE OF ARTS AND SCIENCE
MODEL EXAMINATIONS MARCH- 2025
DEPARTMENT OF COMMERCE WITH CA/ DATABASE MANAGEMENT SYSTEM PRACTICAL
Semester : II Duration : 2 hours
Class : I- B.COM(CA) Max Marks :75

4. a)CREATE the table MANUFACTURERS with the following fields.

Field data width Constraint Description


Name type
Code Integer - Primary key Manufacturers
code
Name character 20 Not null Name of
Manufacturers

b) Create the Products table with the following fields.

Field Name data type Constraint Description


Primary
Code Integer Product code
key
Name of the
Name character Not null
products
Price Real Not null Product price
Foreign Manufacturer
Manufacturer Integer
key code

c)Insert the following record into the tables

d)Perform the following queries


i)Select the name and price in cents (i.e., the price must be multiplied by 100).
ii)Select the name and price of all products with a price larger than or equal to $180, and sort first by price (in
descending order), and then by name (in ascending order).
iii)Select all the data from the products, including all the data for each product's manufacturer.
iv)Select the average price of each manufacturer's products, showing the manufacturer's name.
v)Select the names of manufacturer whose products have an average price larger than or equal to $150.
vi)Select the name and price of the cheapest product.
ADITHYA COLLEGE OF ARTS AND SCIENCE
MODEL EXAMINATIONS MARCH- 2025
DEPARTMENT OF COMMERCE WITH CA/ DATABASE MANAGEMENT SYSTEM PRACTICAL
Semester : II Duration : 2 hours
Class : I- B.COM(CA) Max Marks :75

5. a)Create the department table as follows

b) Create Employee tables as follows


Field Name Data type Width Constraint Description
SSN Integer 25 Primary key Employee Number
Name Text 20 Employee Name
Last Name Text 20 Emp Lastname
Department Integer 25 Foreign key Dept Code

c) Insert data to the tables as follows:

d)Perform the following queries:


i)Add ‘course name’ column to the department’s table and course name must be ‘bca’ (if not given).
ii)Add salary column to employees table and the salary between 10000 and 25000. c.Additionally,
add phone no column to employee table and make sure the number should be unique.
iii)Select all the data of employees that work in department 14.
iv)Select all the data of employees whose last name begins with an "S". F.Select
the sum of all the departments' budgets.
ADITHYA COLLEGE OF ARTS AND SCIENCE
MODEL EXAMINATIONS MARCH- 2025
DEPARTMENT OF COMMERCE WITH CA/ DATABASE MANAGEMENT SYSTEM PRACTICAL
Semester : II Duration : 2 hours
Class : I- B.COM(CA) Max Marks :75

6. a)CREATE the table MOVIES with the following fields.


Field Name Data Type Width Constraint
Code Integer 10 Primary key
Title Varchar 30 Not null
Rating Varchar 30

b)CREATE the table MOVIETHEATERS with the following fields.


Field Name Data Type Width Constraint
Code Integer 10 Not Null, Foreign key
Name Varchar 30 Not Null
Movie Integer 20

c)Insert the following values to the created tables.

Movies Table.

Movie theaters Table

d)Perform the following queries:


i)Add a new field location to the table Movies theaters.
ii)Modify the movie theaters table to set the location column to ‘CBE’ if not given.
iii)Insert a new record to table movies.
iv)Remove a record from movies table where rating is A and code is 10
v)Set the rating of all unrated movies to "G".

Remove movie theaters projecting movies rated "NC-17".

You might also like