0

Hello, I'm doing a sql database as a school project, the database will be a book catalogue of sorts. What I would like to do is store a biography for the authors and a summary for each book only I'm not sure what the best way to go about storing these in my database are. The databases in school we've done have been limited to 'varchar' and 'int' fields for the most part which I believe will be insufficient to store a block of text.

Thanks.

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by dyingatmidnight
0

Use the "text" data type to store long texts.
If you are stuck with the varchar type you can either store longer texts in external files and store the file names in the database, or you can set up a system of linked varchar entries which you concatenate to get a whole text entry. But both solutions are, from a database point of view, unnecessary and inefficient.

0

No, I'm not stuck using varchar, I just wasn't sure what I should use instead having never needed to store more than a variable name and value. So by using the text data type I should be able to store a blurb about the book, etc. Excellent. Thanks

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.