..
> You don't. You create a second table to hold the list. > Then in the second table you include be reference back to the first. > I thought about that but thought it seemed a roundabout way. But assuming I do it that way, how to deal with variable-length list? Most lists have 10^3, but some can grow to perhaps 10^7 items. A fixed record structure to fit the longest possible record would make the database table sparse and, presumably, waste space. An alternative I thought of was to use SQL Server fields for XML, or varchar variable-length character strings containing 10^9 characters, then to read the list I'd parse the XML or split the string into literal integers then convert to int. I wanted to avoid this computation cost if possible. Trung ======== > >> For my application, records in one database table might have 1 list, those >> in another have, say, 4. Each list has a variable number of integers, no >> list contains embedded lists. >> >> The purpose of asking this question is to know which database to learn. >> >> Before asking this question, I looked at Alan Gauld's SQLite >> tutorial<http://www.alan-g.me.**uk/tutor/tutdbms.htm<http://www.alan-g.me.uk/tutor/tutdbms.htm>>and >> the list >> of data types in W3school's SQL >> tute<http://www.w3schools.com/**sql/sql_datatypes.asp<http://www.w3schools.com/sql/sql_datatypes.asp> >> >, >> plus a few Google searches. >> >> Trung Doan >> >> >> >> ______________________________**_________________ >> Tutor maillist - [email protected] >> To unsubscribe or change subscription options: >> http://mail.python.org/**mailman/listinfo/tutor<http://mail.python.org/mailman/listinfo/tutor> >> >> > > -- > Alan G > Author of the Learn to Program web site > http://www.alan-g.me.uk/ > > > ______________________________**_________________ > Tutor maillist - [email protected] > To unsubscribe or change subscription options: > http://mail.python.org/**mailman/listinfo/tutor<http://mail.python.org/mailman/listinfo/tutor> >
_______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
