When to use FileTable, and DB design questions

I have a kind of interesting scenario- lets say I have a list of people I wish to store in the database, so I create a table 'Person'.  Now lets say each person has a 2000 large image files (say high res photos or something).  Each image is >
5M.  What I need to do at the end of the day is retrieve a person, and upon selection display a selected photo (or photos) in my C# WPF app.
I was looking at FileTable to store the data on the disk, as this would be preferable to storing all these images as blobs.  But I wasn't sure how to associate the Person with their images through the FileTable.
Can I add additional columns to a file table (like an fk to Person)?  Not sure if that is the right approach.  Maybe FileStream is better?  Is it better in a case like this to just store a path in the database?  Which leads to the next
question...
I also need to store other kinds of data, like DeepZoom data- this is interesting stuff, as its about 600M of data, and exists in a single directory structure with multiple levels of data (and images).  Apps able to read this need extremely fast access
to the data to render it quickly.  I think in this case I would need to just store the location of the DZ data on disk.  But that seems fragile.  Is there a standard accepted way to store file locations in the DB?
Thoughts and advice appreciated!

Okay, filestream it is.
What about storing file locations?   Also, if I write a 10M file to a filestream- do I write this to the DB as if it were a blob?  Is it slower to write to the DB than directly to the filesystem using filestream?
I read the whitepaper on filestream and hunted around but couldn't seem to find this info...
Since a FileTable appears as a folder in the Windows file system, you can easily load files into a new FileTable by using any of the available methods for moving or copying files. These methods include Windows Explorer, command line options including xcopy
and robocopy, and custom scripts or applications.
Please read the below URL. It clearly explains answer for your question.In the below url  script example also given
http://technet.microsoft.com/en-us/library/gg492083.aspx#HowToMigrateFiles
Loading or Migrating Files into a FileTable
The method that you choose for loading or migrating files into a FileTable depends on where the files are currently stored.
Current location of files
Options for migration
Files are currently stored in the file system.
SQL Server has no knowledge of the files.
Since a FileTable appears as a folder in the Windows file system, you can easily load files into a new FileTable by using any of the available methods for moving or copying files. These methods include Windows Explorer, command line options including xcopy
and robocopy, and custom scripts or applications.
You cannot convert an existing folder to a FileTable.
Files are currently stored in the file system.
SQL Server contains a table of metadata that contains pointers to the files.
The first step is to move or copy the files by using one of the methods mentioned above.
The second step is to update the existing table of metadata to point to the new location of the files.
For more information, see Example: Migrating Files from the File System into a FileTable in this topic.
Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful. By ganeshk

Similar Messages

  • When to use inheritance and when not to?

    I've just been trying find out when to use inheritance and when not to use inheritance? I know that inheritance gives advantages such as code reuse and maintainability. But when are their times not to use inheritance that may effect the design of a project?
    Also when should one consider aggregation over inheritance(is-a relationship)?
    thanks,
    plandis

    Hi
    Answering this question usually requires a few books, so, I'm sorry, it's not really as simple as choosing between using a screwdriver vs. a hammer.
    But, very short, inheritance should ideally only be used when there exist a strict 'is-a' relationship. However, sometimes it may be clever to inherit when you have a 'is-almost-a' relationship... And sometimes this is a stupid move. This depends on the context/circumstances.
    Aggregation is normally considered a 'has-a' relationship, thereby differing clearly from inheritance. The old 'car' model says "a car is-a vehicle and has-some (at least) wheels."
    The wheels are aggregated to the car class, that itself is inherited from vehicle.
    However, this is just a good rule-of-thumb and there may be circumstantial reasons for not following these guidelines.

  • I am having trouble using reverb of any kind; it does not sound natural, but rather "pixilated." Does anyone have any ideas for a solution? I have used Silververb and Space Designer and am having the same problem...

    I am using Logic Pro 9 with two MXL 990 microphones in my piano and a Rode NT1A for vocals. I have tried recording with added reverb and keeping getting not a natural reverb sound, but a rather "pixilated" one that does not sound natural. Does anyone have any ideas on how to solve this issue? I have tried using Silververb and Space Designer, and both result in the same problems. Thank you!

    This is asking for the impossible! It does not sound natural because maybe it isn't and in judging so whats your reference anyway. If you are in dire need of some natural sounding room you can go and record it yourself. But even then, the chances that it sounds like you imagined it, are very slim.
    There are very decent sounding reverberation plugins, based on artificial reverb generators or convolution-style, the last one is said to sound more 'natural' then the first one. Be it as it maybe, it really is like cooking food. You got all the ingredients for this delicious taste at hand and believe it or not to reach a satisfying result this is not enough, because if you do not mix the ingredients in the right proportion you will end up with a different dish you thought you'll get. This is exactly the same when one would mix audio, I dare say.
    So treat yourself to some good ingredients and the rest is up to you, namely: taste and experience!
    And looking at some of my past music productions I always find the same plugins for the 'ambient' task:
    Altiverb by Audio Ease when I have acoustic ensembles (classical music mostly), the Sony Oxford Reverb in studio productions, Bricasti when I have to deal with drums and MMultiBandReverb from MeldaProduction for all-round stuff. Thats the base I start from, after that I can end up with dozen Reverb plugins which basically all are doing the same thing but just in a tiny different way.

  • WHEN TO USE SYS_REFCURSOR AND WHEN NOT TO USE REFCURSOR

    SYS_REFCURSOR is a Weakly Defined Cursor
    DECLARE emp_refcur SYS_REFCURSOR;
    when this is so simple
    why this
    DECLARE TYPE emp_cur_type IS REF CURSOR RETURN emp%ROWTYPE; my_rec emp_cur_type; ?
    Can anyone explain in what situations we should prefer among these ..when both can give same result set .

    > WHEN TO USE SYS_REFCURSOR AND WHEN NOT TO USE REFCURSOR
    When the requirements define that one is better suited than the other.
    There are no hard and fast rules about when to use a specific tool. There are however basic concepts of what the purpose of the tool is, and what typical problems the tool can address.
    Ref cursors in PL/SQL.. usually not the best of ideas. Ref cursors are designed for client-server processing.
    1) The client makes a request for data/information.
    2) PL applies the back-end server logic and construct a SQL statement for the client.
    3) PL passes the SQL to the SQL engine where it is parsed and a SQL cursor created.
    4) PL passes a reference handle to SQL cursor back to the client
    5) The client can now fetch the rows output from the cursor.
    Advantages.
    - The client does not need to know SQL, db structures, business logic, etc
    - The PL code can be improved, modified, new business logic added, without even touching a single byte of client code
    So what are the advantages where the "client" in the above is another PL/SQL program? None really.
    A "real" client (an external one like Java, C#, Delphi, etc) can receive the ref cursor handle and dynamically at run-time determine the projection (output) of the cursor.
    PL code cannot (unless using the latest 11g features). In PL code, a ref cursor is actually implemented as a DBMS_SQL cursor. A DBMS_SQL cursor is to PL code what ref cursor is to Java/C#/etc.
    So whether you define a strongly typed or weakly typed ref cursor in PL/SQL code... typical response is "so what?" as ref cursors are not really intended for PL code. Not that there are exceptions - they do come in handy at times.. but as exceptions to the rule.
    So my response is "so what?" - it is more important to *correctly" chose what type of client cursor data type you want to use to interact with the back-end SQL cursor. Once that decision has been made (based on technical sound logic), then one can look at  (minor) issues such as weak vs. strong ref cursors.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • When to use interface and when Abstract Class?

    In a recent interview I was asked "When to use interface and when Abstract Class?" Explain with an example.
    Also in what situations a class should be made final(real time example)

    Interface is a pure contract with no implementation. Typically used to define a communication contract between two different sub-systems. Example EJB home interface. This also allows the design to change as long as the contract is met.
    Abstract class is when there exists a lot of common functionality already known and can be coded. However, a few unknowns exists (typically about data) for which abstract methods need to be defined and implemented by the sub class.
    Example: Consider a workflow engine. A great example for abstract class. The workflow process has lot of common code that is independent of the workflow type (vendor flow, contract flow, payment flow etc). However, certain decisions on the route to take will depend on value of data being submitted. So the base class will define a abstract Data getData() method and proceed assuming data will come. The implementing subclass will provide the actual logic for getting the data.
    Also see the "Template" design pattern.
    Note: To some extent the common code design drives the behavior of the abstract methods. So if the design changes then so "might" the behavior expected from the abstract methods.

  • Masterdata - when to use it and when not to use it

    Hi!
    I have had some discussion with my colleagues about the use of masterdata on Oracle databases. Some of them tells me that I should use it if the data don't change often (ofcourse.....). This should ALWAYS be done they say. But I don't agree on this..
    Is it really necessary to make a lot of masterdata (and also views that has to be used) if the data is only to be loaded once a day, and the number of records is max 1000?
    I can't see the effect on this...
    Can someone give me a guideline for when to use masterdata, and when I don't need to use masterdata (if there are any article on this, please give it to me).
    Best Regards
    Helge

    Hi
    Answering this question usually requires a few books, so, I'm sorry, it's not really as simple as choosing between using a screwdriver vs. a hammer.
    But, very short, inheritance should ideally only be used when there exist a strict 'is-a' relationship. However, sometimes it may be clever to inherit when you have a 'is-almost-a' relationship... And sometimes this is a stupid move. This depends on the context/circumstances.
    Aggregation is normally considered a 'has-a' relationship, thereby differing clearly from inheritance. The old 'car' model says "a car is-a vehicle and has-some (at least) wheels."
    The wheels are aggregated to the car class, that itself is inherited from vehicle.
    However, this is just a good rule-of-thumb and there may be circumstantial reasons for not following these guidelines.

  • When I use Mail and want to paste an emailadress with a right mouse click in the adres field this doesn't work, ofcourse cmd V  works. How can I solve this

    when I use Mail and want to paste an emailadress with a right mouse click in the adres field this doesn't work, ofcourse cmd V  works. How can I solve this

    YAY!  That did it.
    Thank you so much.
    And a Very Happy and Prosperous New Year to you!
    bonnie

  • When to use SELECT and END SELECT in the query.

    hi all,
    When to use SELECT and END SELECT in the query.
    regads,
    Venkata Suresh Penke.

    Hi Suresh..
    When do we need to use SELECT .. ENDSELECT
    Usually we will never use SELECT .. ENDSELECT as it gives very poor performance.
    But whenever we read a single Record we will use it as an alternative for SELECT SINGLE in some scenarios.
    Eg: When the Full primary key is not specified in the WHERE clause.
    SELECT * FROM MARC INTO WA_MARC UP TO 1 ROWS WHERE MATNR = P_MATNR.
    ENDSELECT.
    And other scenario is when we perform AGGREGATE OPERATIONS.when the Result is only one row.
    SELECT SUM( LABST ) FROM MARD INTO V_LABST UP TO 1 ROWS
    WHERE MATNR = P_MATNR.
    ENDSELECT.
    Note: In The Above scenario we cannot use SELECT SINGLE..
    <b>REWARD IF HELPFUL.</b>

  • Please give me advices when to use black and white sliders in LR4.

    Please give me advices when to use black and white sliders in LR4.

    I use blacks and white sliders on every photo (this does not necessarily imply non-zero values). I consider them as important as any other slider. Not optional, not for fine tuning - include consideration each iteration.
    Although that is contrary to what Adobe and many "experts" recommend, I tried doing it their way too but I could not get the results I wanted in most cases.
    The "concept" and original intent is for fine tuning, but the implementation is not. I often set whites to +20, +30, +40. This has a radical effect on overall exposure which is the most important thing to get right in PV2012. And it generally requires compensatory adjustment of highlights, shadows, and sometimes contrast...
    Likewise, optimal shadow toning can include radical blacks adjustment  - sorry Adobe/experts/defenders, but for me - it's true. And, blacks slider, like whites, affects entire histogram, a lot.
    Summary:
    ========
    If you want to keep things as simple as possible, then use sparingly and use last (gag), but if you want your photos to look how you want them to look - as good as possible, then use liberally, and pay the price...
    More info here: http://forums.adobe.com/message/4259091#4259091
    Rob

  • When to use jsp,and when to use servlet?

    I think that jsp and servlet can realize the same functions, because when run a jsp, it is transferred to a servlet program, so when to use jsp and when to use servlet?
    I am now developing the input interface for a website, I just use jsp and javabean to connect to weblogic and database, and I didn't use servlet, Is there any unseemliness?
    Thank you!

    IMHO I use servlets to control the flow between my jsp's based on a number of factors in a webapp. For instance, user authorization. If a user has the authorization to conduct various administrative functions on an application (like change user rights, reset passwords etc) they will have access to specific buttons or links on some screens that others will not. I use servlets to establish what access rights a user has and direct them to the appropriate pages. I also use servlets to test data validity on form input screens. I know that I can also do this with JavaScript but that can be disabled by the client and in order to prevent that I also double check the form input from a servlet. All my jsp's do is display the results of a business process (which is held in a JavaBean or EJB) and the servlets act as the controllers for the application, connecting to multiple databases, verifying application state, flow control etc. I try to keep the jsp as simple as possible as some of them are maintained by html developers who lack the necessary experience to write java code. I hope this helps.

  • When i use Firefox and do a Google search, find what i need and click on the link I keep getting automatically redirected to another search site

    When i use Firefox and do a Google search, find what i need and click on the link I keep getting automatically redirected to another search site called http://www.scour.com
    Can someone tell me if this is a problem with Google or Mozilla? or both? or neither?

    This type of behaviour can be caused by malware. Try running several malware scanners. It is best to run several as each will pick up things that the others miss. Some scanners you can try are:
    * [http://www.malwarebytes.org/mbam.php Malwarebytes]
    * [http://www.superantispyware.com/ SUPERAntiSpyware]
    * [http://www.lavasoft.com/products/ad_aware_free.php Ad-Aware]
    * [http://www.microsoft.com/windows/products/winfamily/defender/default.mspx Windows Defender]
    * [http://www.safer-networking.org/en/home/index.html Spybot S&D]
    This link may help - http://deletemalware.blogspot.com/2010/02/remove-google-redirect-virus.html
    If the above malware scanners do not find any malware or can not clear it, you should consider posting in one of these forums for specialized malware removal help:
    * http://forums.spybot.info/
    * http://www.spywarewarrior.com/index.php
    * http://forum.aumha.org/
    * http://www.bleepingcomputer.com/forums/
    * http://www.spywareinfoforum.com/

  • Since i uploaded ios 5 my ipad crashes when i use apps and safari.

    Hi,
    since i uploaded my ipad to ios 5 it crashes when i use apps and safari.
    i tried to restat it and also i reset it to the factory settings but nothing has changed.
    is there any software problems ??

    seems if I disable all security it works. Not a very good situation, tells me it's a port that is open that shouldn't be. I imagine it is fine on a mac, but on a pc it is an issue since most corporations use pc's.

  • I HAVE A MAC G5 WITH V10.4 TIGER OS, I AM HAVING TROUBLE WITH THE LETTER "N" ONLY WHEN I USE CAPS AND SHIFT KEYS DOSE IT TYPE THE LETTER "N"SE

    HAVE A MAC G5 WITH V10.4 TIGER OS, I AM HAVING TROUBLE WITH THE LETTER "N" ONLY WHEN I USE CAPS AND SHIFT KEYS DOSE IT TYPE THE LETTER "N". I HAVE CONNECTED A NEW KEYBOARD BUT THE PROBLEM STILL EXIST. WHAT ELSE CAN I DO?

    You might look at "Keyboard Shortcuts" in the Keyboard and Mouse preference pane and see if somehow the lower case n has been inadvertently assigned to something.
    Probably the best solution would be to click the "Restore Defaults" button.

  • My iphone 4s keeps freezing up. I have restored it as a new phone. Done numerous resets. But it still keeps freezing up when im using apps and trying to text. Its really annoying.

    My iphone 4s keeps freezing up. I have restored it as a new phone. Done numerous resets. But it still keeps freezing up when im using apps and trying to text. Its really annoying.

    Oh OisinC7,
         I'm aslo experiencing similar problem. Tell me your country and what apps make your phone freeze?

  • When to use inheritance and When to use Composition

    java support both inheratiance and composition .I also know "is a" and
    "has a realitionship" but there is always a problem with me to understanding whethere i have to use extends or having a object of a class has a member of othere class.
    and also "A pure OOP must support polimorphisim,inheretiance,encapluction,Abstraction and Composition" correct me if i am wrong
    thank you and have a nice day.

    Bruce Eckel, author of Thinking In Java, has this to say about composition vs. inheritance:
    When deciding between inheritance and composition, ask if you need to upcast to the base type. If not, prefer composition (member objects) to inheritance. This can eliminate the perceived need for multiple base types. If you inherit, users will think they are supposed to upcast.
    Choose composition first when creating new classes from existing classes. You should only used inheritance if it is required by your design. If you use inheritance where composition will work, your designs will become needlessly complicated.
    Bill Venners: Composition versus Inheritance
    Use inheritance (of implementation) only when the class satisfies the following criteria:
    1) "Is a special kind of," not "is a role played by a";
    2) Never needs to transmute to be an object in some other class;
    3) Extends rather than overrides or nullifies superclass;
    4) Does not subclass what is merely a utility class (useful functionality you'd like to reuse); and
    5) Within PD: expresses special kinds of roles, transactions, or things.
    -- from Java Design: Building Better Apps and Applets (2nd Edition), by Peter Coad and Mark Mayfield

Maybe you are looking for

  • XML namespace (xmlsn attribute)

    Hi to all, I have a problem, when i build a XML documento in PL/SQL, using xmldom class, i want to set xmlns only in root node. This is my code: doc xmldom.DOMDocument; main_node xmldom.DOMNode; root_node xmldom.DOMNode; root_elmt xmldom.DOMElement;

  • Endnotes in a footnoted document

    Hello, I'm trying to insert a section with endnotes in a longer document which has footnotes. I know you can't have endnotes and footnotes in the same document, but I was hoping that inserting a new section would allow me to do it. The document was w

  • Crystal report refresh based on document ID

    Hi All, i am able to do webi report refresf based on document id but i am not able to find crystal report refresh based on document ID BO SDK API on JAVA. please help me on this? the below code is for webi report refresh : ReportEngines engines = (Re

  • How to update songs bought on itunes

    how to update songs bought on iTunes? in order to play them in Djay

  • I deleted all my song on the ipod but hard drive didn't clear up the space

    now i have a ipod with 200mb of space but no songs