# data[].attributes.body
I went ahead and connected the posts to each other based off of the ER diagram and labeled them. I don't see much else that can be done with this. I think it is all pretty much covered other than providing additional rules if any of you can think of them or maybe more tables.
Joe G

# data[].attributes.body
5.Cancel: In this procedure, ticket ID is read from the passenger and corresponding record is

searched in the Passenger table. If the record exists, it is deleted from the table. After

deleting the record (if it is confirmed), first record with waiting status for the same train and same category are searched from the Passenger table and its status is changed to confirm.

# data[].attributes.body
4. Booking: In this procedure, the train number, train date, and category is read from the

passenger. On the basis of the values provided by the passenger, corresponding record

is retrieved from the Train_Status table. If the desired category is AC, then total number

of AC seats and number of booked AC seats are compared in order to find whether

ticket can be booked or not. Similarly, it can be checked for the general category. If

ticket can be booked, then passenger details are read and stored in the Passenger table.

# data[].attributes.body
3. Passenger: This table consists of details about the booked tickets. The information

stored in this table includes ticket ID, train number, date for which ticket is booked,

name, age, sex and address of the passenger, status of reservation (either confirmed or

waiting), and category for which ticket is booked.

Constraint: Ticket ID is unique and the train number should exist in TrainList table.

In this table should we change some of the naming conventions? Ex: PassengerName, PassengerAge, PassengerSex, etc... Or would it be fine as is?
- Heather

Good idea Heather. I was basing most of this from the ER diagram attached to the assignment. I will go ahead and make those changes to help avoid anomalies.

Cierra

# data[].attributes.body
2. Train_Status: This table consists of details about the dates on which ticket can be

booked for a train and the status of the availability of tickets. The information stored in

this table includes train number, train date, total number of AC seats, total number of

general seats, number of AC seats booked, and number of general seats booked.

Constraint: Train number should exist in TrainList table.

Does this table need a PK or does the TrainNumber act as a PK and FK? - Heather

From my understanding because of the constraint listed, the TrainNumber must be listed in the Train List table, which leads it to be a FK in the Train Status table as seen on the right.

Cierra

# data[].attributes.body
1. TrainList: This table consists of details about all the available trains. The information

stored in this table includes train number, train name, source, destination, fair for AC

ticket, fair for general ticket, and weekdays on which train is available.

Constraint: The train number is unique.

Should we have any other days? Or is only MonAvailable and SunAvailable correct? It looks like it's asking for weekdays. - Heaather

This was again mimic'ed from the ER Diagram in the assignment. I believe it may have been set up this way due to there maybe only having been data for these 2 days available? I went ahead and added the additional days.
Cierra

# data[].attributes.body
1. The number of trains has been restricted to 5.

2. The booking is open only for next seven days from the current date.

3. Only two categories of tickets can be booked, namely, AC and General.

4. The total number of tickets that can be booked in each category (AC and General) is 10.

5. The total number of tickets that can be given the status of waiting is 2.

6. The in‐between stoppage stations and their bookings are not considered.

# data[].attributes.body
TrainNumber (PK) (FK)
TrainDate
ACSeat
GenSeat
BACSeat
BGENSeat

Cierra

# data[].attributes.body
TrainNumber (PK)
TrainName
Source
Destination
ACFair
GenFair
SunAvailable
MonAvailable
TueAvailable
WedAvailable
ThursAvailable
FriAvailable
SatAvailable

Cierra

# data[].attributes.body
TID (PK)
TrainNumber (FK)
TDateBooked
PasName
PasAddress
PasAge
PasSex
ResStatus
TCategory
______________________

SearchTrain
BookTicket
CancelTicket
PayCharges
ModifyForm

-Clayton

Clayton,
For this you missed Status, Category, and Ticket ID; and I've changed Gender to Sex so it matches the ER Diagram

Cierra

Hey, so everything looks great so far! I need to read more about the procedures part. But so far the only thing I really changed/added was that this table looks like it is supposed to also include TrainNumber as a FK and DateBooked (based on #3 table description in the case study). I also made the names of the tables all caps.
-Holly

Hello all! What a great start you have compiled. I just went ahead and added some pins (and questions from my understanding) regarding the assignment as reference. I may need to do a little more reading to contribute even better.
- Heather