0% found this document useful (0 votes)
41 views4 pages

Complimentary Material For The Book "Foundations of Software Engineering"

The document defines the database tables needed for a smart city application. Tables are created for maps, parks, user accounts, hotels, colleges, museums, libraries, industries, restaurants, malls, and zoos. Each table specifies the attributes or fields for each type of data. A sequence is also created to generate primary keys for new records added to the tables.

Uploaded by

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

Complimentary Material For The Book "Foundations of Software Engineering"

The document defines the database tables needed for a smart city application. Tables are created for maps, parks, user accounts, hotels, colleges, museums, libraries, industries, restaurants, malls, and zoos. Each table specifies the attributes or fields for each type of data. A sequence is also created to generate primary keys for new records added to the tables.

Uploaded by

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

Complimentary material for the book “Foundations of Software Engineering”

(ISBN: 978-1-4987-3759-3) published by CRC Press, USA

Ashfaque Ahmed, SCM Consulting, India


Bhanu Prasad, Department of Computer and Information Sciences, Florida A&M
University, Tallahassee, Florida 32307, USA

Copyright material Distributed under Creative Commons CC-BY 2.0 license. You can use the material for education
purpose freely if attribution of source of the material is provided. For commercial inquiries please contact Ashfaque
Ahmed at [email protected]. Do not duplicate and do not give it to any other person or entity.
Smart city database definition

--<ScriptOptions statementTerminator=";"/>

CREATE TABLE CITY_MAP (


NO NUMBER(22 , 0),
FILE_PATH VARCHAR2(100)
);

CREATE TABLE PARK (


NO NUMBER(22 , 0),
NAME VARCHAR2(40),
ADDRESS VARCHAR2(100),
EMAIL VARCHAR2(40),
PHONE NUMBER(22 , 0)
);

CREATE TABLE USER_ACC (


NO NUMBER(22 , 0),
NAME VARCHAR2(40),
USERNAME VARCHAR2(40),
ADDRESS VARCHAR2(100),
PASSWORD VARCHAR2(40),
REPASSWORD VARCHAR2(40),
EMAIL VARCHAR2(40),
PHONE NUMBER(22 , 0),
USERTYPE VARCHAR2(1)
);

CREATE TABLE HOTEL (


NO NUMBER(22 , 0),
NAME VARCHAR2(40),
ADDRESS VARCHAR2(100),
EMAIL VARCHAR2(40),
PHONE NUMBER(22 , 0)
);

CREATE TABLE COLLEGE (


NO NUMBER(22 , 0),
NAME VARCHAR2(40),
ADDRESS VARCHAR2(100),
EMAIL VARCHAR2(40),
Copyright material Distributed under Creative Commons CC-BY 2.0 license. You can use the material for education
purpose freely if attribution of source of the material is provided. For commercial inquiries please contact Ashfaque
Ahmed at [email protected]. Do not duplicate and do not give it to any other person or entity.
DEPARTMENT VARCHAR2(100)
);

CREATE TABLE MUSEUM (


NO NUMBER(22 , 0),
NAME VARCHAR2(40),
ADDRESS VARCHAR2(100),
EMAIL VARCHAR2(40),
PHONE NUMBER(22 , 0)
);

CREATE TABLE LIBRARY (


NO NUMBER(22 , 0),
NAME VARCHAR2(40),
ADDRESS VARCHAR2(100),
EMAIL VARCHAR2(40),
PHONE NUMBER(22 , 0)
);

CREATE TABLE INDUSTRY (


NO NUMBER(22 , 0),
NAME VARCHAR2(40),
ADDRESS VARCHAR2(100),
EMAIL VARCHAR2(40),
INDUSTRYTYPE VARCHAR2(40)
);

CREATE TABLE RESTAURANT (


NO NUMBER(22 , 0),
NAME VARCHAR2(40),
ADDRESS VARCHAR2(100),
EMAIL VARCHAR2(40),
PHONE NUMBER(22 , 0)
);

CREATE TABLE MALL (


NO NUMBER(22 , 0),
NAME VARCHAR2(40),
ADDRESS VARCHAR2(100),
EMAIL VARCHAR2(40),
PHONE NUMBER(22 , 0)
);

CREATE TABLE ZOO (


NO NUMBER(22 , 0),
NAME VARCHAR2(40),

Copyright material Distributed under Creative Commons CC-BY 2.0 license. You can use the material for education
purpose freely if attribution of source of the material is provided. For commercial inquiries please contact Ashfaque
Ahmed at [email protected]. Do not duplicate and do not give it to any other person or entity.
ADDRESS VARCHAR2(100),
EMAIL VARCHAR2(40),
PHONE NUMBER(22 , 0)
);

CREATE SEQUENCE CITY_SEQ MINVALUE 1 MAXVALUE 999999999999


INCREMENT BY 1 START WITH 1 NOCACHE NOORDER NOCYCLE;

Copyright material Distributed under Creative Commons CC-BY 2.0 license. You can use the material for education
purpose freely if attribution of source of the material is provided. For commercial inquiries please contact Ashfaque
Ahmed at [email protected]. Do not duplicate and do not give it to any other person or entity.

You might also like