PHP | Assignment 1 CS3402 Database Systems

Assignment 1 CS3402 Database Systems

Assignment

This is an individual assignment.

I will access https://cs3402.cs.cityu.edu.hk/~e-id/assignment/ to mark your assignment. Make sure you put all the program files in the required directory.

Make sure all the seats of all the houses are available before the submission deadline.

Hard Copy Assignment Submission

You must submit one hard copy report of the following items

ER model diagram of the database system

Relational model of the database system

No need to submit any hard copy of program code!!

A submission box will be arranged outside the CS General Office.

Grading Policy

20% on the ER model and 20% on the relational model

60% on the system implementation based on the ER and relational models

All required inputs

Required outputs

Correctness

Efficiency (if the response time is too long compared to other students)

Late submission

Time (after the deadline)

Total mark deduction

within 24 hours

20%

within 48 hours

40%

within 72 hours

60%

within 96 hours

80%

more than 96 hours

100%

Application Scenario (1/2)

In this assignment, you are required to build a simplified online ticket ordering system for a cinema.

The cinema has 5 houses (i.e., A, B, C, D, and E houses). Each house has 50 seats (i.e., 5 rows * 10 columns).

Application Scenario (2/2)

For each house, tickets are allocated to client users from A0 to E9.

For ordering tickets, a client user selects a house, enter the number of tickets (from 1 to 10), name and email address. No need to enter date and time. The order is successful if the required number of tickets on the SAME row can be allocated to the client user. Otherwise, the order fails. For both cases, you should display the seating plan in which green seats are available and red seats are occupied.

For a successful order, update the database to mark the required seat(s) as occupied and store the user name and email.

Example 1

Input: Order 2 tickets in House A

Result: The order is successful. The tickets are A0 and A1.

House A

A

A0

A1

A2

A3

A4

A5

A6

A7

A8

A9

B

B0

B1

B2

B3

B4

B5

B6

B7

B8

B9

C

C0

C1

C2

C3

C4

C5

C6

C7

C8

C9

D

D0

D1

D2

D3

D4

D5

D6

D7

D8

D9

E

E0

E1

E2

E3

E4

E5

E6

E7

E8

E9

0

1

2

3

4

5

6

7

8

9

Example 2

Input: Order 10 tickets in House A

Result: The order is successful. The tickets are B0 to B9.

House A

A

A0

A1

A2

A3

A4

A5

A6

A7

A8

A9

B

B0

B1

B2

B3

B4

B5

B6

B7

B8

B9

C

C0

C1

C2

C3

C4

C5

C6

C7

C8

C9

D

D0

D1

D2

D3

D4

D5

D6

D7

D8

D9

E

E0

E1

E2

E3

E4

E5

E6

E7

E8

E9

0

1

2

3

4

5

6

7

8

9

Example 3

Input: Order 3 tickets in House A
Result: The order is NOT successful.

House A

A

A0

A1

A2

A3

A4

A5

A6

A7

A8

A9

B

B0

B1

B2

B3

B4

B5

B6

B7

B8

B9

C

C0

C1

C2

C3

C4

C5

C6

C7

C8

C9

D

D0

D1

D2

D3

D4

D5

D6

D7

D8

D9

E

E0

E1

E2

E3

E4

E5

E6

E7

E8

E9

0

1

2

3

4

5

6

7

8

9

Implementation Environment

You must implement the system using PHP. I will provide some program codes for you.

The information for connecting the Oracle server:

HOST: ora11g.cs.cityu.edu.hk
PORT: 1522
SERVICE_NAME: orcl.cs.cityu.edu.hk

Web server:

Put your PHP programs in your h:www (when you login lab computers), then you can access the web page through https://cs3402.cs.cityu.edu.hk/~e-id/assignment/
You need to access the web server within the CityU campus or through CityU VPN

FAQ

If you want to protect your assignment from other students, you can set up a login page and write down the login information on the report. This is an optional function and no bonus mark will be given. Make sure that the login information is correct; otherwise, you will get zero for the system implementation part.

You should save the user name, email and ordered tickets for a successful order in the database.

You should assume each user email is unique per successful order in the database.

2019-04-09

Java

physics

LINUX

C++

Python

Processing

sas

ios

maths

maple

C语言

Internet and World Wide Web

Principles of Programming Languages

sql

scheme

prolog

JavaScript

Haskell

essay

Finance

Accounting

Rust

Economics

算法分析(Algorithm analysis)

MATLAB

Ethics

Chemistry

LaTeX

OCaml

SPSS

Project

ASP

Stata

FORTRAN

Information system

SDLC

Basic

Digital Media

Biological

Android

ruby

HTML/CSS

Scala

PHP语言

C#

R语言

发表回复

了解 KJESSAY历史案例 的更多信息

立即订阅以继续阅读并访问完整档案。

继续阅读