Hi,
I wanted to know if we can execute DDL commands at runtime. For eg I want to maintain the record of the tickets booked by a particular customer. I am not getting what should be the structure of tables to be created. If the customer ID is the primary key and we need to store the details of the tickets booked by that ID, how should I so that??
FOR EG :
CUST_ID , CUST_NAME , CUST_ADD
If the Customer books a ticket, it should be added somewhere in the database i.e the Ticket Numbers for each transaction should be saved somewhere. Now the question is, where should we save the tickets. If we create some table with the CUST_ID as the Primary key referring the Customer table, then what should be the structure of the table.i don't think that we can create columns at runtime.
If I have put in this way:-
CUST_ID , TICKET_1, TICKET_2, TICKET_3,TICKET_4
it can save only 4 tickets, and as the tickets will tend to increase in number, it would not be appropriate.
Is it the case that all tables are previously created for all users with something like the table name as the CUST_ID where the data is inserted as and when the customer books a ticket.
I am new in this area, so please provide me some help. Thanks in advance.
Regards
Jashobanta Chakraborty