简体   繁体   中英

Running queries on two databases

Let say I am building a bookstore for all the books in a library. People won't be buying these books, only renting them for so long.

They will have to create an account and the proceed to make a rental. What I want to know is, what would stop some random person from a different city let say, making an account and renting all the books at once?(like a hack or a prank) I have come up with one solution where as to make the users only allowed to rent out one book per a certain time period, but then someone will could just make 100+ accounts if they so wish.

Could you only allow people to create an account who matches a certain criteria in another database(say user database) with there name, email and usernames? So that no one can just randomly make an account, only people who are already in a different database?

Well, you just can't avoid other people create many account, but you can limit some things.

1- Check the user IP address.
2- Avoid one person can rent more than one book.
3- When you rent a book, you can get a DNI or some document that is unique.

Those, just are some examples, but how i told you, you can't control it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM