Hi,
i have to enhance my shopsystem by a simple closed user group.
One of our customers wants to give some of his customers
"special prices".
Up to now I used mysql and therefore used one single db-user for the
whole shop.
The customers were assigned a (auto increment) number for
identification.
So far so bad :|
Now I would like to use postgresql because of transactions, views,
groups etc.
(BTW: is one of the 7.1 snapshots stable enough for real usage ? (8k
limit, outer joins)).
1.)
Would it be wise to "CREATE USER ..." for every new customer (even the
ones without
special prices)?
That would easily mean >100.000 db-users. Where's the limit ?
If the answer is yes:
2.)
How can I achieve that A sees the prices for A and B the prices for B ?
I guess that this is what views are made for :)
example:
articles:
article | name | defaultprice
-------------------------------
235 | burger | 13
specials:
user | article | price
----------------------
A | 235 | 7
B | 235 | 11
So, now my shop uses the account for user A to login.
I would like to "SELECT PRICE FROM WHATEVER WHERE ARTICLE=235" without
JOINing the tables manually.
I guess, that because OUTER JOINs are not supported (are they in 7.1
snapshot?) it complicates
the whole thing (If the user has no special-prices ...).
I really have know clue about views and rules and so on.
I would appreciate ANY help/hint/docs ...
--
Nabil Sayegh