473,659 Members | 2,965 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Difference between a 'file' and a 'table'


With OS400, all files are objects that can be accessed relationally.

When I view the file system from Navigator (windows client), I see there is
the Database and SQL tables, then there is the filesystem.

I can manipulate both these objects (tables, files) with SQL.

So, what is the difference between a table and a file?

--
Texeme
http://texeme.com
Nov 12 '05 #1
3 11643
RdR
Without being strict in its definition a file and a table in OS/400 are the
same. If you go into object types you will find that there is a Type *FILE
and a Type *TBL, maybe I will ask the next question, what is the difference
between the two?

Thanks,

RdR

"John Bailo" <ja*****@texeme .com> wrote in message
news:zP******** ************@sp eakeasy.net...

With OS400, all files are objects that can be accessed relationally.

When I view the file system from Navigator (windows client), I see there
is
the Database and SQL tables, then there is the filesystem.

I can manipulate both these objects (tables, files) with SQL.

So, what is the difference between a table and a file?

--
Texeme
http://texeme.com

Nov 12 '05 #2
RdR
I found an answer to my question. A Type *TBL was created through SQL and a
*FILE was created through OS/400's utilitites. Apparently, a *TBL will be
very similar to a table used outside the AS/400 like NULLS can be used, a
varchar can be used but it seems for a type *FILE, there are limitations.
But both can be accessed through STRSQL.

To expound on that, a *FILE may also mean it is a saved file (a file that
you use to restore) which in this case cannot be accessed through STRSQL.
Also there are externally described files as in flat files or system 36
files whose structure is described separate from the file itself.

RdR

"RdR" <ro*@delrosario .ca> wrote in message
news:Q_******** ********@nnrp.c a.mci.com!nnrp1 .uunet.ca...
Without being strict in its definition a file and a table in OS/400 are
the same. If you go into object types you will find that there is a Type
*FILE and a Type *TBL, maybe I will ask the next question, what is the
difference between the two?

Thanks,

RdR

"John Bailo" <ja*****@texeme .com> wrote in message
news:zP******** ************@sp eakeasy.net...

With OS400, all files are objects that can be accessed relationally.

When I view the file system from Navigator (windows client), I see there
is
the Database and SQL tables, then there is the filesystem.

I can manipulate both these objects (tables, files) with SQL.

So, what is the difference between a table and a file?

--
Texeme
http://texeme.com


Nov 12 '05 #3
RdR wrote:
I found an answer to my question. A Type *TBL was created through SQL and a
*FILE was created through OS/400's utilitites. Apparently, a *TBL will be
very similar to a table used outside the AS/400 like NULLS can be used, a
varchar can be used but it seems for a type *FILE, there are limitations.
But both can be accessed through STRSQL.

To expound on that, a *FILE may also mean it is a saved file (a file that
you use to restore) which in this case cannot be accessed through STRSQL.
Also there are externally described files as in flat files or system 36
files whose structure is described separate from the file itself.

RdR

"John Bailo" <ja*****@texeme .com> wrote in message
news:zP****** **************@ speakeasy.net.. .
With OS400, all files are objects that can be accessed relationally.

When I view the file system from Navigator (windows client), I see there
is
the Database and SQL tables, then there is the filesystem.

I can manipulate both these objects (tables, files) with SQL.

So, what is the difference between a table and a file?

No, SQL does not create OS/400 objects of type *TBL. The *TBL objects
are for translation of data (see documentation for the OS/400 CRTTBL CL
command). The SQL CREATE TABLE statement creates a physical file (*FILE).

See this link for an overview of mapping SQL to OS/400 objects:
http://publib.boulder.ibm.com/iserie...tm#HDRXDBTERMS

Although an SQL table is a physical file (*FILE object type), there are
many other types of OS/400 *FILE objects, and many are *not* accessed
relationally. Examples are save files and device files. Try this
simple test on any OS/400 command entry:
CRTSAVF FILE(QTEMP/XYZ)
dspfd qtemp/xyz
crtsrcpf qtemp/src
dspfd qtemp/src
CRTTAPF FILE(QTEMP/TAP)
dspfd qtemp/tap


In each dspfd command output, see the "Type of file" information. The
crtsrcpf command is just a quick (non-SQL) way to create a physical file
with 3 predefined columns (not normally used for relational access, but
most often used to store source code for programs - RPG, C/C++, etc).

--
Karl Hanson

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
6389
by: Luc Martineau | last post by:
Hello When we create a table, what is the difference between the REFERENCE constraint on column and the FOREIGN KEY constraint on table ? I guess that the FOREIGN KEY constraint assures us that the referenced column is a PRIMARY KEY in an another table. You can reference any colums with the REFERENCE constraint on column. Am I right?
5
3528
by: Neil Rutherford | last post by:
During testing of an application, i noticed a difference between SQL 2000 and SQL 7, both with identical config. In a nutshell: A table has a trigger for UPDATE and DELETE. When a column in the table is UPDATED the following happens: In autocommit mode, when entering a trigger the trancount equals 1 for both SQL 7 and 2000.
5
16716
by: aj | last post by:
DB2 WSE 8.1 FP5 Red Hat AS 2.1 What is the difference between adding a unique constraint like: ALTER TABLE <SCHEMA>.<TABLE> ADD CONSTRAINT CC1131378283225 UNIQUE ( <COL1>) ; and adding a unique index like:
1
2681
by: Beffmans | last post by:
Hi I work with .net 1.1 and i wanted to know the difference between a html table and a <asp:table>? Which one is better for a consistent layout of your asp.net pages? ch Beffmans
4
13774
by: dmisen | last post by:
I have data on air pollution coming from sources across the country, and control options for reducing pollution from each source. The example below shows data for: - 2 sources (plant_ID "001" and "008") - total tons of pollution emitted from each source (20 and 25 tons, respectively) - an ID code for the each control device that could be applied to reduce the emissions - the control efficiency for each control device (percent that it...
8
7849
by: Arno R | last post by:
Hi all, All of a sudden I have problems importing and exporting textfiles with A97. Code was working allright for years and years, but not today... Since I have this app in two versions I tested the behaviour in A2k also. To my surprise the *same* code with the *same* files works with A2k and *not* with A97 FYI: App is split FE-BE and the BE is in Access97 format, so the same BE is used with these versions. So I have FE97-BE97 and...
9
5752
by: HC | last post by:
Hello, all, I started out thinking my problems were elsewhere but as I have worked through this I have isolated my problem, currently, as a difference between MSDE and SQL Express 2005 (I'll just call it Express for simplicity). I have, to try to simplify things, put the exact same DB on two systems, one running MSDE and one running Express. Both have 2 Ghz processors (one Intel, one AMD), both have a decent amount of RAM (Intel system...
3
4153
by: bbawa1 | last post by:
Hi, I have a table which has a field ItemsReceived of type datetime. I have a grid view which has two columns. In first column i have to show the data from field ItemsReceived and in second column I have to show difference between Currenttime and date from ItemReceived. How can I do that.
3
3431
by: Steve | last post by:
I am trying to calculate elapsed travel times for flights. My plan is to enter the local departure time, the departure city and the local arrival time and city. These times would be standardised to GMT and a date difference calculated which would be the theoretical elapsed time of the flight I have one Table called Cities which has the name of the city and the difference from GMT eg Sydney is 10 (ie 10 hrs ahead of GMT), LA is -7 ie 7...
0
8335
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8747
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7356
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1976
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.