Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Comparing string field

Former Member
0 Kudos
91

Hi,

If we are using a string variable 4000 length in a db table..

which will be like follows :

apid int 6

prid int 6

text string 4000

Second database design:

apid int 6

prid int 6

lines int 4

text 70

In first DB we will store all the characters from a text editor,concatenate and put in to tht field..Here it is in 1 record.

In second DB if there are 10 lines in Text editor am putting it as ten lines in database so it will be 10 records..

For retrieving and inserting whcih Databse design will be good in all circumstances(performance,speed etc.,)

4 REPLIES 4

Former Member
0 Kudos
64

hi,

I think 2nd will be more usefull.

because the maximum length allowed for a field is 251.

so you can not exceed this size.

so go for the second one

Former Member
0 Kudos
64

Hi,

If you use type string, the db use only the length oh this string.

And it is easier to develop and maintenance because you do not need you concatenate the fields.

So I think first is better.

Regards,

Fernando

Former Member
0 Kudos
64

If you want SE16 to be useful on your table, you have to go with design #2. Yes, this design involves splitting while storing and concatenating when retrieving.

If you don't need SE16's services, consider using SAP's design used to store long texts.

Former Member
0 Kudos
64

hi check this..

splitting the records is also come want complex because for every record u created there is some memory associated and if u split a record into 10 records then it will take more memory ....please ask the basis people for this..

regards,

venkat