• Ogłoszenie:

Not sure where to start

Wszystko odnośnie tworzenia grafiki - obróbka, problemy, oceny.
Tworzenia Stron internetowych - HTML, PHP, MySQL...

Not sure where to start

Postprzez HanogThamers 18 Kwi 2023, 13:33

reklama
I have .csv that I have created that lists every instance of a number pictured in a directory of images. Some images may have zero numbers, others may have 5 or 10 images. For example:

image 123456: numbers 23, 54, 12, 08, 17
image 123457: numbers 66, 21, 12

How do I go about building a database that allows me to search what images each number is found in?

Everything I am seeing shows databases having a very strict row/column setup, such as a single id, single name, single number, etc. No where do I see how to handle a variable amount of entries for a single item.

In my case I would imagine a single ID (number) with an unlimited amount of images that it appears in. I could then search the database and have it return a list of all images that contain the number. Using the example above, if I searched for '12' I would want to have it retune 123456, 123457.

Thanks for the help!
HanogThamers
~user
 
Posty: 25
Dołączenie: 31 Gru 2022, 10:48



Not sure where to start

Postprzez HanogThamers 08 Cze 2023, 07:12

To build a database that allows you to search what images each number is found in, you can use a relational database management system (RDBMS) like MySQL, PostgreSQL, or SQLite. While databases typically have a fixed schema with predefined columns, you can still handle a variable number of entries for a single item using a technique called "one-to-many" relationship.

Here's a high-level approach to setting up your database:

Create two tables: "Numbers" and "Images".

The "Numbers" table will have two columns: "ID" (for the number) and "Number" (to store the actual number value).
The "Images" table will have two columns: "ImageID" (to uniquely identify each image) and "NumberID" (to associate the image with the corresponding number from the "Numbers" table).
Establish a relationship between the two tables:

Add a foreign key constraint in the "Images" table that references the "ID" column of the "Numbers" table. This koowspin echatrandom constraint ensures that each image is associated with a valid number from the "Numbers" table.
Insert data into the tables:

Insert rows into the "Numbers" table, where each row represents a unique number found in the images.
Insert rows into the "Images" table, where each row represents a unique image and contains the appropriate "NumberID" to establish the association with the respective number.
Now, you can search for images based on chat the numbers they contain:

Perform a query with a join operation:

Select the "ImageID" from the "Images" table.
Join the "Numbers" table based on the matching "NumberID" and filter based on the desired number value.
Retrieve the list of "ImageID" values that match the search criteria.
Process the query results:

Retrieve the corresponding images using the retrieved "ImageID" values.
By executing this process, you will obtain a list of images that contain the searched number.

Remember, the specific implementation details may vary depending on the database management system you choose, but the general concept of establishing a one-to-many relationship and performing join operations should apply.
HanogThamers
~user
 
Posty: 25
Dołączenie: 31 Gru 2022, 10:48



Not sure where to start

Postprzez rixim80416 19 Sty 2024, 13:03

There are some fascinating points over time here but I do not determine if I see every one of them center to heart. There exists some validity but Let me take hold opinion until I look into it further. Excellent article , thanks so we want much more! Added to FeedBurner at the same time https://4twbet.vip/
rixim80416
~user
 
Posty: 654
Dołączenie: 26 Paź 2023, 09:17



Not sure where to start

Postprzez rixim80416 07 Lut 2024, 12:37

I gotta bookmark this web-site it seems invaluable extremely helpful lodeonline68

Dodano Dzisiaj, 12:48:
This is a great blog” and i want to visit this every day of the week . Roby
rixim80416
~user
 
Posty: 654
Dołączenie: 26 Paź 2023, 09:17



Not sure where to start

Postprzez rixim80416 16 Lut 2024, 16:24

Perfect work you have done, this web site is really cool with great information. 代写
rixim80416
~user
 
Posty: 654
Dołączenie: 26 Paź 2023, 09:17



Not sure where to start

Postprzez wuwunibs 04 Kwi 2024, 15:25

сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтtuchkasсайтсайт
wuwunibs
~user
 
Posty: 888
Dołączenie: 03 Kwi 2024, 11:55




Powróć do Grafika & Webmastering

Kto jest na forum

Użytkownicy przeglądający to forum: Brak zarejestrowanych użytkowników oraz 5 gości