Professional Web Applications Themes

Database and asp question - ASP Database

Hi 1 and all, (Thanks to Bob Burrows directing me to this newsgroup ;-) ) Having played with and now 'reasonably' comfortable with asp and vbscript I am now venturing into the land of recordsets and databases. I need to create a web based solution that displays a list of items. These items are categorised into 4 groups (These groups do not change, the items do). Items are moved between these groups. Items in 2 of these groups need to be 'ranked' from highest importance at the top to the least at the bottom. This page is shared between a ...

  1. #1

    Default Database and asp question

    Hi 1 and all,


    (Thanks to Bob Burrows directing me to this newsgroup ;-) )

    Having played with and now 'reasonably' comfortable with asp and vbscript I
    am now venturing into the land of recordsets and databases.

    I need to create a web based solution that displays a list of items. These
    items are categorised into 4 groups (These groups do not change, the items
    do). Items are moved between these groups. Items in 2 of these groups need
    to be 'ranked' from highest importance at the top to the least at the
    bottom.

    This page is shared between a small office using a mix Mac and PC's. All
    users can view, some can add, one user determines the priority. Hence the
    need for a web based solution. The viewing updating and sorting of items
    does and can happen concurrently.

    I have done this using a text file but I understand using a DB file will be
    more effeicent and robust. Is using a DB the right way to go and how would I
    accomplish it.

    My current solution is;
    Reading the list it in as 4 arrays from a text file, displaying it on a web
    page form. A number can be entered in a text box next to each item. When
    submitted the list is resorted based on the numbers in the text box of each
    item and written back to the text file.


    Many thanx in adavnce

    Cheers, Bill.


    William E Hatto Guest

  2. #2

    Default Re: Database and asp question

    William E Hatto wrote:
    > Thanks Bob,
    >
    > I'll refine the OP a bit more.
    >
    > This list (4 in fact, of which some items are moved between) of items
    > is shared between 6 people using a mix Mac and PC's. All can view,
    > some can add with one user determining the priority. Hence the need
    > for a web basewd solution.
    >
    > Is it better to use a DB or text file?
    >
    A database will handle concurrency (multiple people doing updates to the
    data simultaneously) issues better than using a text file, although with
    only a couple people being able to maintain data, concurrency may not be a
    huge issue. So the deciding factors will be:
    1. Is what you are doing now working? Any problems with concurrency? Are
    users being prevented from making changes to the data due to other users
    making their changes? If not, then, if it ain't broke, don't fix it.

    2. Scalability - the text file method will not scale well, so, if you are
    faced with the prospect of adding more users, or if the amount of data could
    possibly get much greater than what you are now handling, then you do need
    to consider moving to a database.

    Since we are back to needing to persist the rank order so it will apply to
    all users, if you decide use a database, you will need to use the Rank
    column I described in my previous reply. Regarding your objection that all
    the Rank numbers would need to be re-entered if one row's rank changed, this
    is not the case: you do not need to use 1,2,3, ... for the rank numbers. You
    can use 100,200,300, ... . If you need to move the 300 row to before the 200
    row, simply change its rank to 250. If you are changing the rank a lot, use
    1000,2000,3000, ... .

    I see that you've posted to .inetserver.asp.db as well, so I've crossposted
    this reply there as well as setting Follow-ups for this thread to that
    group.

    HTH,
    Bob Barrows

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Bob Barrows Guest

  3. #3

    Default Re: Database and asp question

    Thanks again Bob,

    There has been a couple of instances over the last 6 months where all the
    info in the text file has just disappeared, requiring me to manually rebuild
    it. I have looked at the code and had just put it down to weaknesses in
    using a text file. I am thinking about using a DB because i have heard it is
    more efficient and robust.

    Is that a fair assumption ?

    Cheers Bill.


    "Bob Barrows" <reb01501NOyahoo.SPAMcom> wrote in message
    news:%23cj1EFn4DHA.3896TK2MSFTNGP11.phx.gbl...
    > William E Hatto wrote:
    > > Thanks Bob,
    > >
    > > I'll refine the OP a bit more.
    > >
    > > This list (4 in fact, of which some items are moved between) of items
    > > is shared between 6 people using a mix Mac and PC's. All can view,
    > > some can add with one user determining the priority. Hence the need
    > > for a web basewd solution.
    > >
    > > Is it better to use a DB or text file?
    > >
    >
    > A database will handle concurrency (multiple people doing updates to the
    > data simultaneously) issues better than using a text file, although with
    > only a couple people being able to maintain data, concurrency may not be a
    > huge issue. So the deciding factors will be:
    > 1. Is what you are doing now working? Any problems with concurrency? Are
    > users being prevented from making changes to the data due to other users
    > making their changes? If not, then, if it ain't broke, don't fix it.
    >
    > 2. Scalability - the text file method will not scale well, so, if you are
    > faced with the prospect of adding more users, or if the amount of data
    could
    > possibly get much greater than what you are now handling, then you do need
    > to consider moving to a database.
    >
    > Since we are back to needing to persist the rank order so it will apply to
    > all users, if you decide use a database, you will need to use the Rank
    > column I described in my previous reply. Regarding your objection that all
    > the Rank numbers would need to be re-entered if one row's rank changed,
    this
    > is not the case: you do not need to use 1,2,3, ... for the rank numbers.
    You
    > can use 100,200,300, ... . If you need to move the 300 row to before the
    200
    > row, simply change its rank to 250. If you are changing the rank a lot,
    use
    > 1000,2000,3000, ... .
    >
    > I see that you've posted to .inetserver.asp.db as well, so I've
    crossposted
    > this reply there as well as setting Follow-ups for this thread to that
    > group.
    >
    > HTH,
    > Bob Barrows
    >
    > --
    > Microsoft MVP - ASP/ASP.NET
    > Please reply to the newsgroup. This email account is my spam trap so I
    > don't check it very often. If you must reply off-line, then remove the
    > "NO SPAM"
    >
    >

    William E Hatto Guest

  4. #4

    Default Re: Database and asp question

    Sorry Bob,

    I'll just use this group now :-)



    "Bob Barrows" <reb01501NOyahoo.SPAMcom> wrote in message
    news:%23cj1EFn4DHA.3896TK2MSFTNGP11.phx.gbl...
    > William E Hatto wrote:
    > > Thanks Bob,
    > >
    > > I'll refine the OP a bit more.
    > >
    > > This list (4 in fact, of which some items are moved between) of items
    > > is shared between 6 people using a mix Mac and PC's. All can view,
    > > some can add with one user determining the priority. Hence the need
    > > for a web basewd solution.
    > >
    > > Is it better to use a DB or text file?
    > >
    >
    > A database will handle concurrency (multiple people doing updates to the
    > data simultaneously) issues better than using a text file, although with
    > only a couple people being able to maintain data, concurrency may not be a
    > huge issue. So the deciding factors will be:
    > 1. Is what you are doing now working? Any problems with concurrency? Are
    > users being prevented from making changes to the data due to other users
    > making their changes? If not, then, if it ain't broke, don't fix it.
    >
    > 2. Scalability - the text file method will not scale well, so, if you are
    > faced with the prospect of adding more users, or if the amount of data
    could
    > possibly get much greater than what you are now handling, then you do need
    > to consider moving to a database.
    >
    > Since we are back to needing to persist the rank order so it will apply to
    > all users, if you decide use a database, you will need to use the Rank
    > column I described in my previous reply. Regarding your objection that all
    > the Rank numbers would need to be re-entered if one row's rank changed,
    this
    > is not the case: you do not need to use 1,2,3, ... for the rank numbers.
    You
    > can use 100,200,300, ... . If you need to move the 300 row to before the
    200
    > row, simply change its rank to 250. If you are changing the rank a lot,
    use
    > 1000,2000,3000, ... .
    >
    > I see that you've posted to .inetserver.asp.db as well, so I've
    crossposted
    > this reply there as well as setting Follow-ups for this thread to that
    > group.
    >
    > HTH,
    > Bob Barrows
    >
    > --
    > Microsoft MVP - ASP/ASP.NET
    > Please reply to the newsgroup. This email account is my spam trap so I
    > don't check it very often. If you must reply off-line, then remove the
    > "NO SPAM"
    >
    >

    William E Hatto Guest

  5. #5

    Default Re: Database and asp question

    > using a text file. I am thinking about using a DB because i have heard it
    is
    > more efficient and robust.
    >
    > Is that a fair assumption ?
    IMHO, yes. Though if you choose Access, your gains will be minimal. :-)

    --
    Aaron Bertrand
    SQL Server MVP
    [url]http://www.aspfaq.com/[/url]


    Aaron Bertrand [MVP] Guest

  6. #6

    Default Re: Database and asp question


    "Aaron Bertrand [MVP]" <aaronTRASHaspfaq.com> wrote in message
    news:%23EPl1%23q4DHA.1936TK2MSFTNGP12.phx.gbl...
    > > using a text file. I am thinking about using a DB because i have heard
    it
    > is
    > > more efficient and robust.
    > >
    > > Is that a fair assumption ?
    >
    > IMHO, yes. Though if you choose Access, your gains will be minimal. :-)
    Why?

    For the size of this project Access is all that I have to use.

    Bill
    >
    > --
    > Aaron Bertrand
    > SQL Server MVP
    > [url]http://www.aspfaq.com/[/url]
    >
    >

    William E Hatto Guest

  7. #7

    Default Re: Database and asp question

    > > IMHO, yes. Though if you choose Access, your gains will be minimal.
    :-)
    >
    > Why?
    [url]http://www.aspfaq.com/2195[/url]

    --
    Aaron Bertrand
    SQL Server MVP
    [url]http://www.aspfaq.com/[/url]


    Aaron Bertrand [MVP] Guest

  8. #8

    Default Re: Database and asp question

    William E Hatto wrote:
    > "Aaron Bertrand [MVP]" <aaronTRASHaspfaq.com> wrote in message
    > news:%23EPl1%23q4DHA.1936TK2MSFTNGP12.phx.gbl...
    >>> using a text file. I am thinking about using a DB because i have
    >>> heard it is more efficient and robust.
    >>>
    >>> Is that a fair assumption ?
    >>
    >> IMHO, yes. Though if you choose Access, your gains will be minimal.
    >> :-)
    >
    > Why?
    >
    > For the size of this project Access is all that I have to use.
    >
    While I agree with many of the points in Aaron's article, I am not as
    strongly biased against Access as he is. We have had a small intranet
    application using an Access backend going strong for the past four years.
    What's more, the developer who created that app was new to asp and therefore
    took the shortcut of using GenericDb ([url]www.genericdb.com[/url]) to create it, so
    the coding practices were not the best ("Select *", opening a recordset
    containing all the rows in the table just to get the field names, closing it
    and reopening it to get the data, using recordsets to do data maintenance
    .... I could go on). Even so, the app has worked very well for its small
    number of users (up to 20 - at most about 10 concurrently). I am sure, with
    proper asp/ado coding practices implemented, we could double that user base
    if we had to.

    So, I do disagree with the " ... gains will be minimal" statement. Using any
    rdbms, even Jet (Access) as opposed to a text file, will greatly increase
    the integrity of your data and the scalability of your application.

    That said, my rdbms of choice is SQL Server, which will handle with ease the
    burden that would tax Jet to its straining point.

    HTH,
    Bob Barrows
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Bob Barrows Guest

  9. #9

    Default Re: Database and asp question

    "Aaron Bertrand [MVP]" <aaronTRASHaspfaq.com> wrote in message
    news:#EPl1#q4DHA.1936TK2MSFTNGP12.phx.gbl...
    > > more efficient and robust.
    > >
    > > Is that a fair assumption ?
    >
    > IMHO, yes. Though if you choose Access, your gains will be minimal.
    :-)


    That's a bit of an exaggeration to the negative. SQL is certainly more
    powerful than Access, but but Access is much better than a text file
    and many of its weaknesses can be compensated for by the way it is
    deployed.

    --

    Phillip Windell [CCNA, MVP, MCP]
    WAND-TV (ABC Affiliate)
    [url]www.wandtv.com[/url]


    Phillip Windell Guest

  10. #10

    Default Re: Database and asp question

    "Bob Barrows" <reb01501NOyahoo.SPAMcom> wrote in message
    news:OkZY8W04DHA.1504TK2MSFTNGP12.phx.gbl...
    > So, I do disagree with the " ... gains will be minimal" statement.
    Using any
    > rdbms, even Jet (Access) as opposed to a text file, will greatly
    increase
    > the integrity of your data and the scalability of your application.
    >
    > That said, my rdbms of choice is SQL Server, which will handle with
    ease the
    > burden that would tax Jet to its straining point.
    I think I'd go with Access in this case, unless he already had a copy
    of SQL Server running and was already familiar with managing,
    maintaining, and developing with it.

    --

    Phillip Windell [CCNA, MVP, MCP]
    WAND-TV (ABC Affiliate)
    [url]www.wandtv.com[/url]


    Phillip Windell Guest

  11. #11

    Default Re: Database and asp question

    Many thanks to all,

    I will be back once I do a bit more reading and studying. I'll definately
    have more questions.

    Cheers, Bill.


    "Phillip Windell" <none> wrote in message
    news:eDE9okB5DHA.2412TK2MSFTNGP09.phx.gbl...
    > "Bob Barrows" <reb01501NOyahoo.SPAMcom> wrote in message
    > news:OkZY8W04DHA.1504TK2MSFTNGP12.phx.gbl...
    > > So, I do disagree with the " ... gains will be minimal" statement.
    > Using any
    > > rdbms, even Jet (Access) as opposed to a text file, will greatly
    > increase
    > > the integrity of your data and the scalability of your application.
    > >
    > > That said, my rdbms of choice is SQL Server, which will handle with
    > ease the
    > > burden that would tax Jet to its straining point.
    >
    > I think I'd go with Access in this case, unless he already had a copy
    > of SQL Server running and was already familiar with managing,
    > maintaining, and developing with it.
    >
    > --
    >
    > Phillip Windell [CCNA, MVP, MCP]
    > WAND-TV (ABC Affiliate)
    > [url]www.wandtv.com[/url]
    >
    >

    William E Hatto Guest

  12. #12

    Default Re: Database and asp question

    > > IMHO, yes. Though if you choose Access, your gains will be minimal.
    > :-)
    >
    >
    > That's a bit of an exaggeration to the negative. SQL is certainly more
    > powerful than Access, but but Access is much better than a text file
    I agree, however note that I said "minimal," not "the empty set."


    Aaron Bertrand - MVP Guest

  13. #13

    Default Re: Database and asp question

    Here is something I put together about ASP that hopefully might help
    somehow.

    You and others can have access to a database hosted on the Web from any
    location that has a browser with an Internet connection.

    The Web database concept makes sense if you and your people want to do
    work in various locations in or outside the office and still be
    "plugged" in.

    For example you could have employees enter timesheets or have sales reps
    log their contacts. Or perhaps you'd like customers to be able to check
    the status of their orders online without having to call the company.

    If you want a Web database, typically what would happen is that a
    database such as Access or MySQL (basically just consisting of tables)
    would be put on the Web.

    Then "dynamic" Web pages (actually ASP pages which include VBScript,
    HTML, and/or JavaScript) would be created acting like the old desktop
    database's queries, forms, and reports to access the database - all
    hosted on a Web Server.

    Dynamic Web pages are similar in many ways to regular HTML pages. But
    they are "live" because the user can read from and write to information
    in the database. An example where you can login and add, edit, or view
    fictional customers and invoices is at
    [url]http://www.bullschmidt.com/login.asp[/url]

    Not all Web hosts will handle dynamic Web pages but many do. The Web
    hosts that can handle ASP pages usually have a Windows 2000 operating
    system running an IIS Web server.

    Here are a few good ASP sites:
    o ASP101 Samples - [url]http://www.asp101.com/samples[/url]
    o W3Schools ASP Tutorial - [url]http://www.w3schools.com/asp[/url]
    o Microsoft VBScript Language Reference -
    [url]http://msdn.microsoft.com/scripting/default.htm?/scripting/VBScript/doc/[/url]
    vbscripttoc.htm

    And the following newsgroup is good:
    microsoft.public.inetserver.asp.general

    Or for a "quick and dirty" generic ASP open source solution to putting
    databases on the Web that just requires setting up a configuration page
    for each table or query and uploading the database to the Web as long as
    there is an autonumber field in each table (and you'll probably also
    separately want to create login capabilities), perhaps try something
    like this:
    GenericDB by Eli Robillard
    [url]http://www.genericdb.com[/url] and then click on the Tips link to see an
    example

    And, yes, having a Sort field is often something I do too when something
    more natural like alphabetical doesn't work well with some data.

    Best regards,
    J. Paul Schmidt, Freelance ASP Web Developer
    [url]http://www.Bullschmidt.com[/url]
    ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Bullschmidt Guest

Similar Threads

  1. database design and asp question
    By Michael in forum Dreamweaver AppDev
    Replies: 2
    Last Post: June 27th, 09:23 AM
  2. Database question
    By Hardik Doshi in forum PHP Development
    Replies: 8
    Last Post: March 22nd, 04:37 PM
  3. Slightly OT - Database Question
    By Andy in forum Dreamweaver AppDev
    Replies: 6
    Last Post: February 25th, 02:07 PM
  4. Database Connection Question
    By Christian Cooper in forum ASP Database
    Replies: 4
    Last Post: April 29th, 05:05 PM
  5. Question coding a database app for Mac OSX
    By Kipp Chambers in forum Mac Programming
    Replies: 14
    Last Post: August 21st, 03:45 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139