Data type for Saving Image in SQL database
Hi,
Which is the best way for saving images in the database? Filestream or Varbinary(max)?. Will the Varbinary max comsume much space or it will only take the actual size of the data?
I've used FILETABLE for storing images in SQL 2012
You can configure it to have transact and non transact access if you want
see
http://visakhm.blogspot.in/2012/07/working-with-filetables-in-sql-2012.html
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page
Similar Messages
-
Data Type for saving Base64 image string into SQL database
Hi Team! I have image base64 string to be save into sql database. I use Varchar(MAX) data type. The problem is there are certain image string that cannot be enter (paste) into the table (due to the size) then i need to resize the image then i can paste
the string into the table. How to make all image string size be able to be save in the table? Or there is limit on the image size to be save into the table? I'm using mssql 2008. Thanks a lot.There is a limit of 2GB. Which means that the actual image size must be less, since you encode the image in Base64 for some reason.
Now, "pasting" strings is not the normal way to store data in an SQL Server database, so the question is a little funny. Normally data is stored in a database through a program of some sort. One way is to use OPENROWSET(BULK) as HuaMin suggested.
Here is a link to a simple example of how to do it from .NET:
http://www.sommarskog.se/blobload.txt
Erland Sommarskog, SQL Server MVP, [email protected] -
Data Type for a Longitude/Latitude Column in an Oracle dB Table?
Greetings All,
What is the recommended data type for a Longitude(Lon) or Latitude(Lat) Column of an Oracle dB Table? I am creating a signs inventory table in our Oracle database to be used as a data warehouse for our signs inventory. The Lon and Lat fields along with some other data will be populated from a MS access file exported from our Geodatabase. Currently the data type for the Lon and Lat fields of the MS access file is defined as "Double". A couple of Examples of the Lon and Lat data are as follows:
Lat Lon
59.4564555909 -135.3133542922
64.841125 -148.01808
...What data type should these two columns be defined in the new Oracle database table??? Should the data type be defined as FLOAT(126), NUMBER(10, 6), or else? Any suggestions/help on this would be greatly appreciated.
If the data type is defined as NUMBER(10,6), the first example of Lon "-135.3133542922" will be truncated to "-135.313354" or would I receive an error while trying to import the data from an access file to the Oracle dB?
Thanks in advance for any/all the help.Orchid,
Is SDO_GEOMETRY available in Oracle 10g?Yup. I'm still on 10g as well; there's no shame in that.
How do I format my lat/long's into WKT and use the SDO_GEOMETRY constructor?The March 16th example shows the steps, but I take it you're trying to get your data from MS Access into Oracle. Is that right? If so, consider these options:
OPTION 1, When you have < 50k records
Simply write a query that returns INSERT statements that you can run against Oracle.
For example, let's say you have a table in MS Access defined as msaCoords (ID, LongX, LatY).
Let's say, your destination table in Oracle is named oraCoords(ID NUMBER, Geometry MDSYS.SDO_GEOMETRY). Then,
SELECT "INSERT INTO oraCoords (ID, Geometry) VALUES (" & ID & ", SDO_GEOMETRY('POINT (" & LongX & "," & LatY & "'), 8307);" FROM msaCoords;
-- "MS-ACCESS QUERY RESULTS"
INSERT INTO oraCoord (ID, Geometry) VALUES (1, SDO_GEOMETRY('POINT (-135.3133542922,59.4564555909'), 8307);
INSERT INTO oraCoord (ID, Geometry) VALUES (2, SDO_GEOMETRY('POINT (-148.01808,64.841125'), 8307);Save those MS-ACCESS QUERY RESULTS to a text-file (D:\MyPts.sql). Launch SqlPlus and type @D:\MyPts.sql
Once it's done, type Commit into SqlPlus and you're done.
OPTION 2, when you have > 50k records
Use SqlLoader. There's an example posted { here | http://forums.oracle.com/forums/thread.jspa?messageID=9412123� }
Cheers,
Noel -
What is the best data type for wallet application?
Hi Friends..
I want to know what is the best data type for wallet application..
Assume that, i want to the Total of money saved digitally in Applet Wallet..
And then if there's any transaction the Total of money which saved digitally in Applet Wallet would be Subtracted or Added depends on how much money that spent or saved..
Which one is the best implementation of these scenarios :
1. I save the User ID and Total of money in the Java Card, and then if there's any transactions, it would be added or subtracted directly and then saved again in the Java Card
2. Or.. I save the User ID in the Java Card whereas Total of money in the Database, and then if there's any transactions, the ID would be read from the Card, and then select the Database based on that ID, and then Add or Subtract the money depends on how much money spent in the Transaction
Please help me regarding this
Thanks in advanceHi,
Personally I would choose to store the total amount stored on the card. You could use two shorts (short[] perhaps) to store an integer (add more shorts to increase precision) and simply handle overflow your self. You could even look into using a third party library (or class) that treats a byte array as a big integer etc. There were some posts recently on floating point arithmetic that could be helpful for you since you will probably want to use decimals and JC does not natively support floats.
Cheers,
Shane -
Data Type for Process Flow... PB with Date?
I've got a problem by passing parameters in process flow.
I have a mapping with a parameter DATE_EXEC (data type : DATE) and a default value that is TO_DATE('20/01/2007' , 'dd/mm/yyyy') . My mapping is working good when i launch it.
I have a process flow which contains the mapping. This process has a parameter DATE_EXEC (data type : DATE). I bind the 2 DATE_EXEC. But when i launch my mapping the value is not recognized, I try with :
- TO_DATE('20/01/2007' , 'dd/mm/yyyy')
- 20/01/2007
- 2007.01.20
- 2007-01-20
My question is what are the data type in process flow? They are not ORACLE TYPE.
For example , a parameter in a mapping which is a VARCHAR2 must be input between quotes but if you bind it to a parameter of a process flow which is a STRING (not ORACLE Data type) , you must input it without quotes?
Anybody has some rules about that?
I apologize for my english, i'm a french people.Here is some information on the literal quote or not quote query and what I think you need to do at the end, hope it helps. Not exactly intuitive...since the flow designer (you) have to know what is a PLSQL object and what is not.
1. Literal = FALSE
When Literal = FALSE is set then the value entered must be a valid PL/SQL expression which is evaluated at the Control Center e.g.
'Hello World!'
22 / 7
2. Literal = TRUE
When Literal = TRUE then the value is dependent on the the type of Activity. If the activity is a PL/SQL object i.e. Mapping or Transformation, then the value is PL/SQL snippet. The critical difference here is that the value is macro substituted into the call for the object. The format of the value is identical to that entered as default value in the Mapping editor. e.g.
'Hello World!'
sysdate()
If the activity type is not a PL/SQL object then the value is language independent. e.g.
Hello World
3.1427571
What you should try......
Check the map activity parameter in your process flow to see if literal is false (an expression), set it to false and then try using your TO_DATE('20/01/2007' , 'dd/mm/yyyy') expression, deploy your flow and execute. Alternatively the user guide defines the DATE type for flow with the format YYYY-MM-DD so you can have the parameter value as '2007-01-20' use literal equal to true and remember and quote your value.
Cheers
David -
Query regarding the data type for fetcing records from multiple ODS tables
hey guys;
i have a query regarding the data type for fetcing records from multiple ODS tables.
if i have 2 table with a same column name then in the datatype under parent row node i cant add 2 nodes with the same name.
can any one help with some suggestion.Hi Mudit,
One option would be to go as mentioned by Padamja , prefxing the table name to the column name or another would be to use the AS keyoword in your SQL statement.
AS is used to rename the column name when data is being selected from your DB.
So, the query Select ename as empname from emptable will return the data with column name as empname.
Regards,
Bhavesh -
Data Types for RadioButtons and PushButtons
Is there a data type for representing radioButtons and pushButtons in the Oracle tables? If not, what is the alternative to using these controls?
nullHello,
The data type of your field is smallmoney or you want to convert a int or varchar value to smallmoney?
Hugs!
Bruno Destro
Dicas de programação em .net, C# e SQL - http://smcode.com.br/blog.aspx -
Which is better datatype for storing Images in 11gr2 Database ?
Can anyone tell me which datatype should be maintained for storing images in database in terms of
1. Space
2. Speed.
And, Is there another way for storing images instead of database ?
Thanks/Regards in advacne.982164 wrote:
Which one have better speed, database system or file system ?Database is better all around. It is not just a question of speed. It is a question of storage, security, flexibility, scalability, robustness and so on.
If you use ASM and raw devices from a storage array or SAN, how do you get o/s files onto that? (requires a file system on the SAN/array LUNs)
If it is inside the database, database security, concurrency and consistency apply to the image. Outside the database? How do you control who has access? Prevent someone with slippery fingers from accidentally deleting/renaming/moving images files? How do you backup up the image data with the image attribute data in the database?
Having all this inside the database, part of the database, managed by the database, provides you with more flexibility, robustness, and security. After all a RDBMS is a data management system - it is designed for managing data. And that includes managing binary data.
As for speed. Reading a 24MB image is reading 24MB worth of data. Whether that data is read by process A from disk1, or process B from disk2 - the amount of data is the same. So if you want faster I/O, then use faster disks. If disk1 is faster, process A will perform better reading the image than process B. If disk2 is faster, the roles are reversed.
So I/O speed is not a direct function of process A or process B. It is a direct function of the I/O storage and fabric layer. Yes, a process's method of I/O can make a difference (e.g. using block reads not aligned with the physical blocks on disk). But this is more a configuration issue than process doing badly designed I/O calls.
So the speed question is a bit loaded as it has more to do with the architecture and design of the I/O system - and less to do with the process doing that I/O. You can have a highly optimised I/O process doing poorly using an old and slow I/O layer, and poorly written I/O process doing pretty well on a SSD I/O layer.
Databases like Oracle is designed for dealing with data - and thus effectively dealing with I/O. Lots of it. For lots of data. So I/O process design is not a consideration. The database processes will use the I/O layer as optimally as possible and as configured. -
Labview How to specify 1d array of clusters as data types for variant to data
Hi, I'm new to labview. Can anyone tell me how to specify 1d array of clusters as data types for variant to data?
First of all, you should be sure that there is such a data type within the variant; otherwise, you will run into errors.
I recommend you to create the cluster and create a type definition from it. Then drop an array shell from the array palette and drop the cluster type into that array.
Connect that constant to the data type input of the Variant To Data function.
Norbert
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it. -
How to change data type for a field?
Hi Experts,
I have one std screen having one field having numeric type. So it will accept only numeric value. Remember I am using standard transaction.
Now my user wants to enter the special character like + or - in that field(having data type numeric).
How i can change the data type for the particular field so that it will also accept + or -?
Plz reply me as earliest as possible.
Thanks in advance.Hi salil ,
u have to change / create Domain of that Data Element.
but u have to check the Implications. i have done the same thing , but that one is Customer defined one , i got nearly 20 short dumps while doing the TP.
regards
Prabhu -
Default date type for IT0041 in action
Hi,
I configure feature DATAR to set 01 as default date type for IT0041, but when I do hiring action, default date type will be 01,02,12.
Don't know where to change the default.Hi,
Please verify if there is any dynamic action in table V_T588Z set-up for same which may cause override over default.
Also, verify if your DATAR feature is set up correctly for relevant country grouping and activated.
Thanks,
Ameet -
How create data type for coulmn name having special characters in IR
hi ,
any idea how to create how to do create data type for coulmn name having special charactersHi Amit,
Can you ellaborate ?
Actually if you are reading a file(or anything else) which contains special characters, the data type can be created as done for other interfaces. But it is in the adapters that we actually take care of handling these special characters.
ShabZ -
Hey guys
i have a HTTP to File scenario where in my getting and XML file which has sone tags of this form
<ServiceDateTime dateTypeIndicator="PromisedForDelivery">2007-04-06</ServiceDateTime>
how should i create data type for this?
is this an attribute?
thanx
ahmadHi,
Just "Insert Attribute" by right-clicking on ServiceDateTime.
Regards,
Bill -
How to create the Data Type for the receiver end?
Hello Expertise
I wanted to Create a Data type for Receiver end in PI.
Sender end is ECC.
Receiver end is SRM
Here's the Data type for Sender end as
Can anyone help to create the Data type for Receiver end i.e SRM.
Thanks in advance.
Regards
karanHi Karan,
Please don't call Sir, we are just trying to help each other.
Please go through below scenario's and check your configuration.
ABAP Client Proxy to ABAP Server Proxy Scenario - Process Integration - SCN Wiki
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0ac1a33-debf-2c10-45bf-fb19f6e15649?overridelayout=true
http://wiki.scn.sap.com/wiki/display/XI/Step-by-step+FTP+to+ABAP+Proxy
regards,
Harish -
Dynamically create data type for structure
Hello Experts.
how to create dynamic data type for structres. for example.
data lv_struc_name type strukname.
lv_struc_name = get_struct_name( ) ****** this method gives the structure name('ct_struc')
now I want to create one data type, which is having the type of lv_struc_name content.(ct_struct)
thanks
TimHi,
here is the link to really good presentation about generic programming ABAP351.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b332e090-0201-0010-bdbd-b735e96fe0ae
It contains examples how to create dynamic structure and tables.
Cheers
Maybe you are looking for
-
Photo stream not sync everything
HI, I have a problem with photo stream. ON Friday, we had some party and all of my pictures I've made on iPhone 6 (latest update) were synced Correctly to photo stream and I could see them on iPad (also latest iOS update). However yesterday, we were
-
Migration trouble aluminum macbook
Trying to migrate from 13" macbook with 10.4 to brand new aluminum 13" macbook. I've tried using airport and an ethernet cable and this is what happens: They find each other fine. I enter the passcode and then the old computer immediately looks again
-
BAPI for PR Creation and Equipment master updation
Hi Gurus , Please provide me the function module (BAPI) for the following. 1. Create Purchase Requisition 2. Update/Change Equipment master(Iq02) Thanks Tausif
-
Is the graphic board part of logic board on a MacBook pro
Is the graphic board part of logic board on a MacBook pro
-
9.5.1. doesn't load photos in mavericks
help please i get the top bar but nothing else?