Online Toy Store Management System: TCS Internal
Online Toy Store Management System: TCS Internal
Refer the given Table structure and Data to Solve the problems.
TOY_STORE
Column Name Data Type Constraints
TOY_STORE_ID NUMBER(3) PRIMARY KEY
TOY_STORE_NAME VARCHAR2(30) NOT NULL
CITY VARCHAR2(30) Delhi, if not provided
PHONENUMBER NUMBER(10) UNIQUE AND NOT NULL
STORE_OPENING_TIME TIMESTAMP After 8 AM
STORE_CLOSING_TIME TIMESTAMP Before 10 PM
TOY_DTLS
Column Name Data Type Constraints
TOY_ID NUMBER(4) PRIMARY KEY
TOY_NAME VARCHAR2(30) NOT NULL, UNIQUE
TOY_PRICE NUMBER(7,2) > 10 , Mandatory
DISCOUNT_PERCENT NUMBER(5,2) < 90
AGEGROUP NUMBER(3) By default 5
TOY_RATING NUMBER(1) BETWEEN 1 TO 5
CATEGORY CHAR(1) Allowed I / O / B for Indoor/Outdoor and Both
TOY_PIC BLOB(16M)
TOY_REL
Column Name Data Type Constraints
TOY_ID NUMBER(4) PRIMARY KEY.FOREIGN KEY(Toy_Dtls)
TOY_STORE_ID NUMBER(3) PRIMARY KEY,FOREIGN KEY(Toy_Store)
IN_STOCK CHAR(1) By default N, allowed Y/N
AVAILABLE_QTY NUMBER(3) Default 0
TCS Internal
Following sample data should be present in your tables. You may insert more data also.
Insert data in TOY_REL as per your choice, minimum 15 rows should be present.
TCS Internal
Write SQL queries for following cases.
Display all numeric values to a precision of 2 decimal digits.
All comparisons should be case insensitive.
TCS Internal