Writing data into disk

Hello,

Suppose if I have tables created and have got some data inserted. How to write them into disk safely in Q?

Also, is there a way to keep the data in-memory safe [like the raw prints/updates written in some logs], so that we can retrieve back in case server issues or unexpected outage etc?

I’ve just started learning stuff, please forgive me if it’s a very basic question. Also, is there a book available for beginners? Appreciate your help.

Regards,

Raman

q)mytab:(x: 1 2 3; y: 10 20 30)

q)mytab

x y 


1 10

2 20

3 30

q)mytab.x

1 2 3

q)mytab.y

10 20 30

q)select x from mytab where y=20

x

2

q)select x,y from mytab where y < 21

x y 


1 10

2 20

q)

q)exec x from mytab where y < 21

1 2

That is a very basic question, but a very big one at that.

This is good a starting point and good luck:

http://code.kx.com/wiki/JB:KdbplusForMortals/contents

More tutorials for your needs…http://code.kx.com/wiki/Tutorials.

Thanks,

Sean

also
http://code.kx.com/wiki/Cookbook/Logging