Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8197469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:44:52+00:00 2026-06-07T05:44:52+00:00

Right now I have 3 tables: CREATE TABLE `tbl_payment_info` ( `payment_info_id` int(11) NOT NULL,

  • 0

Right now I have 3 tables:

CREATE TABLE `tbl_payment_info` (
  `payment_info_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `payment_type` tinyint(2) NOT NULL, (for users to choose paypal or credit card)
  `num_credits` int(11) NOT NULL,
  `price_per_credits` float NOT NULL,
`payment_time_stamp` datetime NOT NULL,
  PRIMARY KEY (`payment_info_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

CREATE TABLE `tbl_paypal_info` (
  `paypal_info_id` int(11) NOT NULL AUTO_INCREMENT,
  `paypal_email` varchar(100) DEFAULT NULL,
  `payment_info_id` int(11) NOT NULL,
  PRIMARY KEY (`paypal_info_id`),
  KEY `tbl_paypal_info_ibfk_1` (`payment_info_id`),
  CONSTRAINT `tbl_paypal_info_ibfk_1` FOREIGN KEY (`payment_info_id`) REFERENCES `tbl_payment_info` (`payment_info_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

CREATE TABLE `tbl_credit_card_info` (
  `credit_card_info_id` int(11) NOT NULL,
  `payment_info_id` int(11) NOT NULL,
  `card_fullname` varchar(128) NOT NULL,
  `credit_number` varchar(20) NOT NULL,
  `credit_card_type` tinyint(2) NOT NULL,
  `billing_address_Line_1` varchar(100) NOT NULL,
  `billing_address_line_2` varchar(100) DEFAULT NULL,
  `billing_city` varchar(50) NOT NULL,
  `billing_country` varchar(50) NOT NULL,
  `billing_phone` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`credit_card_info_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

am I missing anything? is there any better ways to write it more efficiently? Any advice will be helpful. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:44:52+00:00Added an answer on June 7, 2026 at 5:44 am

    No idea if these might be all the fields missing, but the ones that stick out on the credit card table are:

    • billing_state
    • billing_zip
    • credit_exp_date

    On the PayPal table, you might also want to save the transactionId. I don’t know if this is the intent of the payment_info column you have in that table, but if it is, you might want to change the field type from int to varchar, as paypal returns a mixture of letters and numbers in their transaction id’s

    And one comment, credit card numbers are at most 16 digits long. You have a 20 char field for it.

    My final comment on efficiency, is that I wouldn’t waste space using UTF-8 on the first table. It doesn’t really look as if it will be storing international characters.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have this table CREATE TABLE meta ( id BIGINT(20) NOT NULL, type
Right now I have 3 tables, the first one for users, the second for
Right now I have 3 tables: User, Roles, and User_Roles for the many-to-many association.
I am writing a MVC3 project. Right now I have a table which has
I am writing a MVC3 project. Right now I have a table which has
I have some code that shows results in a table Right now it will
Here is the script to create my tables: CREATE TABLE clients ( client_i INT(11),
I have three tables like this: Table 1 structure: Name: registered_applicant_details Fields: applicant_id INT
Good day! I right now have a function the drags an element from a
Right now I have an upload field while uploads files to the server. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.