Was: [WebDNA] Wishlist: ignore whitespace in database changes - Now: WebDNA Data Model

This WebDNA talk-list message is from

2016


It keeps the original formatting.
numero = 112949
interpreted = N
texte = 536 On 2016-09-01 02:05, christophe.billiottet@webdna.us wrote: > Hi Brian! I take back your example about the date in a database: > leMODDATEdata=3D12/31/2015 > > You explain that someone who would write "yesterday" would jeopardize > the database integrity. We are in the case where a date can be freely > written. So, imagine we get a date in European format, 31/12/2015, > which is also the format adopted by 90% of the countries in the world > (the format MDY is only US-based) Date's in WebDNA can't be freely written if they are to be usable=20 dates. WebDNA does indeed recognize international date formats. , or number written alternatively as > 9,210.00 (US) o 9.210,00 (European). I seem to remember somewhere a thousands delimiter option setting in=20 WebDNA... though it's been years. Let=E2=80=99s talk about zip code, US > based is a number with a "-" that would prevent this field to be > treated as a number, english one could be C178AN, or the phone=20 > numbers > with international +39 or +1, or inventories with text and numbers? These examples are strings, not numbers. > Also, what about the "grouping fields", if you mix numbers with text? > I also saw programs using dates in the format 12/31/16 (1916 or > 2016?). Dates and Times that are to be usable should always be written to the=20 database in valid date/time formats.. readable dates can be written to=20 the database of course, but they are strings at that point and only used=20 for display purposes. > We would have to think a way to specify each format in the database > header, which would further restrict the use of the database by > implying a *lot* of specific cases, while a simple test in the code > could easily make all data searchable and make usable an=20 > heterogeneous > database, a privilege that no other database system offers. > > I think it is little effort to add DeadlineType=3Ddate and that > introducing restrictions in database format would just be introducing > limits to creativity and flexibility. > > > - chris I agree with you here, but will always continue to stress that WebDNA=20 seriously needs upkeep on the SQL integration.. MySQL especially.=20 Without it, WebDNA becomes a toy. > > > >> That being said, I completely disagree when it comes to storing and=20 >> retrieving information in a data structure. If i have a field in a=20 >> data structure (read: SQL data table or WebDNA database) that is for=20 >> storing dates, then allowing someone to store "yesterday" is=20 >> nonsensical and causes problems when I try to retrieve dates based on=20 >> a calculation. (i.e. leMODDATEdata=3D12/31/2015) Of course I should=20 >> write code that stops this data from being stored in the first place,=20 >> but as a last resort the database program itself should defend the=20 >> database to protect the integrity of the data stored in it. The side=20 >> effect, which almost outweighs the protection factor to be candid, is=20 >> that when retrieving info, if each field has a predefined data type,=20 >> the database already knows how to deal with searches so the programmer= =20 >> doesn't have to reiterate for each search that this field is a date,=20 >> or a number, or whatever. > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us . Associated Messages, from the most recent to the oldest:

    
  1. Was: [WebDNA] Wishlist: ignore whitespace in database changes - Now: WebDNA Data Model (dbrooke@euca.us 2016)
  2. Was: [WebDNA] Wishlist: ignore whitespace in database changes - Now: WebDNA Data Model (dbrooke@euca.us 2016)
536 On 2016-09-01 02:05, christophe.billiottet@webdna.us wrote: > Hi Brian! I take back your example about the date in a database: > leMODDATEdata=3D12/31/2015 > > You explain that someone who would write "yesterday" would jeopardize > the database integrity. We are in the case where a date can be freely > written. So, imagine we get a date in European format, 31/12/2015, > which is also the format adopted by 90% of the countries in the world > (the format MDY is only US-based) Date's in WebDNA can't be freely written if they are to be usable=20 dates. WebDNA does indeed recognize international date formats. , or number written alternatively as > 9,210.00 (US) o 9.210,00 (European). I seem to remember somewhere a thousands delimiter option setting in=20 WebDNA... though it's been years. Let=E2=80=99s talk about zip code, US > based is a number with a "-" that would prevent this field to be > treated as a number, english one could be C178AN, or the phone=20 > numbers > with international +39 or +1, or inventories with text and numbers? These examples are strings, not numbers. > Also, what about the "grouping fields", if you mix numbers with text? > I also saw programs using dates in the format 12/31/16 (1916 or > 2016?). Dates and Times that are to be usable should always be written to the=20 database in valid date/time formats.. readable dates can be written to=20 the database of course, but they are strings at that point and only used=20 for display purposes. > We would have to think a way to specify each format in the database > header, which would further restrict the use of the database by > implying a *lot* of specific cases, while a simple test in the code > could easily make all data searchable and make usable an=20 > heterogeneous > database, a privilege that no other database system offers. > > I think it is little effort to add DeadlineType=3Ddate and that > introducing restrictions in Database format would just be introducing > limits to creativity and flexibility. > > > - chris I agree with you here, but will always continue to stress that WebDNA=20 seriously needs upkeep on the SQL integration.. MySQL especially.=20 Without it, WebDNA becomes a toy. > > > >> That being said, I completely disagree when it comes to storing and=20 >> retrieving information in a data structure. If i have a field in a=20 >> data structure (read: SQL data table or WebDNA database) that is for=20 >> storing dates, then allowing someone to store "yesterday" is=20 >> nonsensical and causes problems when I try to retrieve dates based on=20 >> a calculation. (i.e. leMODDATEdata=3D12/31/2015) Of course I should=20 >> write code that stops this data from being stored in the first place,=20 >> but as a last resort the database program itself should defend the=20 >> database to protect the integrity of the data stored in it. The side=20 >> effect, which almost outweighs the protection factor to be candid, is=20 >> that when retrieving info, if each field has a predefined data type,=20 >> the database already knows how to deal with searches so the programmer= =20 >> doesn't have to reiterate for each search that this field is a date,=20 >> or a number, or whatever. > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us . dbrooke@euca.us

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Emailer help....! (1997) suffix mapping for NT? (1997) Calculating multiple shipping... (1997) SiteCheck & WebCat ? (1997) WC Bulletin Board Issue (2003) Emailer setup (1997) RH 8.0 (2002) ShowNext for method=POST (1997) FlushDatabase Suggestion (1998) Strange error (2000) Serving images from databases (1998) PIXO support (1997) 2.0 Info (1997) Grep search not working (2002) Setting up the server (1997) Using Plug-In while running 1.6.1 (1997) WebCatalog2 Feature Feedback (1996) Trouble Searching (1999) Thanks for tips, more quest (1997) shipcost (1997)