What is the best/efficient DB Design for a device reservation system?

Hi,
I have to design table structure for a device reservation system. The user can reserve any device for a period of time (start time and end time). 
Based on the reserved devices
1) I need to show on the UI if the device is reserved or available
2) for any logged in user, to reserve, how do I validate and check all the devices and allow the user to reserve the device
with minimal logic
Each reservation for a particular time for a device may be present as one record, when the user is reserving we have to consider the entire set of records to arrive at a conclusion whether the device is reserved or free for that particular amount of time.
How do we do this with minimal logic and what is best db/table design for this kind of system.

You may have a Users/Customers table (contains users personal info)
You may have a Devices table (contains info about devices (name, supplier and etc))
You may have a reservation table that contains a userid + deviceid + startdate + end date+ quantity...
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence

Similar Messages

  • What is the best external hard drive for the MAC Book Pro with Retina?

    What is the best external hard drive for the MAC Book Pro with Retina?
    I was looking at WD MY PASSPORT FOR MAC and Toshiba. I want something that will work best with time capsule! Suggestions on the best external hard drive would be greatly appreciated!!!

    A Time Machine backup drive should be substantially larger than the system drive.  If you have a 128 or 256 GB SSD then a 1 TB drive will suffice.  If you have a 512 GB SSD then a 2 TB drive will suffice.  As leroydouglas indicated any brand other than WD will do.
    For 1 TB drives PlotinusVeritas gives some great suggestions here:
    https://discussions.apple.com/thread/5602141?tstart=0
    A 2 TB drive sold by Apple:
    http://store.apple.com/us/product/H9378ZM/A/lacie-2tb-usb-30-porsche-design-p923 3-desktop-hard-drive
    $130
    A 2 TB drive just as good for only $92.
    http://www.ebay.com/itm/Toshiba-Canvio-Basics-3-0-USB-2-TB-Portable-Hard-Drive-M odel-HDTB220XK3CA-/231162655273

  • What are the best practice to design Dashboard?

    Hi Friends,
    What are the best practice to design Dashboard?
    Thanks

    1) Use section name instead of Title View to name your report. This way sections can be collapsed and user can still see report name.
    2) Enable alternate coloring in tables and pivots for easy readablity and set table and pivot widths to 100% (for reports in dashboards) to reduce white space and achieve a more "professional look."
    3) Use column selectors and view selectors to reduce the width of reports and reduce the amount of columns user sees to a "practical minimum."

  • What is the best cf card reader for ipad 3 available in uk

    what is the best compact flash reader for the ipad 3, available in the uk that works with ios6.  thks

    You asked about CF, which is Compact Flash (which is larger than and different from SD cards). CF is used typically in higher end digital cameras.
    Here is the CF reader I recommend:
    Hoodman USB 3.0 Raw Steel UDMA Card Reader for CompactFlash and SD Cards
    http://www.adorama.com/HNRAWUSB3.html?utm_source=ET&utm_medium=TransactionalEmai l&utm_campaign=2point0Product1
    (also available from other sellers, including Amazon and many camera stores simply stock it on their shelf)
    This product reads two kinds of cards -- CF and SD. It is very good at doing those two things (as opposed to cheap readers that read 20+ types of cards and are flimsy and don't work all that well and don't last).
    This Hoodman device is ruggedly built, largely metal, and has a special pin guard "drop door" that protects the numerous delicate pins in the reader from accidental damage, which is what often happens to these CF readers -- namely a few of the many delicate pins get bent unintentionally after a period of use. This has been the bane of CF and its readers, those many delicate pins. This Hoodman design directly addresses the issue and from the reviews I've read and my daughter's experience with it, they seem to have succeeded.
    It comes with USB 3.0, which is very fast (if you have the 3.0 port), and it works as USB 2.0 if you have the older interface. It reads the latest and fastest of the CF cards as well.

  • What are the best settings to use for the newest AirPort Extreme (AC wifi) with my optimum online service provider?

    I have the current generation of the AirPort Extreme and a handful of devices that utilize the new 5Ghz A/C frequency. My internet speeds were blazing fast when I had first set it up but lately it has been lagging terribly. I was told that changing my dhcp did help, which it did it seems like it might be back to its normal speeds but I just want to know what are the best settings to configure for the airport so that I can get the most out of my service on all my devices? I'm using a CAT 6 cable which does help, I have a guest wifi setup with a wifi password which I understand will slow it down a little. Can anyone just point me in the right direction or just give me a step by step guide on what settings to configure? Should I really consider turning off the guest network?

    I am assuming that you are looking to configure your network to provide the highest level of bandwidth possible for your network clients. If that is the case, the following are a few things to consider:
    The Internet modem should support Gigabit Ethernet. That is the Ethernet connection between the modem and your 802.11ac AirPort Extreme should be Gigabit Ethernet.
    Use CAT-5e or CAT-6 Ethernet cables between all wired connections.
    Only expect 802.11ac performance with 802.11ac clients in the same room as the base station.
    Eliminate or significantly reduce any forms of Wi-Fi interference on both the 2.4 & 5 GHz bands.
    When streaming, especially HD video on your local network, use wired connections between the host and player devices when possible.
    Other than the above suggestions there are no "magic" settings that you can make on your AirPort. Note: The Guest network shares the same bandwidth as the "main" network. Unless you have a network goal to provide this type of network, it is best left disabled.

  • What are the best books to purchase for pl/sql programming?

    What are the best books to purchase for pl/sql programming?
    I am new to this field and I am looking for the best books to help me in pl/sql programming. Can someone please suggest?
    Thanks

    In my opinion one of the best to start
    Oracle PL/SQL Programming, Third Edition
    Steven Feuerstein

  • What are the best dimensions to allow for iPad 3 Retina for full-page landscape images?

    What are the best dimensions to allow for iPad 3 Retina for full-page landscape images?
    I read an article and cannot find it that said something about trying to make it 2million pixels and JPG to keep it small, but what exactly should the dimensions be that I ultimately import?  Is there some kind of a "density" setting I have to use, as well, when exporting from Photoshop, for example?

    See Optimizing performance in your iBooks Author books
    Density is discussed by Apple in this context as 'dpi'...
    132 - iPad 2
    264 - new iPad
    At the top of this forum there are popular links listed on the right, including image sizing etc. Be sure to study those existing/previous threads on this topic.
    Good luck.
    Ken

  • I have a 2007 macbook and I am wondering what is the best external hard drive for my Mac?

    What is the best external hard drive for a 2007 Macbook?

    The Apple USB superdrive would be a great choice for you, ( http://store.apple.com/ca/product/MD564ZM/A/apple-usb-superdrive?fnode=5f ) I am not certain but I am pretty sure that it has the same form factor as the MacMini (Not thickness but all the other dimenetions) so it fits just under and looks like an extension of your mac. 

  • What is the best voice control program for macbook pro

    what is the best voice control program for macbook pro?
    i have lost the use of my arms and need full voice control.
    thank you.

    Welcome to the Apple Support Communities
    First, use speech recognition. It's installed on OS X, so you don't have to install a third-party app. See > http://support.apple.com/kb/PH11258?viewlocale=en_US

  • What is the best siri like app for macbook pro?

    what is the best siri like app for macbook pro?
    any one have experience with dictation apps?

    Welcome to the Apple Support Communities
    First, use speech recognition. It's installed on OS X, so you don't have to install a third-party app. See > http://support.apple.com/kb/PH11258?viewlocale=en_US

  • What is the best External Hard Drive for a Macbook Leopard 10.5.8?  I need more memory for documents, pictures, videos, and music.  Thanks!

    What is the best External Hard Drive for a Macbook Leopard 10.5.8?  I need more memory for documents, pictures, videos, and music.  Thanks!

    Hi, does your MacBook have Firewire, or just USB?
    FW is far faster if you have that.
    Avoid Bus powered ones.
    http://eshop.macsales.com/shop/firewire/1394/USB/EliteAL/eSATA_FW800_FW400_USB
    USB only...
    http://eshop.macsales.com/shop/firewire/usb/eliteclassic

  • What is the best virus/spyware software for OSX 10.6.8?

    What is the best virus/spyware software for OSX 10.6.8 on an iMac?

    Csound1's answer albeit short is correct. Because there are no viruses (as in zero, none, nada, zip) for OS X having antivirus software is a waste of time, resources and possibly money. About the only need for antivirus software is if you frequently download files you know nothing about and then forward them to Windows users. In that case even though you still don't need anything for OS X you are protecting the Windows users from your passing along infected files. Most anti-virus software for OS X tend to create more problems than they solve however if  you insist I'd recommend ClamXav which is free, non-intrusive and is frequently updated.
    Roger

  • What is the best word processing program for mac?

    What is the best word processing program for Mac?

    That's an impossible question to answer - what type of writing will you be doing?
    Before we can point you in a direction you need to tell us what kind of writing you will be doing. As phrased, the question is a bit like "what's the best car?" Well few would doubt that a Ferrari is superior to a Honda minivan, but the Ferrari will not much use if you're dragging 4 kids, two dogs and the grandparents along.
    Academic?
    Word is the nearest thing to a standard format in the Humanties, but in the sciences and math you'll find Tex more useful for laying out formulas. The older Pages is quite good as a substitute for Word in many cases in the Humanties, but you'll have big problems with citations in the newer version. Apps like Nisus Writer Pro and Mellel are more powerful than Pages, but each have shortcomings. Scrivener and Ulysses are excellent drafting tools but you'll need a Word Processor for final layout. There are lots and lots of lightweight editors out there - Byword, iaWriter (and Writer Pro), OmmWriter - that have little functional use in Academic settings - poor or no support for citations for instance, or poor or no interoperability with Word - but which might be excellent for other uses.
    So, back to the key question: what kind of writing will you be doing?

  • What is the best word processing program for ipad2?

    What is the best word processing program for ipad2?

    I would recommend using Pages for what you are doing. It is the best one to use on the iPad itself, and has the ability to convert to an MS Word format. I know that it can do this through email, but I am also fairly certain you can import it in this format through iTunes, though you may need to convert it on the iPad itself.
    With iOS 5 and iCloud, I recommend kicking Word to the curb altogether and going with Pages on both machines. Not only will everything be more seamless, but iCloud will update the changes you make, on either device, automatically. And Pages is only 20 bucks through the App store for the Mac (OS 10.6.7 or later needed).

  • HT4650 what's the best free virus program for Mac?

    What's the best free virus program for the Mac?Not just for viruses, but removing all the duplicate folders and tuning up my mac.
    I'm not exactly sure what all the Activity Monitor stuff is, but I know when my
    Mac is sluggish and slow. Any ideas? (No, MacDefender is not a possibility)

    See Here  >  Antivirus Discussion
    And Here for keeping your Mac happy...
    http://support.apple.com/kb/HT1147
    http://www.thexlab.com/faqs/maintainingmacosx.html
    http://www.thexlab.com/faqs/performance.html

Maybe you are looking for

  • Substitution in MIRO

    Hi Guys, when I enter MIRO the terms of payment(BSEG-ZTERM) are taken from Purchase Order and instead I want that they are taken by Vendor master data. Can I do this with a substitution,if yes how can you descrbe the principals steps? Thanks in advan

  • Supporting AiR links app:// or with AiRAliases file:///

    Hello We are using Strobe Media Playback in our App and it works in all Browsers and on the iPad. But it don't work for our Adobe AiR App. We always get "We are unsable to connect to the contetn you've requested....". As far as we can see, the proble

  • Can I create a cert with the Java API only?

    I'm building a client/server app that will use SSL and client certs for authenticating the client to the server. I'd like for each user to be able to create a keypair and an associated self-signed cert that they can provide to the server through some

  • P&l a/c

    hello, can anybody tell me that how can we see the p&l a/c month wise

  • Revaluation - AR29N

    HI When i am trying to post the revaluation of an asset by AR29N then i am getting following error. I am doing following settings in AR29N asset valued amount revaluation offsetting account T -type 897 Depreciation wout/ writeback revaluation measure