02. april 2005 - 13:53Der er
48 kommentarer og 1 løsning
Access kapacitet
Hej,
Jeg er ved at opbygge en Access database til brug for et online ASP system, men er kommet i tvivl om hvordan jeg opbygger den smartest.
Der skal være måske 3-400 forretninger i databasen, som hver især måske har 60-70 varer.
Hvordan opbygger jeg dette smartest/lettest når hver forretning skal have en varetekst og pris for hver af de 70 varer og når de forskellige forretninger ikke har samme varer ? Dvs. der kan ialt måske godt være 1000 forskellige varer med forskellige tekster og priser...
Bør jeg lave en tabel for hver forretning (kan man have 400 tabeller i een Access database og er det smart) eller er der en anden måde som er bedre ?
Håber på snarlig hjælp, for jeg er sgu i tvivl om hvordan jeg laver det bedst ?
Der gives 200 point for hjælp til ovenstående, men er der en skarp ASP/Access programmør som har lyst til at tjene 1000 kr. på lidt programmering og optimering, så sig til !
I dette særtema om aspekter af AI ser vi på skiftet fra sprogmodeller til AI-agenter, og hvordan virksomheder kan navigere i spændet mellem teknologisk hastighed og behovet for menneskelig kontrol.
One database with 400 "forretninger" and 1000 "varer" should be NO PROBLEM at all. Access is limited to 2GB for a single database but with these numbers I cant see any problem. I have often had tabases with 500,000 records (500 thousand)
Maximum row size in Access 2000 is 2000 bytes I believe, which mean that it can contain 1000000+ rows. x1000+ should be more that enough for even an optmistic business man. And I would expect to see both more complex ASP code and worse performance with 2 databases. So I would not go that route.
You can have 400 tables in Access (the limit on objects is 32000 I belive). But it would not be a good design. One table with a field specifying which store is likely better.
As you describe the problem I think you need 3 tables: store, product and a storeproduct to map the many-to-many relationship between store and product.
And why am I writing in english ? Terry reads danish fine as dar as I know.
hi Arne, great to see you writing Eglish too, it may encourage others to do the same, then we can make eksperten international :o)
I was also thinking on the lines of a link table (storeproduct) but if each store is to have its own products it shouldnt be necessary. But then a bit of feedback from 3z might help
Hmm yes shops in one table and items in another might work, but the difficulty is then that the different shops is likely to have the same items also !
So how would I make the relations so that its possible for the admin to decide which items are used in the different shops and what prices each particular shop has ?
So in the third table I would write storeID, productID and then the price ? So if store 1, 2 and 3 all use item 7, it would look like this: storeID = 1, productID = 7, price = 23 storeID = 2, productID = 7, price = 25 storeID = 3, productID = 7, price = 20
No thats gonna be fucked up coz to lookup a list of products for a particular shop I would need to make multible lookups in the tblstore and tblproduct...
After finding a relation in the StoresProducts table I would need to make a selection in the tblproducts for every product to get the description ! That will give me multiple selections and lookups in tblproducts ???
SQL = "Select * from StoresProducts where ID = 14" set rs = Conn.execute(SQL)
Do while not rs.EOF SQLp = "Select * from tblProducts where ID = " & rs("ProductID") & "" set Prs = conn.execute(SQLp) response.write Prs("Productname") response.write rs("price") rs.movenext loop
You can also save the SQL as a query in the Access database WITHOUT the WHERE part. Then in your ASP select from the query instead of the table, and now adding the WHERE part
but I can't even get the "set rs = Conn.execute(SQL)" to work - keeps giving me an error... maybe I can't use that method along with your advanced SQL...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.