Online Toy Store Management System - Sql (with Answers)

Online Toy Store Management System


CREATE TABLE TOY_STORE_PRASANTH
(TOY_STORE_ID NUMBER(3) PRIMARY KEY,
TOY_STORE_NAME VARCHAR2(30) NOT NULL,
CITY VARCHAR2(30) DEFAULT 'Delhi',
PHONENUMBER NUMBER(10) NOT NULL UNIQUE,
STORE_OPENING_TIME TIMESTAMP CHECK(STORE_OPENING_TIME < '8:00:00') ,
STORE_CLOSING_TIME TIMESTAMP CHECK(STORE_CLOSING_TIME > '10:00:00'))



Table Created.


Constraints used:


PRIMARY KEY:
     The PRIMARY KEY constraint uniquely identifies each record in a database table. Primary keys must contain UNIQUE values. A primary key column cannot contain NULL values. Most tables should have a primary key, and each table can have only ONE primary key. A table can have only one primary key, which may consist of single or multiple fields. When multiple fields are used as a primary key, they are called a composite key.

NOT NULL:

     We select only the records with no NULL values. Always use IS NULL to look for NULL values.

DEFAULT Constraint:
     The DEFAULT constraint is used to insert a default value into a column.The default value will be added to all new records, if no other value is specified.

UNIQUE:

     The UNIQUE constraint uniquely identifies each record in a database table.The UNIQUE and PRIMARY KEY constraints both provide a guarantee for uniqueness for a column or set of columns. A PRIMARY KEY constraint automatically has a UNIQUE constraint defined on it. 
Note that you can have many UNIQUE constraints per table, but only one PRIMARY KEY constraint per table.

TIMESTAMP:


     TIMESTAMP - format: YYYY-MM-DD HH:MI:SS
     
     

No comments:

Topics Covered

Purchasing Concurrent program INVENTORY MODULE Inventory Concepts Min-Max Puchasing Sales Order Supply Chain Management Xml Publisher dff Alert Creation Assembly Pull Assigning Approval Groups Assigning Item BOM Tables Backend Tables Base Tables Bills of Material Tables CATALOG TABLES CATEGORY TABLES Closed not Summarized Concurrent Programs Concurrent Request Consigned and VM Inventory Count (*) Customer Items Customer Items Architecture DDL DML Defining Line Type Defining Subinventories Drop Ship EBS EVEN NUMBERED Error: - APP-PER-50022 FND Tables FRM-40735 Fetch Item Information Flexfields Functional GENERIC DISPOSITIONS Hosting ITEM LOCATIONS TABLE Idle Session Timeout Important questions Introduction to Database Invalid Identifier Error Inventory Inventory Implementation Inventory Item master Inventory Transaction Item Attributes Item Cross Reference Item Defining Attributes Item Deletion Item Master Item Relationships Item Status Attributes Item Tables Java Setup for R12 Key Tables Location Creation Lot and Serial Manufacturer Items Move order Normalization ODD NUMBERED ORA-29273 ORDER MANAGEMENT Oracle Apps Oracle Instance Oracle Order Management PURCHASING MODULE Payable Table Payment Terms Procure to Pay Cycle Profile Categories Purchase - PO Revisions Purchase - Purchase Document Types Purchase Order Purchasing - Define Buyers Purchasing - Defining Approval Groups Purchasing - Invoice matching Purchasing Options Quotations Quote Analysis RFQ RICE Components Receipt Routings Receivables (AR) Tables Receiving Options Registration of a Report Requisition Templates Responsibility Query SALES ORDER TABLE SALES PERSON CREATION SCM Service Contract Sql Self Joins Subinventory Subinventory Transfer Supplier Lists Suppliers TEMP Tablespace Toad Value Sets Wildcard Workflow copy column find an PO details implementation inbound order to cash org_id out bound out of the box implementation vanilla implementation