Computer Science, asked by dhairya112639, 2 months ago

Varsha has created a table named 'Book' for an online library database. She has created fields as Book ID, Name of the Book, Date of Publication and Number of Books Available. Suggest her the correct data types to be used for these fields.

pls answer​

Answers

Answered by Equestriadash
9

Suggested datatypes, character limits and constraints for the fields:

  • BookID - int, Primary Key
  • NameOfTheBook - vαrchαr(30)
  • DateOfPublication - date
  • NumberOfBooksAvailable - int

1. int()

  • This data type includes characters that are integers.

2. vαrchαr()

  • This data type enables the user to input a string of varying character lengths, with limits being held according to the number in the brackets.

3. date

  • This data type enables the user to input a date in the YYYY - MM - DD format.

4. Primary Key

  • This constraint ensures that all the values added into a column with this constraint are all unique and not duplicate.

Anonymous: Magnificent as always !
Equestriadash: Thank you! ^_^"
Similar questions