0

Here, Is my requirement :

  • Admin panel
  • Create database from web application in database
  • After creating database can create number of tables with fields.
  • Listing of created database and it's tables.
  • Can modify the fields with type and size.

My requirement is I have to creating table not using mysql database but using own custom UI

All the thing I have to do with admin panel.

Please can you give me some idea.How can I do that,

Thanks for your support.

3
  • Is this some homework? Commented Sep 19, 2017 at 6:28
  • @S.I., Why you think that its an home work ? read it carefully Commented Sep 19, 2017 at 6:29
  • Sorry but seems like one. Commented Sep 19, 2017 at 6:32

1 Answer 1

2

You can have your custom UI to read all the information you need from the user. Then use the MySQL statement DDL to apply these information and create them into the database. You have all what you need, as following:

Create database from web application in database

You can use the CREATE DATABASE command to create the database in the mysql connection that you have.

After creating database can create number of tables with fields.

Then the user selects the predefined databases, then after the user inputs the table name, columns' names and data types. You can use the CREATE TABLE command to create the table with the information you get from the user.

Listing of created database and it's tables.

Use SHOW Databases to list the created databases. Also SHOW TABLES to list the tables.

To get the list of tables under a specific database, you can use

infomration_schema like this:

SELECT TABLE_NAME
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = 'database name';

Can modify the fields with type and size.

You can use ALTER TABLE to modify the types and sizes.

Sign up to request clarification or add additional context in comments.

1 Comment

The OP stated that he want to do this using his custom UI, then what is wrong with my answer?!!!!!!!!!! how can you achieve that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.