username459260
Badges: 16
Rep:
?
#1
Report Thread starter 11 months ago
#1
Can I store a table in a field-cell in an sql datatable?

e.g: if I have the columns Computer ID Computer Price Computer Make Computer specs Can I store a table within the field "Computer specs" for every record?
0
reply
username3314392
Badges: 13
Rep:
?
#2
Report 11 months ago
#2
What language are you using? And I'd recommend putting a question like this on stack overflow
0
reply
username459260
Badges: 16
Rep:
?
#3
Report Thread starter 11 months ago
#3
(Original post by daaudm)
What language are you using? And I'd recommend putting a question like this on stack overflow
I have no experience in programming websites. I am thinking of making a website but before I do want to understand how I would have to store the data. Then I will collect the data and store it in a table and go about creating the website.

In essence I want to store data about numerous items in a data table. The reason the "Computer specs" field would need to store a table is because sometimes the "computer specs" field would contain plain text and other times I'd like it to store an array of data, if that makes sense.

I'll ask on stack overflow too though. thanks
0
reply
username3314392
Badges: 13
Rep:
?
#4
Report 11 months ago
#4
(Original post by jsmith6131)
I have no experience in programming websites. I am thinking of making a website but before I do want to understand how I would have to store the data. Then I will collect the data and store it in a table and go about creating the website.

In essence I want to store data about numerous items in a data table. The reason the "Computer specs" field would need to store a table is because sometimes the "computer specs" field would contain plain text and other times I'd like it to store an array of data, if that makes sense.

I'll ask on stack overflow too though. thanks
No, it'd be better if you learn how the basics of creating a website first, including Front End and Back End and learn a suitable backend language (e.g. php). With a correct backend language you can set up a database using MySQL.

Search https://www.google.co.uk/search?q=php+MySQL
0
reply
username459260
Badges: 16
Rep:
?
#5
Report Thread starter 11 months ago
#5
(Original post by daaudm)
No, it'd be better if you learn how the basics of creating a website first, including Front End and Back End and learn a suitable backend language (e.g. php). With a correct backend language you can set up a database using MySQL.

Search https://www.google.co.uk/search?q=php+MySQL
Do you know if it is possible in theory to use a MySQL table to store and retrieve data as in the attached file
(i.e: store text, images and subtables within individual fields in a MySQL table and then display it (as shown in the bottom half of the document) using a SELECT...FROM query)
Last edited by username459260; 11 months ago
0
reply
username459260
Badges: 16
Rep:
?
#6
Report Thread starter 11 months ago
#6
File here
Attached files
0
reply
user73867
Badges: 19
Rep:
?
#7
Report 11 months ago
#7
(Original post by jsmith6131)
Can I store a table in a field-cell in an sql datatable?

e.g: if I have the columns Computer ID Computer Price Computer Make Computer specs Can I store a table within the field "Computer specs" for every record?
SQL is fixed by type. So, you'll have to have a column that stores your single value and a seperate table (linked by a foreign key) that stores your array data. Then have a boolean column that tells your program whether to grab the data from the table or the column.


For data that we're not sure of the structure of NOSQL is the best way to go (look at MongoDB). SQL is bad at dealing with unexpected things.

SS
1
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

University open days

  • Bournemouth University
    Midwifery Open Day at Portsmouth Campus Undergraduate
    Wed, 16 Oct '19
  • Teesside University
    All faculties open Undergraduate
    Wed, 16 Oct '19
  • University of the Arts London
    London College of Fashion – Cordwainers Footwear and Bags & Accessories Undergraduate
    Wed, 16 Oct '19

How has the start of this academic year been for you?

Loving it - gonna be a great year (114)
17.73%
It's just nice to be back! (177)
27.53%
Not great so far... (229)
35.61%
I want to drop out! (123)
19.13%

Watched Threads

View All